public inbox for pmg-devel@lists.proxmox.com
 help / color / mirror / Atom feed
From: Thomas Lamprecht <t.lamprecht@proxmox.com>
To: Stoiko Ivanov <s.ivanov@proxmox.com>, pmg-devel@lists.proxmox.com
Subject: [pmg-devel] applied: [PATCH pmg-api] d/maintscripts: prevent aborting on errors in some commands
Date: Fri, 2 Jun 2023 10:23:31 +0200	[thread overview]
Message-ID: <0953a0e5-c5c9-f8b0-c2be-e0766082e46b@proxmox.com> (raw)
In-Reply-To: <20230331112747.26973-1-s.ivanov@proxmox.com>

Am 31/03/2023 um 13:27 schrieb Stoiko Ivanov:
> in case something goes wrong it is often better to not leave the
> packaging state broken.
> 
> failure in the commands masked by this patch are either transient
> (pmgconfig sync -restart 1 failing when services are masked), or will
> be noticed quite instantly (failed database or config initialization
> upon first install)
> 
> the deb-systemd-invoke change was based on a quick grep in
> /var/lib/dpkg/info on my system
> 
> I quickly considered masking even more errors (e.g. related to the ucf
> handling) - but they don't seem to cause issues (in the past 3 years)
> - and if something breaks there it is probably worth to get a report
> 
> reported in our community forum:
> https://forum.proxmox.com/threads/.125088/
> 
> Signed-off-by: Stoiko Ivanov <s.ivanov@proxmox.com>
> ---
> This patch should fix the issue - I considered the suggestions discussed
> off-list with making the reload command not fail when the config-rewrite
> issues it - but doing so in general feels wrong.
> Ignoring a failure if a service is masked did not seem robust - e.g.
> masking 'postfix.service' does not result in 'postfix@-' being masked as
> well, and still a reload of 'postfix@-' service fails (and explicitly
> listing this one edge-case felt a bit brittle)
> Finally not erroring out in `pmgconfig sync -restart 1` felt off as it's
> the direct entry point for the user - and masking an error should be the
> caller's responsibility
> 
> Reproduced the issue from the forum with a 7.2 installation and masking
> all services as in the upgrade guide[0] before upgrading and with this
> patch the upgrade does not result in a broken dpkg state anymore
> 
> [0] https://pmg.proxmox.com/wiki/index.php/Upgrade_from_6.x_to_7.0
> 
>  debian/postinst | 6 +++---
>  debian/prerm    | 2 +-
>  2 files changed, 4 insertions(+), 4 deletions(-)
> 
>

applied, thanks!




      reply	other threads:[~2023-06-02  8:23 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-31 11:27 [pmg-devel] " Stoiko Ivanov
2023-06-02  8:23 ` Thomas Lamprecht [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=0953a0e5-c5c9-f8b0-c2be-e0766082e46b@proxmox.com \
    --to=t.lamprecht@proxmox.com \
    --cc=pmg-devel@lists.proxmox.com \
    --cc=s.ivanov@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