Re: [ovirt-users] fail to shutdown ubuntu guest
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 ___ Users mailing list Users@ovirt.org http://lists.ovirt.org/mailman/listinfo/users
Re: [ovirt-users] fail to shutdown ubuntu guest
On 06/17/2014 01:52 PM, Sven Kieske wrote: When will a rebuilt deb be available for ubuntu 12.04 ? when was this defect introduced? should I patch my ubuntu vms? A new version for all available ubuntu versions has been posted to the repository. Latest version is ovirt-guest-agent-1.0.9.1-2.1 please update your vms Regards, Am 17.06.2014 12:18, schrieb Vinzenz Feenstra: On 06/17/2014 11:59 AM, Dan Kenigsberg wrote: 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? Thanks, I did not realize that. Thanks for the commit. -- Regards, Vinzenz Feenstra | Senior Software Engineer RedHat Engineering Virtualization R & D Phone: +420 532 294 625 IRC: vfeenstr or evilissimo Better technology. Faster innovation. Powered by community collaboration. See how it works at redhat.com ___ Users mailing list Users@ovirt.org http://lists.ovirt.org/mailman/listinfo/users
Re: [ovirt-users] fail to shutdown ubuntu guest
On 06/17/2014 01:52 PM, Sven Kieske wrote: When will a rebuilt deb be available for ubuntu 12.04 ? when was this defect introduced? should I patch my ubuntu vms? With the switch to sudo. So basically it'd be a good idea to patch them. As soon we have have the linked patch verified I can go and merge it and submit it for ovirt-3.4 and apply the patch on all builds using sudo. Am 17.06.2014 12:18, schrieb Vinzenz Feenstra: On 06/17/2014 11:59 AM, Dan Kenigsberg wrote: 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? Thanks, I did not realize that. Thanks for the commit. -- Regards, Vinzenz Feenstra | Senior Software Engineer RedHat Engineering Virtualization R & D Phone: +420 532 294 625 IRC: vfeenstr or evilissimo Better technology. Faster innovation. Powered by community collaboration. See how it works at redhat.com ___ Users mailing list Users@ovirt.org http://lists.ovirt.org/mailman/listinfo/users
Re: [ovirt-users] fail to shutdown ubuntu guest
When will a rebuilt deb be available for ubuntu 12.04 ? when was this defect introduced? should I patch my ubuntu vms? Am 17.06.2014 12:18, schrieb Vinzenz Feenstra: > On 06/17/2014 11:59 AM, Dan Kenigsberg wrote: >> 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? > Thanks, I did not realize that. Thanks for the commit. > -- 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 ___ Users mailing list Users@ovirt.org http://lists.ovirt.org/mailman/listinfo/users
Re: [ovirt-users] fail to shutdown ubuntu guest
On 06/17/2014 11:59 AM, Dan Kenigsberg wrote: 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? Thanks, I did not realize that. Thanks for the commit. -- Regards, Vinzenz Feenstra | Senior Software Engineer RedHat Engineering Virtualization R & D Phone: +420 532 294 625 IRC: vfeenstr or evilissimo Better technology. Faster innovation. Powered by community collaboration. See how it works at redhat.com ___ Users mailing list Users@ovirt.org http://lists.ovirt.org/mailman/listinfo/users
Re: [ovirt-users] fail to shutdown ubuntu guest
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? ___ Users mailing list Users@ovirt.org http://lists.ovirt.org/mailman/listinfo/users
Re: [ovirt-users] fail to shutdown ubuntu guest
Adding Vinzenz and the list, since they should know of a possible agent bug. On Mon, Jun 16, 2014 at 05:40:59PM +0800, John Xue wrote: > On Fri, Jun 13, 2014 at 6:19 PM, Dan Kenigsberg wrote: > > On Fri, Jun 13, 2014 at 09:22:37AM +0800, John Xue wrote: > >> I went through the xfce GUI options "Settings Manager" - "Power > >> Manager" to the field "When power button is pressed", set to power > >> off, but only successful one time, after reboot it was already set to > >> "Ask". If no one login to guest(just power on from console, and power > >> off), it always fail. > >> > >> I try to modify acpi configuration: > >> #cat /etc/acpi/events/powerbtn > >> event=button[ /]power > >> #action=/etc/acpi/powerbtn.sh > >> action=/sbin/poweroff > >> > >> It work, but I think this isn't a good solution. Any idea? Thanks! > >> > >> On Thu, Jun 12, 2014 at 11:50 PM, Dan Kenigsberg wrote: > >> > On Thu, Jun 12, 2014 at 01:37:19PM +, Sven Kieske wrote: > >> >> are you sure acpid is running inside the guest? > >> > > >> > ... or a guest agent? > >> > >> yes, both of them are running in guest. > >> > >> > > >> > Can you find the shutdown request on /var/log/vdsm/vdsm.log on the host > >> > that runs your guest? > >> > >> yes, this is the log: > >> > >> Thread-158109::DEBUG::2014-06-12 > >> 16:08:26,589::BindingXMLRPC::965::vds::(wrapper) client > >> [10.10.10.75]::call vmShutdown with > >> ('b552d1aa-bc35-4788-a448-1726d4b984d5', '30', 'System Administrator > >> has initiated shutdown of this Virtual Machine. Virtual Machine is > >> shutting down.') {} flowID [5939b847] > >> Thread-158109::DEBUG::2014-06-12 > >> 16:08:26,590::vm::2532::vm.Vm::(shutdown) > >> vmId=`b552d1aa-bc35-4788-a448-1726d4b984d5`::guestAgent shutdown > >> called > >> Thread-158109::DEBUG::2014-06-12 > >> 16:08:26,590::guestIF::304::vm.Vm::(desktopShutdown) > >> vmId=`b552d1aa-bc35-4788-a448-1726d4b984d5`::desktopShutdown called > >> Thread-158109::DEBUG::2014-06-12 > >> 16:08:26,591::BindingXMLRPC::972::vds::(wrapper) return vmShutdown > >> with {'status': {'message': 'Machine shut down', 'code': 0}} > > > > I there no attempt to use ACPI lower in the logs? > > > > Anyway, it seems that an ACPI even is received by the guest. Could you > > now share the log of your guest agent, in order to see if it received > > the shutdown request and handled it somehow? > > This is the log: > Dummy-2::INFO::2014-06-16 > 17:01:06,001::OVirtAgentLogic::266::root::Received an external > command: shutdown... > Dummy-2::INFO::2014-06-16 > 17:01:06,001::OVirtAgentLogic::291::root::Shutting down (timeout = 30, > message = 'System Administrator has initiated shutdown of this Virtual > Machine. Virtual Machine is shutting down.') > Dummy-2::DEBUG::2014-06-16 > 17:01:06,002::GuestAgentLinux2::178::root::Executing shutdown command: > ['/usr/share/ovirt-guest-agent/ovirt-shutdown', '-h', '+1', u'"System > Administrator has initiated shutdown of this Virtual Machine. Virtual > Machine is shutting down."'] > > After check this log, I think I find the problem, the ovirthguest user > haven't permission to sudo, so I add ovirtagent to sudoers. > %ovirtagent ALL NOPASSWD: > /usr/share/ovirt-guest-agent/ovirt-shutdown-wrapper.sh > > It work. But I find another problem. I just modify a guest of pool, > after reboot, I miss sodoers config, it is back to orignal. How to > keep this config without change template? > > Thank you! > > -- > Regards, > John Xue ___ Users mailing list Users@ovirt.org http://lists.ovirt.org/mailman/listinfo/users
Re: [ovirt-users] fail to shutdown ubuntu guest
On 13 Jun 2014, at 12:19, Dan Kenigsberg wrote: > On Fri, Jun 13, 2014 at 09:22:37AM +0800, John Xue wrote: >> I went through the xfce GUI options "Settings Manager" - "Power >> Manager" to the field "When power button is pressed", set to power >> off, but only successful one time, after reboot it was already set to >> "Ask". If no one login to guest(just power on from console, and power >> off), it always fail. >> >> I try to modify acpi configuration: >> #cat /etc/acpi/events/powerbtn >> event=button[ /]power >> #action=/etc/acpi/powerbtn.sh >> action=/sbin/poweroff >> >> It work, but I think this isn't a good solution. Any idea? Thanks! >> >> On Thu, Jun 12, 2014 at 11:50 PM, Dan Kenigsberg wrote: >>> On Thu, Jun 12, 2014 at 01:37:19PM +, Sven Kieske wrote: are you sure acpid is running inside the guest? >>> >>> ... or a guest agent? >> >> yes, both of them are running in guest. >> >>> >>> Can you find the shutdown request on /var/log/vdsm/vdsm.log on the host >>> that runs your guest? >> >> yes, this is the log: >> >> Thread-158109::DEBUG::2014-06-12 >> 16:08:26,589::BindingXMLRPC::965::vds::(wrapper) client >> [10.10.10.75]::call vmShutdown with >> ('b552d1aa-bc35-4788-a448-1726d4b984d5', '30', 'System Administrator >> has initiated shutdown of this Virtual Machine. Virtual Machine is >> shutting down.') {} flowID [5939b847] >> Thread-158109::DEBUG::2014-06-12 >> 16:08:26,590::vm::2532::vm.Vm::(shutdown) >> vmId=`b552d1aa-bc35-4788-a448-1726d4b984d5`::guestAgent shutdown >> called >> Thread-158109::DEBUG::2014-06-12 >> 16:08:26,590::guestIF::304::vm.Vm::(desktopShutdown) >> vmId=`b552d1aa-bc35-4788-a448-1726d4b984d5`::desktopShutdown called >> Thread-158109::DEBUG::2014-06-12 >> 16:08:26,591::BindingXMLRPC::972::vds::(wrapper) return vmShutdown >> with {'status': {'message': 'Machine shut down', 'code': 0}} > > I there no attempt to use ACPI lower in the logs? if the agent is responsive (which it is here) then no ACPI is attempted guest agent just runs /sbin/shutdown directly Thanks, michal > > Anyway, it seems that an ACPI even is received by the guest. Could you > now share the log of your guest agent, in order to see if it received > the shutdown request and handled it somehow? > ___ > Users mailing list > Users@ovirt.org > http://lists.ovirt.org/mailman/listinfo/users ___ Users mailing list Users@ovirt.org http://lists.ovirt.org/mailman/listinfo/users
Re: [ovirt-users] fail to shutdown ubuntu guest
On Fri, Jun 13, 2014 at 09:22:37AM +0800, John Xue wrote: > I went through the xfce GUI options "Settings Manager" - "Power > Manager" to the field "When power button is pressed", set to power > off, but only successful one time, after reboot it was already set to > "Ask". If no one login to guest(just power on from console, and power > off), it always fail. > > I try to modify acpi configuration: > #cat /etc/acpi/events/powerbtn > event=button[ /]power > #action=/etc/acpi/powerbtn.sh > action=/sbin/poweroff > > It work, but I think this isn't a good solution. Any idea? Thanks! > > On Thu, Jun 12, 2014 at 11:50 PM, Dan Kenigsberg wrote: > > On Thu, Jun 12, 2014 at 01:37:19PM +, Sven Kieske wrote: > >> are you sure acpid is running inside the guest? > > > > ... or a guest agent? > > yes, both of them are running in guest. > > > > > Can you find the shutdown request on /var/log/vdsm/vdsm.log on the host > > that runs your guest? > > yes, this is the log: > > Thread-158109::DEBUG::2014-06-12 > 16:08:26,589::BindingXMLRPC::965::vds::(wrapper) client > [10.10.10.75]::call vmShutdown with > ('b552d1aa-bc35-4788-a448-1726d4b984d5', '30', 'System Administrator > has initiated shutdown of this Virtual Machine. Virtual Machine is > shutting down.') {} flowID [5939b847] > Thread-158109::DEBUG::2014-06-12 > 16:08:26,590::vm::2532::vm.Vm::(shutdown) > vmId=`b552d1aa-bc35-4788-a448-1726d4b984d5`::guestAgent shutdown > called > Thread-158109::DEBUG::2014-06-12 > 16:08:26,590::guestIF::304::vm.Vm::(desktopShutdown) > vmId=`b552d1aa-bc35-4788-a448-1726d4b984d5`::desktopShutdown called > Thread-158109::DEBUG::2014-06-12 > 16:08:26,591::BindingXMLRPC::972::vds::(wrapper) return vmShutdown > with {'status': {'message': 'Machine shut down', 'code': 0}} I there no attempt to use ACPI lower in the logs? Anyway, it seems that an ACPI even is received by the guest. Could you now share the log of your guest agent, in order to see if it received the shutdown request and handled it somehow? ___ Users mailing list Users@ovirt.org http://lists.ovirt.org/mailman/listinfo/users
Re: [ovirt-users] fail to shutdown ubuntu guest
On Thu, Jun 12, 2014 at 01:37:19PM +, Sven Kieske wrote: > are you sure acpid is running inside the guest? ... or a guest agent? Can you find the shutdown request on /var/log/vdsm/vdsm.log on the host that runs your guest? > > Am 12.06.2014 05:54, schrieb John Xue: > > Hello, > > > > I try to grace shutdown my ubuntu guest from user or admin portal, but > > all are fail. I can saw a shutdown option dialog in guest, so I think > > maybe some shutdown parameter are miss in ovirth guest agent for > > ubuntu 14.04. > > > > Thanks > > > > -- > 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 > ___ > Users mailing list > Users@ovirt.org > http://lists.ovirt.org/mailman/listinfo/users ___ Users mailing list Users@ovirt.org http://lists.ovirt.org/mailman/listinfo/users
Re: [ovirt-users] fail to shutdown ubuntu guest
are you sure acpid is running inside the guest? Am 12.06.2014 05:54, schrieb John Xue: > Hello, > > I try to grace shutdown my ubuntu guest from user or admin portal, but > all are fail. I can saw a shutdown option dialog in guest, so I think > maybe some shutdown parameter are miss in ovirth guest agent for > ubuntu 14.04. > > Thanks > -- 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 ___ Users mailing list Users@ovirt.org http://lists.ovirt.org/mailman/listinfo/users
[ovirt-users] fail to shutdown ubuntu guest
Hello, I try to grace shutdown my ubuntu guest from user or admin portal, but all are fail. I can saw a shutdown option dialog in guest, so I think maybe some shutdown parameter are miss in ovirth guest agent for ubuntu 14.04. Thanks -- Regards, John Xue ___ Users mailing list Users@ovirt.org http://lists.ovirt.org/mailman/listinfo/users