public inbox for pve-devel@lists.proxmox.com
 help / color / mirror / Atom feed
From: Daniel Tschlatscher <d.tschlatscher@proxmox.com>
To: pve-devel@lists.proxmox.com
Subject: Re: [pve-devel] [PATCH pve-guest-common/pve-docs 0/1]
Date: Fri, 11 Nov 2022 11:27:09 +0100	[thread overview]
Message-ID: <6c5cdd75-3353-81ec-58fe-27e17b42f347@proxmox.com> (raw)
In-Reply-To: <20220922115421.1406405-1-s.hanreich@proxmox.com>

The hookscripts for pre- and post- snapshot work as intended.
I tested creating snapshots in the GUI and on the CLI without finding
any problems.
When the hookscript fails the behavior was as I would expect it: An
error in 'pre-hookscript' fails the whole task. An error in the
'post-hookscript' states that an error in the hookscript occured, but
still ends with 'TASK OK', with the snapshot being created.


One general suggestion:
When the 'post-snapshot' hook fails it would be nice if a warning could
be printed. As the snapshot still succeeds in this case, just looking at
the task log list, it looks like the task finished without any problems.

This would require some changes in 'exec_hookscript' and probably for
other 'post-x' hooks as well, though, this is not in the scope of these
patches. I just thought to put it somewhere.


So, consider this series

Tested-by: Daniel Tschlatscher <d.tschlatscher@proxmox.com>

On 9/22/22 13:54, Stefan Hanreich wrote:
> This patch adds hooks that run when the user creates a snapshot from the Web UI
> / CLI. I have tested this with both VMs/CTs via Web UI and CLI. Are there any
> other places where the hook should get triggered that I missed?
> 
> pve-guest-common:
> 
> Stefan Hanreich (1):
>   add pre/post-snapshot hooks
> 
>  src/PVE/AbstractConfig.pm | 8 +++++++-
>  1 file changed, 7 insertions(+), 1 deletion(-)
> 
> pve-docs:
> 
> Stefan Hanreich (1):
>   add pre/post snapshot events to example hookscript
> 
>  examples/guest-example-hookscript.pl | 14 ++++++++++++++
>  1 file changed, 14 insertions(+)
> 




      parent reply	other threads:[~2022-11-11 10:27 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-22 11:54 Stefan Hanreich
2022-09-22 11:54 ` [pve-devel] [PATCH pve-docs 1/1] add pre/post snapshot events to example hookscript Stefan Hanreich
2022-09-22 11:54 ` [pve-devel] [PATCH pve-guest-common 1/1] add pre/post-snapshot hooks Stefan Hanreich
2022-11-14  8:51   ` Fiona Ebner
2022-11-17 11:27     ` Stefan Hanreich
2022-11-18  8:27       ` Fiona Ebner
2022-11-11 10:27 ` Daniel Tschlatscher [this message]

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=6c5cdd75-3353-81ec-58fe-27e17b42f347@proxmox.com \
    --to=d.tschlatscher@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal