From: Maximiliano Sandoval <m.sandoval@proxmox.com>
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 [thread overview]
Message-ID: <20260713070433.36620-2-m.sandoval@proxmox.com> (raw)
In-Reply-To: <20260713070433.36620-1-m.sandoval@proxmox.com>
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 <d.herzig@proxmox.com>
Reviewed-by: Kefu Chai <k.chai@proxmox.com>
Signed-off-by: Maximiliano Sandoval <m.sandoval@proxmox.com>
---
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
next prev parent reply other threads:[~2026-07-13 7:05 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-13 7:04 [PATCH manager v2 0/2] ceph: osd: stop running pvremove during cleanup Maximiliano Sandoval
2026-07-13 7:04 ` Maximiliano Sandoval [this message]
2026-07-13 7:04 ` [PATCH manager v2 2/2] " Maximiliano Sandoval
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=20260713070433.36620-2-m.sandoval@proxmox.com \
--to=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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox