and guard it to only run on ceph-using systems (the regular 'inited' check
doesn't work as a guard for this, because it checks for new-style inits
including the dir existing).
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
exit 0;
}
+ my $ceph_cfg_path = PVE::Ceph::Tools::get_config('pve_ceph_cfgpath');
+ if (PVE::Ceph::Tools::check_ceph_installed('ceph_mon', 1) && -f $ceph_cfg_path) {
+ my $pve_ceph_cfgdir = PVE::Ceph::Tools::get_config('pve_ceph_cfgdir');
+ if (! -d $pve_ceph_cfgdir) {
+ File::Path::make_path($pve_ceph_cfgdir);
+ }
+ }
+
eval {
PVE::Ceph::Tools::check_ceph_inited();
};
}
update_ceph_conf() {
- CEPH_CONF_DIR='/etc/pve/ceph'
UNIT='ceph-crash.service'
- if test ! -d "${CEPH_CONF_DIR}"; then
- mkdir -p "${CEPH_CONF_DIR}"
- fi
-
# Don't fail in case user has "exotic" configuration where RADOS
# isn't available on all nodes for some reason
/usr/share/pve-manager/helpers/pve-init-ceph-crash || true