From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from firstgate.proxmox.com (firstgate.proxmox.com [212.224.123.68]) by lore.proxmox.com (Postfix) with ESMTPS id 3513E1FF137 for ; Tue, 17 Mar 2026 13:34:05 +0100 (CET) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id 606BAC988; Tue, 17 Mar 2026 13:34:18 +0100 (CET) From: Maximiliano Sandoval To: pve-devel@lists.proxmox.com Subject: [PATCH manager 1/2] ceph: osd: stop triggering udev Date: Tue, 17 Mar 2026 13:33:39 +0100 Message-ID: <20260317123343.299525-2-m.sandoval@proxmox.com> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20260317123343.299525-1-m.sandoval@proxmox.com> References: <20260317123343.299525-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: 1773750782689 X-SPAM-LEVEL: Spam detection results: 0 AWL -0.944 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% DMARC_MISSING 0.1 Missing DMARC policy KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment RCVD_IN_VALIDITY_CERTIFIED_BLOCKED 0.408 ADMINISTRATOR NOTICE: The query to Validity was blocked. See https://knowledge.validity.com/hc/en-us/articles/20961730681243 for more information. RCVD_IN_VALIDITY_RPBL_BLOCKED 0.819 ADMINISTRATOR NOTICE: The query to Validity was blocked. See https://knowledge.validity.com/hc/en-us/articles/20961730681243 for more information. RCVD_IN_VALIDITY_SAFE_BLOCKED 0.903 ADMINISTRATOR NOTICE: The query to Validity was blocked. See https://knowledge.validity.com/hc/en-us/articles/20961730681243 for more information. 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: HMIBI5TZTUGIU74POOMUWNN7ALPX26TI X-Message-ID-Hash: HMIBI5TZTUGIU74POOMUWNN7ALPX26TI 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 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 dce519a5..a0768dc0 100644 --- a/PVE/API2/Ceph/OSD.pm +++ b/PVE/API2/Ceph/OSD.pm @@ -418,9 +418,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) = @_; @@ -471,8 +468,6 @@ __PACKAGE__->register_method({ warn $@ if $@; } - push @udev_trigger_devs, $dev->{devpath}; - return "$vg/$lv"; } elsif ($dev->{used} eq 'LVM') { @@ -514,7 +509,6 @@ __PACKAGE__->register_method({ warn $@ if $@; } - push @udev_trigger_devs, $part; return $part; } @@ -540,8 +534,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 @@ -587,12 +579,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 $@; }); }; @@ -1043,9 +1029,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) = @_; @@ -1053,8 +1036,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}"]); }; @@ -1078,8 +1059,6 @@ __PACKAGE__->register_method({ run_command(['/sbin/pvremove', $dev], errfunc => sub { }); }; warn $@ if $@; - - $udev_trigger_devs->{$dev} = 1; } } } @@ -1118,14 +1097,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