From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from gate001.proxmox.com (gate001.proxmox.com [45.144.208.40]) by lore.proxmox.com (Postfix) with ESMTPS id 9BE7F1FF0F1 for ; Mon, 13 Jul 2026 09:05:09 +0200 (CEST) Received: from gate001.proxmox.com (localhost.localdomain [127.0.0.1]) by gate001.proxmox.com (Proxmox) with ESMTP id 7875D21353; Mon, 13 Jul 2026 09:05:09 +0200 (CEST) From: Maximiliano Sandoval To: pve-devel@lists.proxmox.com Subject: [PATCH manager v2 1/2] ceph: osd: stop triggering udev Date: Mon, 13 Jul 2026 09:04:31 +0200 Message-ID: <20260713070433.36620-2-m.sandoval@proxmox.com> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20260713070433.36620-1-m.sandoval@proxmox.com> References: <20260713070433.36620-1-m.sandoval@proxmox.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Bm-Milter-Handled: 55990f41-d878-4baa-be0a-ee34c49e34d2 X-Bm-Transport-Timestamp: 1783926259410 X-SPAM-LEVEL: Spam detection results: 0 AWL 0.350 Adjusted score from AWL reputation of From: address DMARC_MISSING 0.1 Missing DMARC policy KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment (newer systems) RCVD_IN_DNSWL_LOW -0.7 Sender listed at https://www.dnswl.org/, low trust SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record Message-ID-Hash: RDMZZO5S6HWRMOYLIMEIRLG5XNU6P5TT X-Message-ID-Hash: RDMZZO5S6HWRMOYLIMEIRLG5XNU6P5TT X-MailFrom: m.sandoval@proxmox.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; loop; banned-address; emergency; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.10 Precedence: list List-Id: Proxmox VE development discussion List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: As per the FIXME note, this was a workaround for #18525 which was fixed in [#18904] and packaged in all versions since 249.1. We remove the workaround for the createosd and destroyosd endpoints. [#18904] https://github.com/systemd/systemd/pull/18904 Tested-by: Daniel Herzig Reviewed-by: Kefu Chai Signed-off-by: Maximiliano Sandoval --- PVE/API2/Ceph/OSD.pm | 29 ----------------------------- 1 file changed, 29 deletions(-) diff --git a/PVE/API2/Ceph/OSD.pm b/PVE/API2/Ceph/OSD.pm index 7c6046eef..eac913207 100644 --- a/PVE/API2/Ceph/OSD.pm +++ b/PVE/API2/Ceph/OSD.pm @@ -424,9 +424,6 @@ __PACKAGE__->register_method({ file_set_contents($ceph_bootstrap_osd_keyring, $bindata); } - # See FIXME below - my @udev_trigger_devs = (); - # $size is in kibibytes my $osd_lvcreate = sub { my ($vg, $lv, $size) = @_; @@ -477,8 +474,6 @@ __PACKAGE__->register_method({ warn $@ if $@; } - push @udev_trigger_devs, $dev->{devpath}; - return "$vg/$lv"; } elsif ($dev->{used} eq 'LVM') { @@ -520,7 +515,6 @@ __PACKAGE__->register_method({ warn $@ if $@; } - push @udev_trigger_devs, $part; return $part; } @@ -546,8 +540,6 @@ __PACKAGE__->register_method({ my $devpath = $disklist->{$devname}->{devpath}; print "create OSD on $devpath (bluestore)\n"; - push @udev_trigger_devs, $devpath; - my $osd_size = $disklist->{$devname}->{size}; my $size_map = { db => int($osd_size / 10), # 10% of OSD @@ -593,12 +585,6 @@ __PACKAGE__->register_method({ } run_command($cmd); - - # FIXME: Remove once we depend on systemd >= v249. - # Work around udev bug https://github.com/systemd/systemd/issues/18525 to ensure the - # udev database is updated. - eval { run_command(['udevadm', 'trigger', @udev_trigger_devs]); }; - warn $@ if $@; }); }; @@ -1084,9 +1070,6 @@ __PACKAGE__->register_method({ # try to unmount from standard mount point my $mountpoint = "/var/lib/ceph/osd/ceph-$osdid"; - # See FIXME below - my $udev_trigger_devs = {}; - my $remove_partition = sub { my ($part) = @_; @@ -1094,8 +1077,6 @@ __PACKAGE__->register_method({ my $partnum = PVE::Diskmanage::get_partnum($part); my $devpath = PVE::Diskmanage::get_blockdev($part); - $udev_trigger_devs->{$devpath} = 1; - PVE::Diskmanage::wipe_blockdev($part); print "remove partition $part (disk '${devpath}', partnum $partnum)\n"; eval { run_command(['/sbin/sgdisk', '-d', $partnum, "${devpath}"]); }; @@ -1119,8 +1100,6 @@ __PACKAGE__->register_method({ run_command(['/sbin/pvremove', $dev], errfunc => sub { }); }; warn $@ if $@; - - $udev_trigger_devs->{$dev} = 1; } } } @@ -1159,14 +1138,6 @@ __PACKAGE__->register_method({ } } } - - # FIXME: Remove once we depend on systemd >= v249. - # Work around udev bug https://github.com/systemd/systemd/issues/18525 to ensure the - # udev database is updated. - if ($cleanup) { - eval { run_command(['udevadm', 'trigger', keys $udev_trigger_devs->%*]); }; - warn $@ if $@; - } }; return $rpcenv->fork_worker('cephdestroyosd', $osdsection, $authuser, $worker); -- 2.47.3