[pve-devel] [PATCH V2 pve-manager 1/3] Add check if ceph is managed by systemd
Wolfgang Link
w.link at proxmox.com
Tue Jun 7 13:24:05 CEST 2016
Ceph is managed since version infernalis by systemd and use ceph as user and group.
---
PVE/CephTools.pm | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/PVE/CephTools.pm b/PVE/CephTools.pm
index c7749bb..ddf4777 100644
--- a/PVE/CephTools.pm
+++ b/PVE/CephTools.pm
@@ -353,4 +353,15 @@ sub list_disks {
return $disklist;
}
+#Ceph version greater Hammer you ceph as user and group instead of root
+#and it is also systemd managed.
+sub systemd_managed {
+
+ if (-f "/lib/systemd/system/ceph-osd at .service") {
+ return 1;
+ } else {
+ return undef;
+ }
+}
+
1;
--
2.1.4
More information about the pve-devel
mailing list