[pve-devel] [PATCH qemu-server] Fix #2062: New timeout switch for guest cmd
Kamil Trzciński
ayufan at ayufan.eu
Wed Feb 13 20:18:31 CET 2019
Oh :)
On Wed, Feb 13, 2019 at 9:51 AM Dominik Csapak <d.csapak at proxmox.com> wrote:
> On 2/12/19 1:44 PM, Kamil Trzciński wrote:
> > Does it make sense to make this not forever by default? Maybe like 600
> > seconds should be good compromise, and if needed, this could be
> overwritten?
>
> the description is actually wrong, if no timeout is given
> we have different default timeouts for different commands,
> e.g. shutdown has a 10 min default, fsfreeze 60min
>
> the 'default default' timeout is 3 seconds
>
> >
> > On Mon, Feb 11, 2019 at 2:17 PM Rhonda D'Vine <rhonda at proxmox.com>
> wrote:
> >
> >> The guest cmd commands set different timeouts. Some of those might take
> >> longer, so for debugging purposes it would be useful to allow overriding
> >> the internal timeout setting.
> >>
> >> Signed-off-by: Rhonda D'Vine <rhonda at proxmox.com>
> >> ---
> >> PVE/API2/Qemu/Agent.pm | 9 ++++++++-
> >> 1 file changed, 8 insertions(+), 1 deletion(-)
> >>
> >> diff --git a/PVE/API2/Qemu/Agent.pm b/PVE/API2/Qemu/Agent.pm
> >> index 839146c..500188d 100644
> >> --- a/PVE/API2/Qemu/Agent.pm
> >> +++ b/PVE/API2/Qemu/Agent.pm
> >> @@ -155,6 +155,12 @@ sub register_command {
> >> description => "The QGA command.",
> >> enum => [ sort keys %$guest_agent_commands ],
> >> },
> >> + timeout => {
> >> + description => "Timeout in seconds. Default is to wait
> >> forever.",
> >> + type => 'integer',
> >> + minimum => 1,
> >> + optional => 1,
> >> + }
> >> },
> >> };
> >>
> >> @@ -190,7 +196,8 @@ sub register_command {
> >> agent_available($vmid, $conf);
> >>
> >> my $cmd = $param->{command} // $command;
> >> - my $res = PVE::QemuServer::vm_mon_cmd($vmid, "guest-$cmd");
> >> + my $res = PVE::QemuServer::vm_mon_cmd($vmid, "guest-$cmd",
> >> + defined($param->{timeout}) ? (timeout =>
> >> $param->{timeout}) : () );
> >>
> >> return { result => $res };
> >> }});
> >> --
> >> 2.11.0
> >>
> >>
> >> _______________________________________________
> >> pve-devel mailing list
> >> pve-devel at pve.proxmox.com
> >> https://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
> >>
> > _______________________________________________
> > pve-devel mailing list
> > pve-devel at pve.proxmox.com
> > https://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
> >
>
>
> _______________________________________________
> pve-devel mailing list
> pve-devel at pve.proxmox.com
> https://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
>
More information about the pve-devel
mailing list