diff --git a/bin/pve-init-ceph-crash b/bin/pve-init-ceph-crash index 89170b2e5..4ec95a2de 100755 --- a/bin/pve-init-ceph-crash +++ b/bin/pve-init-ceph-crash @@ -66,6 +66,14 @@ sub main { 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(); }; diff --git a/debian/postinst b/debian/postinst index d3ca13be2..c97c4fdbe 100755 --- a/debian/postinst +++ b/debian/postinst @@ -81,13 +81,8 @@ EOF } 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