- 24 4月, 2018 1 次提交
-
-
由 Christian Ehrhardt 提交于
The recent fix to libvirt-guests.sh.in works for what it intended to fix (variable scope) but failed to adapt the loop in check_guests_shutdown correctly. Due to that it currently might detect all guests as "Failed to determine state of guest" by bad var content or just assumes they are shut down by picking up an empty variable. This commit fixes loop to use the passed value and the call in the loop to actually use the variable assigned in the iterated. Fixes: 7e476356 "tools: fix variable scope in in check_guests_shutdown" Fixes: https://bugs.launchpad.net/ubuntu/+source/libvirt/+bug/1764668Reviewed-by: NDariusz Gadomski <dariusz.gadomski@canonical.com> Signed-off-by: NChristian Ehrhardt <christian.ehrhardt@canonical.com> Signed-off-by: NMichal Privoznik <mprivozn@redhat.com> Reviewed-by: NAndrea Bolognani <abologna@redhat.com>
-
- 19 3月, 2018 1 次提交
-
-
由 Christian Ehrhardt 提交于
libvirt-guests.sh when run with more active guests than requested to shut down in parallel will run until it times out only shutting down the first set of guests. This patch fixes parallel shutdown by fixing a variable scope issue where check_guests_shutdown unintentionally reset $guests which prevented further progress. Fixes: https://bugs.launchpad.net/ubuntu/+source/libvirt/+bug/1688508Signed-off-by: NChristian Ehrhardt <christian.ehrhardt@canonical.com>
-
- 23 2月, 2018 1 次提交
-
-
由 Christian Ehrhardt 提交于
While libvirt-guests.sh is running cases can let guest_is_on fail which causes check_guests_shutdown to print output. That output shall not spill into the users of function check_guests_shutdown which is therefore now returning values in a variable like guest_is_on already did. Original-Author: Christian Ehrhardt <christian.ehrhardt@canonical.com> Modified-By: NJorge Niedbalski <niedbalski@ubuntu.com> Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
-
- 19 12月, 2017 1 次提交
-
-
由 Jim Fehlig 提交于
The list_guests function in libvirt-guests uses 'grep -v' to filter Xen domain0 from a list of guests. If domain0 is the only item in the list, 'grep -v' returns 1, causing the 'stop' operation to fail when action is 'suspend'. Improve the filtering by using sed to remove domain0 from the list of guests.
-
- 10 10月, 2016 2 次提交
-
-
由 Stefan Bader 提交于
With newer versions of libvirt Domain-0 is again visible in the list of running guests but it should not be considered as a guest for shutdown or suspend. Signed-off-by Stefan Bader <stefan.bader@canonical.com>
-
由 Stefan Bader 提交于
The list file expects all guest UUIDs on the same line as the URI which the guests run on. This does not happen when the list is echo'ed in quotes. When stripping the quotes, newlines get transformed into spaces. Without this, only the first guest on the list is actually handled. Based on a fix by Omar Siam <simar@gmx.net> Bug-Ubuntu: http://bugs.launchpad.net/bugs/1591695Signed-off-by: NStefan Bader <stefan.bader@canonical.com>
-
- 12 5月, 2015 1 次提交
-
-
由 Michal Privoznik 提交于
https://bugzilla.redhat.com/show_bug.cgi?id=1191227 Since 0fa15b19 we have this variable SYNC_TIME which allows users to synchronize time on domain resume. However, despite what documentation says, it's by default on because it's never initialized. Fix this by setting it to zero at the beginning of the libvirt-guests script. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
-
- 23 2月, 2015 1 次提交
-
-
由 Michal Privoznik 提交于
Well, imagine domains were running, and as the host went down, they were managesaved. Later, after some time, the host went up again and domains got restored. But without correct time. And depending on how long was the host shut off, it may take some time for ntp to sync the time too. But hey, wait a minute. We have an API just for that! So: 1) Introduce SYNC_TIME variable in libvirt-guests.sysconf to allow users control over the new functionality 2) Call 'virsh domtime --sync $dom' in the libvirt-guests script. Unfortunately, this is all-or-nothing approach (just like anything else with the script). Domains are required to have configured and running qemu-ga inside. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
-
- 25 7月, 2014 1 次提交
-
-
由 Martin Kletzander 提交于
Signed-off-by: NMartin Kletzander <mkletzan@redhat.com>
-
- 07 4月, 2014 1 次提交
-
-
由 Guido Günther 提交于
At least Debian uses dash to run the init scripts
-
- 24 2月, 2014 1 次提交
-
-
由 Michal Privoznik 提交于
I've noticed that in some cases systemd was quick enough and even if libvirt-guests.service is marked to be started after the libvirtd.service my guests were not resumed as libvirt-guests.sh failed to connect. This is because of a simple fact: systemd correctly starts libvirt-guests after it execs libvirtd. However, the daemon is not able to accept connections right from the start. It's doing some initialization which may take ages. This problem is not limited to systemd only, indeed. Any init system that is able to startup services in parallel (e.g. OpenRC) may run into this situation. The fix is to try connecting not only once, but continuously a few times with a small sleep in between tries. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
-
- 21 5月, 2013 1 次提交
-
-
由 Eric Blake 提交于
Several files called out COPYING or COPYING.LIB instead of using the normal boilerplate. It's especially important that we don't call out COPYING from an LGPL file, since COPYING is traditionally used for the GPL. A few files were lacking copyright altogether. * src/rpc/gendispatch.pl: Add missing copyright. * Makefile.nonreentrant: Likewise. * src/check-symfile.pl: Likewise. * src/check-symsorting.pl: Likewise. * src/driver.h: Likewise. * src/internal.h: Likewise. * tools/libvirt-guests.sh.in: Likewise. * tools/virt-pki-validate.in: Mention copyright in comment, not just code. * tools/virt-sanlock-cleanup.in: Likewise. * src/rpc/genprotocol.pl: Spell out license terms. * src/xen/xend_internal.h: Likewise. * src/xen/xend_internal.c: Likewise. * Makefile.am: Likewise. * daemon/Makefile.am: Likewise. * docs/Makefile.am: Likewise. * docs/schemas/Makefile.am: Likewise. * examples/apparmor/Makefile.am: Likewise. * examples/domain-events/events-c/Makefile.am: Likewise. * examples/dominfo/Makefile.am: Likewise. * examples/domsuspend/Makefile.am: Likewise. * examples/hellolibvirt/Makefile.am: Likewise. * examples/openauth/Makefile.am: Likewise. * examples/python/Makefile.am: Likewise. * examples/systemtap/Makefile.am: Likewise. * examples/xml/nwfilter/Makefile.am: Likewise. * gnulib/lib/Makefile.am: Likewise. * gnulib/tests/Makefile.am: Likewise. * include/Makefile.am: Likewise. * include/libvirt/Makefile.am: Likewise. * python/Makefile.am: Likewise. * python/tests/Makefile.am: Likewise. * src/Makefile.am: Likewise. * tests/Makefile.am: Likewise. * tools/Makefile.am: Likewise. * configure.ac: Likewise. Signed-off-by: NEric Blake <eblake@redhat.com>
-
- 01 5月, 2013 1 次提交
-
-
由 Ján Tomko 提交于
Return 3 when the service is stopped, whether there are saved guests or not, to conform with the LSB standards: http://refspecs.linuxbase.org/LSB_3.1.1/LSB-Core-generic/LSB-Core-generic/iniscrptact.html
-
- 25 3月, 2013 1 次提交
-
-
由 Eric Blake 提交于
Right now, libvirt-guests gives awkward output. It's possible to force faster failure by setting /etc/sysconfig/libvirt-guests to use: ON_SHUTDOWN=shutdown PARALLEL_SHUTDOWN=0 SHUTDOWN_TIMEOUT=1 ON_BOOT=ignore at which point, we see: $ service libvirt-guests restart Running guests on default URI: a, b, d, c Shutting down guests on default URI... Starting shutdown on guest: a Shutdown of guest a failed to complete in time.Starting shutdown on guest: b Shutdown of guest b failed to complete in time.Starting shutdown on guest: d Shutdown of guest d failed to complete in time.Starting shutdown on guest: c Shutdown of guest c failed to complete in time.libvirt-guests is configured not to start any guests on boot * tools/libvirt-guests.sh.in (shutdown_guest): Add missing newline. Reported by Xuesong Zhang.
-
- 12 12月, 2012 1 次提交
-
-
由 Cole Robinson 提交于
Most of this deals with moving the libvirt-guests.sh script which does all the work to /usr/libexec, so it can be shared by both systemd and traditional init. Previously systemd depended on the script being in /etc/init.d Required to fix https://bugzilla.redhat.com/show_bug.cgi?id=789747
-
- 22 8月, 2012 1 次提交
-
-
由 Gerd v. Egidy 提交于
Since the move to systemd libvirt-guests doesn't output this progress information anymore. This patch brings back this feature. It is helpful to show the admin what the system is waiting for and what is left of the timeout (e.g. for calibrating the shutdown timing of a ups). Rewriting the current line with \r doesn't work anymore in the context of systemd. So always write new lines, but move to 5 second intervals to avoid flooding the console.
-
- 15 5月, 2012 1 次提交
-
-
由 Osier Yang 提交于
$LISTFILE is created even no domain is running, and the empty $LISTFILE could cause improper service status. stopped ,with saved guests Which is not right, as there is no domain was saved.
-
- 05 3月, 2012 1 次提交
-
-
由 Peter Krempa 提交于
With this patch, it's possible to shut down guests in parallel. Parallel startup was possible before, but this functionality was not documented properly. To enable parallel startup set the START_DELAY to 0. Parallel shutdown has a configurable parameter PARALLEL_SHUTDOWN that defines the number of machines being shut down in parallel. Enabling this feature changes the semantics of SHUTDOWN_TIMEOUT parameter that is applied as a cumulative timeout to shutdown all guests on a URI.
-
- 29 2月, 2012 3 次提交
-
-
由 Peter Krempa 提交于
This patch adds a check to the libvirt-guests script to check for the URI to be alive before attempting any calls. This avoids nasty error messages and allows us to fail gracefully and continue on other URIs configured in the script.
-
由 Peter Krempa 提交于
The libvirt-guests script tried to do a managed save of transient guest that failed. This patch notifies which guests are transient (and not being saved) and saves only the persistent ones.
-
由 Peter Krempa 提交于
This patch adds documentation to functions defined in the libvirt-guests init script and changes use of virsh's new commands to make the script easier.
-
- 22 7月, 2011 1 次提交
-
-
由 Eric Blake 提交于
libvirt-guests is a perfect use case for bypassing the file system cache - lots of filesystem traffic done at system shutdown, where caching is pointless, and startup, where reading large files only once just gets in the way. Make this a configurable option in the init script, but defaulting to existing behavior. * tools/libvirt-guests.sysconf (BYPASS_CACHE): New variable. * tools/libvirt-guests.init.sh (start, suspend_guest): Use it.
-
- 16 4月, 2011 1 次提交
-
-
由 Alexander Todorov 提交于
Allow libvirt-guests to stage a delay between guest startups, to avoid system load caused by back-to-back startup.
-
- 15 3月, 2011 2 次提交
-
-
由 Eric Blake 提交于
* tools/libvirt-guests.init.sh (start, stop, gueststatus): Avoid shell globbing, since valid URIs can contain '?'.
-
由 Philipp Hahn 提交于
At least protect the $uri variable against further expansion by properly quoting it. While doing that, also quote all other variables to protect against shell meta characters. Signed-off-by: NPhilipp Hahn <hahn@univention.de>
-
- 14 3月, 2011 1 次提交
-
-
由 Jiri Denemark 提交于
-
- 12 3月, 2011 1 次提交
-
-
由 Philipp Hahn 提交于
awk splits the line on consecutive spaces, which breaks getting the name of a domain whose name contains spaces. Use sed instead to strip the "Name:" prefix from the line Signed-off-by: NPhilipp Hahn <hahn@univention.de>
-
- 17 1月, 2011 2 次提交
-
-
由 Eric Blake 提交于
* tools/libvirt-guests.init.in: Rename... * tools/libvirt-guests.init.sh: ...so that xgettext's language detection via suffix will work. * po/POTFILES.in: Update all references. * tools/Makefile.am (EXTRA_DIST, libvirt-guests.init): Likewise.
-
由 Laurent Léonard 提交于
* tools/libvirt-guests.init.sh: Use only POSIX shell features, which includes using gettext.sh for translation rather than $"". * tools/Makefile.am (libvirt-guests.init): Supply a few more substitutions. * po/POTFILES.in: Mark that libvirt-guests.init needs translation. Signed-off-by: NEric Blake <eblake@redhat.com>
-
- 20 12月, 2010 1 次提交
-
-
由 Eric Blake 提交于
* tools/libvirt-guests.init.in (libvirtd): Skip function library if it is not present. Suggested by Guido Günther.
-
- 14 12月, 2010 1 次提交
-
-
由 Laurent Léonard 提交于
The "Default-Stop" field in LSB comment in libvirt-guests is missing and should be added. I also suggests to add runlevel 2 to the "Default-Start" field. -- Laurent Léonard
-
- 07 12月, 2010 1 次提交
-
-
由 Laurent Léonard 提交于
When libvirt-guests is being stopped, I get the following message: $Running guests on default URI: test-vm $Suspending guests on default URI... $Suspending test-vm: /etc/init.d/libvirt-guests: 340: Syntax error: Bad fd number
-
- 23 9月, 2010 1 次提交
-
-
由 Jiri Denemark 提交于
libvirt-guests init script should be started as late as possible during host startup and stopped as early as possible during host shutdown to make sure required services are already/still up and running at the time libvirt-guests runs.
-
- 25 8月, 2010 1 次提交
-
-
由 Jiri Denemark 提交于
Since libvirt-guests init script and its configuration do not require libvirtd to be running/installed, it was a bad idea to put them into daemon directory. libvirt.spec even includes these files in libvirt-client subpackage, which may result in build failure for client-only builds when the whole daemon directory is just skipped.
-
- 28 7月, 2010 3 次提交
-
-
由 Eric Blake 提交于
Optional per LSB, but required by Fedora: https://fedoraproject.org/wiki/Packaging/SysVInitScript * daemon/libvirt-guests.init.in (main): Add more required commands.
-
由 Eric Blake 提交于
LSB and https://fedoraproject.org/wiki/Packaging/SysVInitScript require status to output something useful, rather than just use the exit code. * daemon/libvirt-guests.init.in (rh_status): Break into new routine, and provide output. (usage): Document status.
-
由 Eric Blake 提交于
Reject extra arguments. Return the correct status for unknown arguments, as mandated by https://fedoraproject.org/wiki/Packaging/SysVInitScript Add --help, as a permitted extension. * daemon/libvirt-guests.init.in (usage): New function. Use it in more places, and return correct value.
-
- 27 7月, 2010 1 次提交
-
-
由 Jiri Denemark 提交于
When only client parts of libvirt are installed (i.e., no libvirtd daemon), libvirt-guests init script in its default configuration would throw seriously looking errors during host shutdown: Running guests on default URI: error: unable to connect to '/var/run/libvirt/libvirt-sock', libvirtd may need to be started: No such file or directory error: failed to connect to the hypervisor This patch changes the script to print rather harmless message in that situation: Running guests on default URI: libvirtd not installed; skipping this URI.
-
- 22 6月, 2010 1 次提交
-
-
由 Jiri Denemark 提交于
Running virsh while having /var/lib/libvirt/libvirt-guests file open makes SELinux emit messages about preventing virsh from reading that file. Since virsh doesn't really want to read anything, it's better to run it with /dev/null on stdin to prevent those messages.
-
- 29 5月, 2010 1 次提交
-
-
由 Jiri Denemark 提交于
Firstly, the init script has to touch its file under /var/lock/subsys when started, otherwise the system would think it's not running and won't stop it during shutdown. Secondly, for some reason there is a policy to automatically enable init scripts when they are installed, so let the specfile do this. We also need to start the init script to ensure it will be stopped during the first shutdown after installing the package. Also $LISTFILE should be enclosed by quotes everywhere as suggested by Eric.
-