Re: [libvirt] [libvirt-users] Please remove pm-utils dep from libvirt-clients

On Sat, Aug 03, 2013 at 03:41:35PM +0100, Richard Hughes wrote:
Hi,
I'm going to be retiring pm-utils from Fedora soon; it's completely dead upstream and it not needed anymore by upower or anything else. Nothing other than libvirt-clients depends on it, so when I tried to remove this from rawhide I noticed this commit:
commit 7069f75cb8dad58715f723fd542e4ff69dbff51b Author: Daniel Veillard <veillard@redhat.com> Date: Thu Dec 8 17:03:16 2011 +0800
update to libvirt-0.9.8
added:
+# Needed for probing the power management features of the host. +Requires: pm-utils
Is this true? You really don't want to be parsing pm-is-supported, it often doesn't work and isn't used by anything else any more. Would it be possible to port away from pm-is-supported if you're actually using it, and drop the dep for F20 please? Any questions please CC me as I'm not subscribed.
What is the replacement ? We need to be able to query whether each of suspend, hibernate, or suspend-hybrid are supported on a host, and then report that upto the mgmt app using libvirt. Daniel

On 5 August 2013 12:15, Daniel P. Berrange <berrange@redhat.com> wrote:
What is the replacement ? We need to be able to query whether each of suspend, hibernate, or suspend-hybrid are supported on a host, and then report that upto the mgmt app using libvirt.
I think everything ported to the dbus methods like org.freedesktop.login1.Manager.CanSuspend(), org.freedesktop.login1.Manager.CanHibernate() etc. if you need to use shell you can use gdbus -- yell if you need a more concrete example. Thanks. Richard

On 05.08.2013 14:46, Richard Hughes wrote:
On 5 August 2013 12:15, Daniel P. Berrange <berrange@redhat.com> wrote:
What is the replacement ? We need to be able to query whether each of suspend, hibernate, or suspend-hybrid are supported on a host, and then report that upto the mgmt app using libvirt.
I think everything ported to the dbus methods like org.freedesktop.login1.Manager.CanSuspend(), org.freedesktop.login1.Manager.CanHibernate() etc. if you need to use shell you can use gdbus -- yell if you need a more concrete example. Thanks.
Richard
I'd rather see libvirt dependent on pm-utils than dbus. Moreover, the methods paths are not unified AFAIK. For instance, I'm using KDE and on my system it's: org.freedesktop.UPower.HibernateAllowed() org.freedesktop.UPower.SuspendAllowed() Paths you've provided don't exist at all on my system. Michal

On Mon, Aug 05, 2013 at 03:07:15PM +0200, Michal Privoznik wrote:
On 05.08.2013 14:46, Richard Hughes wrote:
On 5 August 2013 12:15, Daniel P. Berrange <berrange@redhat.com> wrote:
What is the replacement ? We need to be able to query whether each of suspend, hibernate, or suspend-hybrid are supported on a host, and then report that upto the mgmt app using libvirt.
I think everything ported to the dbus methods like org.freedesktop.login1.Manager.CanSuspend(), org.freedesktop.login1.Manager.CanHibernate() etc. if you need to use shell you can use gdbus -- yell if you need a more concrete example. Thanks.
Richard
I'd rather see libvirt dependent on pm-utils than dbus. Moreover, the methods paths are not unified AFAIK. For instance, I'm using KDE and on my system it's:
org.freedesktop.UPower.HibernateAllowed() org.freedesktop.UPower.SuspendAllowed()
Paths you've provided don't exist at all on my system.
Seem that the org.freedesktop.login1 APIs are provided by systemd. Since we need to work on non-systemd distros too,at the very least we'll have to keep code to fallback to using pm-utils on those distros. The org.freedesktop.UPower APIs seem to be provided by the UPower project, which was a fork of DeviceKit-Power, which in turn was replacing HAL. Is there any benefit to using org.freedesktop.login1 for PM checks, over using org.freedesktop.UPower, or vica-verca ? Or do we need to support both dbus servics, and pm-utils. Regards, Daniel -- |: http://berrange.com -o- http://www.flickr.com/photos/dberrange/ :| |: http://libvirt.org -o- http://virt-manager.org :| |: http://autobuild.org -o- http://search.cpan.org/~danberr/ :| |: http://entangle-photo.org -o- http://live.gnome.org/gtk-vnc :|

On 5 August 2013 15:14, Daniel P. Berrange <berrange@redhat.com> wrote:
I'd rather see libvirt dependent on pm-utils than dbus.
pm-utils is going to be retired for F20, so that's not really an option long term.
org.freedesktop.UPower.HibernateAllowed() org.freedesktop.UPower.SuspendAllowed()
Allowed means "Is the user allowed to do this" rather than "Is the system capable of this action".
Seem that the org.freedesktop.login1 APIs are provided by systemd. Since we need to work on non-systemd distros too,at the very least we'll have to keep code to fallback to using pm-utils on those distros.
Right, you can do that if you want, but on Fedora this isn't going to work in the future. UPower could ship a /usr/bin/pm-is-supported helper, but I'd rather not duplicate functionality available elsewhere. Richard.

