all lists on lists.proxmox.com
 help / color / mirror / Atom feed
From: Daniel Herzig <d.herzig@proxmox.com>
To: Maximiliano Sandoval <m.sandoval@proxmox.com>,
	pve-devel@lists.proxmox.com
Subject: Re: [PATCH manager 2/2] ceph: osd: stop running pveremove during cleanup
Date: Wed, 18 Mar 2026 13:19:30 +0100	[thread overview]
Message-ID: <f02c376c-7460-491d-9919-2e3c51ef0514@proxmox.com> (raw)
In-Reply-To: <20260317123343.299525-3-m.sandoval@proxmox.com>

Thanks for this!

I just tested the patched package on a 9.1.6 cluster with ceph-19.2.3 [0].

I tested the sequence:
+ `ceph osd out <ID>`

+ `ceph osd ok-to-stop <ID>` (until OK)

+ `pveceph stop --service osd.<ID>`

+ `pveceph osd destroy <ID> --cleanup

Formerly, this yielded a confusing last message from `pvremove`, caused 
by the PV already having been deleted by `ceph-volume lvm zap --osd-id 
<ID> --destroy` [1]. This is gone now, and should provide a much nicer UX.

[0] on no-subscription I needed to install libpve-common-perl 9.1.8 
prior to the patched pve-manager package.

[1] "command '/sbin/pvremove <PV>' failed: exit code 5"

Tested-by: Daniel Herzig <d.herzig@proxmox.com>

On 3/17/26 1:33 PM, Maximiliano Sandoval wrote:
> Since [7f007e7fc] ceph will call pvremove while zapping the OSD. Thus we
> remove our pvremove call in order to avoid failing to remove an already
> removed PV.
>
> The aforementioned commit is included in all versions since Reef which
> is the oldest supported version in Proxmox VE 9.
>
> [7f007e7fc] https://github.com/ceph/ceph/commit/7f007e7fc75b4d6e7465c684f7e5b2458883dcc5
>
> Suggested-by: Fiona Ebner <f.ebner@proxmox.com>
> Signed-off-by: Maximiliano Sandoval <m.sandoval@proxmox.com>
> ---
>   PVE/API2/Ceph/OSD.pm | 14 --------------
>   1 file changed, 14 deletions(-)
>
> diff --git a/PVE/API2/Ceph/OSD.pm b/PVE/API2/Ceph/OSD.pm
> index a0768dc0..28f631ca 100644
> --- a/PVE/API2/Ceph/OSD.pm
> +++ b/PVE/API2/Ceph/OSD.pm
> @@ -1048,20 +1048,6 @@ __PACKAGE__->register_method({
>   
>                   eval { PVE::Ceph::Tools::ceph_volume_zap($osdid, $cleanup) };
>                   warn $@ if $@;
> -
> -                if ($cleanup) {
> -                    # try to remove pvs, but do not fail if it does not work
> -                    for my $osd_part (@{ $osd_list->{$osdid} }) {
> -                        for my $dev (@{ $osd_part->{devices} }) {
> -                            ($dev) = ($dev =~ m|^(/dev/[-_.a-zA-Z0-9\/]+)$|); #untaint
> -
> -                            eval {
> -                                run_command(['/sbin/pvremove', $dev], errfunc => sub { });
> -                            };
> -                            warn $@ if $@;
> -                        }
> -                    }
> -                }
>               } else {
>                   my $partitions_to_remove = [];
>                   if ($cleanup) {




      reply	other threads:[~2026-03-18 12:19 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-17 12:33 [PATCH manager 0/2] " Maximiliano Sandoval
2026-03-17 12:33 ` [PATCH manager 1/2] ceph: osd: stop triggering udev Maximiliano Sandoval
2026-03-17 12:33 ` [PATCH manager 2/2] ceph: osd: stop running pveremove during cleanup Maximiliano Sandoval
2026-03-18 12:19   ` Daniel Herzig [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=f02c376c-7460-491d-9919-2e3c51ef0514@proxmox.com \
    --to=d.herzig@proxmox.com \
    --cc=m.sandoval@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.
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal