[ovirt-users] fail to shutdown ubuntu guest
Sven Kieske
S.Kieske at mittwald.de
Fri Jun 20 09:11:24 UTC 2014
Am 17.06.2014 11:59, schrieb Dan Kenigsberg:
> On Tue, Jun 17, 2014 at 09:40:08AM +0800, John Xue wrote:
>> Yes, it is possible an agent bug.
>> #cat /etc/sudoers.d/50_ovirt-guest-agent
>> Cmnd_Alias OVIRTAGENT_SCRIPTS =\
>> /usr/share/ovirt-guest-agent/ovirt-hibernate-wrapper.sh *,\
>> /usr/share/ovirt-guest-agent/ovirt-shutdown-wrappers.h *,\
>> /usr/share/ovirt-guest-agent/ovirt-locksession-wrapper.sh
>>
>> ovirtagent ALL= NOPASSWD: OVIRTAGENT_SCRIPTS
>> Defaults:ovirtagent !requiretty
>> Defaults:ovirtagent !syslog
>>
>> Wrong file name in
>> /usr/share/ovirt-guest-agent/ovirt-shutdown-wrappers.h, should be
>> "sh".
>
> Thanks, seems like an easy fix. Could you verify that
> http://gerrit.ovirt.org/28842 solves the issue?
To prevent such errors in the future here are some ideas:
place the path to scripts and files in general into variables
then expand those vars when you want to write the path inside a file.
write tests to check if the path to a given file inside a config file
really exists, make them triggered by jenkins, never misspell a file
again (at least not in a release) :)
PS: There is also a test framework for bash, called bats:
https://github.com/sstephenson/bats
--
Mit freundlichen Grüßen / Regards
Sven Kieske
Systemadministrator
Mittwald CM Service GmbH & Co. KG
Königsberger Straße 6
32339 Espelkamp
T: +49-5772-293-100
F: +49-5772-293-333
https://www.mittwald.de
Geschäftsführer: Robert Meyer
St.Nr.: 331/5721/1033, USt-IdNr.: DE814773217, HRA 6640, AG Bad Oeynhausen
Komplementärin: Robert Meyer Verwaltungs GmbH, HRB 13260, AG Bad Oeynhausen
More information about the Users
mailing list