]> git.proxmox.com Git - pve-storage.git/commit - PVE/Storage/CephFSPlugin.pm
cephfs mount: reload systemd if existing unit gets regenerated
authorThomas Lamprecht <t.lamprecht@proxmox.com>
Wed, 29 Jan 2020 18:48:49 +0000 (19:48 +0100)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Wed, 29 Jan 2020 18:54:40 +0000 (19:54 +0100)
commit9a80a3eae0d397c1d6084e9cdd0533290fbf6a54
treeb06421a4f59d7fdab97ee12795f85231b6df8793
parent25e222ca0d96a0da0d491e749b437d2822215e9e
cephfs mount: reload systemd if existing unit gets regenerated

One the first write bringing the unit file in existence we can just
start it, after that we need to tell systemd that we want to actively
reload it.

While this is slightly shaky due to the fact that we do not check all
paths where such a unit could reside, it is something we can do
because earlier one couldn't have a unit/overwrite anyway (from
procfs mountinfo generated one do not support that) and does adding
such override ones from now on should work.

Also note that we can only get here in the "user does no weird stuff"
case when "cephfs_is_mounted" actively tells that there is no cephfs
mounted at the $mountpoint - at which time we can safely re-write the
potential updated unit file, reload and mount again.

So let's make our life a bit easier here until a user actually
complains about a rational issue for this, maybe we have PVE 7.0 then
and can get rid of that anyway :)

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
PVE/Storage/CephFSPlugin.pm