From: Fiona Ebner <f.ebner@proxmox.com>
To: pve-devel@lists.proxmox.com
Subject: Re: [pve-devel] [PATCH qemu-server] dbus-vmstate: workaround method call on dbus object resolving to wrong instance
Date: Wed, 10 Dec 2025 12:02:26 +0100 [thread overview]
Message-ID: <d0a6a5e6-a7e7-40f0-827d-b29359471d85@proxmox.com> (raw)
In-Reply-To: <20251210101006.37654-1-f.ebner@proxmox.com>
Am 10.12.25 um 11:10 AM schrieb Fiona Ebner:
> diff --git a/src/PVE/QemuServer/DBusVMState.pm b/src/PVE/QemuServer/DBusVMState.pm
> index a72d6dd2..823a75ba 100644
> --- a/src/PVE/QemuServer/DBusVMState.pm
> +++ b/src/PVE/QemuServer/DBusVMState.pm
> @@ -114,9 +114,12 @@ sub qemu_del_dbus_vmstate {
> $num_entries = eval {
> dbus_get_property($object, 'com.proxmox.VMStateHelper', 'NumMigratedEntries');
> };
> - eval { $object->Quit() };
> + # NOTE: for some reason, $object->Quit() does not resolve to the correct handler even
> + # though we matched the 'Id' property. As a stop-gap until this is figured out, do it
> + # via systemctl.
> + eval { PVE::Tools::run_command(['systemctl', 'stop', "pve-dbus-vmstate\@$vmid"]) };
> if (my $err = $@) {
> - syslog('warn', "failed to call quit on dbus-vmstate for VM $vmid: $err\n")
> + syslog('warn', "failed to stop pve-dbus-vmstate service for VM $vmid: $err\n")
> if !$params{quiet};
> }
>
Hmm, maybe this is by design. We already have a helper for accessing the
properties, probably we need something similar for calling methods:
> # Retrieves a property from an object from a specific interface name.
> # In contrast to accessing the property directly by using $obj->Property, this
> # actually respects the owner of the object and thus can be used for interfaces
> # with might have multiple (queued) owners on the DBus.
> my sub dbus_get_property {
> my ($obj, $interface, $name) = @_;
>
> my $con = $obj->{service}->get_bus()->get_connection();
>
> my $call = $con->make_method_call_message(
> $obj->{service}->get_service_name(),
> $obj->{object_path},
> 'org.freedesktop.DBus.Properties',
> 'Get',
> );
>
> $call->set_destination($obj->get_service()->get_owner_name());
> $call->append_args_list($interface, $name);
>
> my @reply = $con->send_with_reply_and_block($call, 10 * 1000)->get_args_list();
> return $reply[0];
> }
_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
next prev parent reply other threads:[~2025-12-10 11:02 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-12-10 10:05 Fiona Ebner
2025-12-10 11:02 ` Fiona Ebner [this message]
2025-12-10 12:20 ` [pve-devel] superseded: " Fiona Ebner
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=d0a6a5e6-a7e7-40f0-827d-b29359471d85@proxmox.com \
--to=f.ebner@proxmox.com \
--cc=pve-devel@lists.proxmox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.