On Mon, Aug 05, 2013 at 03:36:22PM +0200, Richard Hughes wrote:
On 5 August 2013 15:14, Daniel P. Berrange <berrange@redhat.com> wrote:
I'd rather see libvirt dependent on pm-utils than dbus.
pm-utils is going to be retired for F20, so that's not really an option long term.
org.freedesktop.UPower.HibernateAllowed() org.freedesktop.UPower.SuspendAllowed()
Allowed means "Is the user allowed to do this" rather than "Is the system capable of this action".
Ok, so UPower isn't something we want to use for this then.
Seem that the org.freedesktop.login1 APIs are provided by systemd. Since we need to work on non-systemd distros too,at the very least we'll have to keep code to fallback to using pm-utils on those distros.
Right, you can do that if you want, but on Fedora this isn't going to work in the future. UPower could ship a /usr/bin/pm-is-supported helper, but I'd rather not duplicate functionality available elsewhere.
With Fedora, we can just assume systemd is always present, since Fedora does not support usage without systemd anymore. For other distros which don't use systemd, I guess we'll assume they're continuing to ship pm-utils for now and use our existing code with them, unless someone contributes something better. Daniel -- |: http://berrange.com -o- http://www.flickr.com/photos/dberrange/ :| |: http://libvirt.org -o- http://virt-manager.org :| |: http://autobuild.org -o- http://search.cpan.org/~danberr/ :| |: http://entangle-photo.org -o- http://live.gnome.org/gtk-vnc :|

On Mon, Aug 05, 2013 at 03:07:15PM +0200, Michal Privoznik wrote:
On 05.08.2013 14:46, Richard Hughes wrote:
On 5 August 2013 12:15, Daniel P. Berrange <berrange@redhat.com> wrote:
What is the replacement ? We need to be able to query whether each of suspend, hibernate, or suspend-hybrid are supported on a host, and then report that upto the mgmt app using libvirt.
I think everything ported to the dbus methods like org.freedesktop.login1.Manager.CanSuspend(), org.freedesktop.login1.Manager.CanHibernate() etc. if you need to use shell you can use gdbus -- yell if you need a more concrete example. Thanks.
Richard
I'd rather see libvirt dependent on pm-utils than dbus. Moreover, the methods paths are not unified AFAIK. For instance, I'm using KDE and on my system it's:
org.freedesktop.UPower.HibernateAllowed() org.freedesktop.UPower.SuspendAllowed()
Paths you've provided don't exist at all on my system.
What distro are you using which doesn't have the org.freedesktop.login1 DBus APIs ? Daniel -- |: http://berrange.com -o- http://www.flickr.com/photos/dberrange/ :| |: http://libvirt.org -o- http://virt-manager.org :| |: http://autobuild.org -o- http://search.cpan.org/~danberr/ :| |: http://entangle-photo.org -o- http://live.gnome.org/gtk-vnc :|

On 05.08.2013 15:41, Daniel P. Berrange wrote:
On Mon, Aug 05, 2013 at 03:07:15PM +0200, Michal Privoznik wrote:
On 05.08.2013 14:46, Richard Hughes wrote:
On 5 August 2013 12:15, Daniel P. Berrange <berrange@redhat.com> wrote:
What is the replacement ? We need to be able to query whether each of suspend, hibernate, or suspend-hybrid are supported on a host, and then report that upto the mgmt app using libvirt.
I think everything ported to the dbus methods like org.freedesktop.login1.Manager.CanSuspend(), org.freedesktop.login1.Manager.CanHibernate() etc. if you need to use shell you can use gdbus -- yell if you need a more concrete example. Thanks.
Richard
I'd rather see libvirt dependent on pm-utils than dbus. Moreover, the methods paths are not unified AFAIK. For instance, I'm using KDE and on my system it's:
org.freedesktop.UPower.HibernateAllowed() org.freedesktop.UPower.SuspendAllowed()
Paths you've provided don't exist at all on my system.
What distro are you using which doesn't have the org.freedesktop.login1 DBus APIs ?
gentoo without systemd. Michal

On Mon, Aug 05, 2013 at 03:45:43PM +0200, Michal Privoznik wrote:
On 05.08.2013 15:41, Daniel P. Berrange wrote:
On Mon, Aug 05, 2013 at 03:07:15PM +0200, Michal Privoznik wrote:
On 05.08.2013 14:46, Richard Hughes wrote:
On 5 August 2013 12:15, Daniel P. Berrange <berrange@redhat.com> wrote:
What is the replacement ? We need to be able to query whether each of suspend, hibernate, or suspend-hybrid are supported on a host, and then report that upto the mgmt app using libvirt.
I think everything ported to the dbus methods like org.freedesktop.login1.Manager.CanSuspend(), org.freedesktop.login1.Manager.CanHibernate() etc. if you need to use shell you can use gdbus -- yell if you need a more concrete example. Thanks.
Richard
I'd rather see libvirt dependent on pm-utils than dbus. Moreover, the methods paths are not unified AFAIK. For instance, I'm using KDE and on my system it's:
org.freedesktop.UPower.HibernateAllowed() org.freedesktop.UPower.SuspendAllowed()
Paths you've provided don't exist at all on my system.
What distro are you using which doesn't have the org.freedesktop.login1 DBus APIs ?
gentoo without systemd.
Presumably they're still shipping pm-utils for the foreseable future ? So as long as we fallback to our existing code, using the systemd APIs shouldn't be a problem. Daniel -- |: http://berrange.com -o- http://www.flickr.com/photos/dberrange/ :| |: http://libvirt.org -o- http://virt-manager.org :| |: http://autobuild.org -o- http://search.cpan.org/~danberr/ :| |: http://entangle-photo.org -o- http://live.gnome.org/gtk-vnc :|
participants (3)
-
Daniel P. Berrange
-
Michal Privoznik
-
Richard Hughes