diff --git a/puppet-manifests/src/modules/platform/manifests/drbd.pp b/puppet-manifests/src/modules/platform/manifests/drbd.pp index c7f653f0e2..00696ff36a 100644 --- a/puppet-manifests/src/modules/platform/manifests/drbd.pp +++ b/puppet-manifests/src/modules/platform/manifests/drbd.pp @@ -259,13 +259,6 @@ class platform::drbd::extension ( mountpoint => $mountpoint, resync_after => $resync_after, } - - file { "${mountpoint}/ceph": - ensure => 'directory', - owner => 'root', - group => 'root', - mode => '0775', - } } class platform::drbd::patch_vault::params ( diff --git a/sysinv/sysinv/sysinv/sysinv/api/controllers/v1/storage_ceph_external.py b/sysinv/sysinv/sysinv/sysinv/api/controllers/v1/storage_ceph_external.py index 375babef2f..8ed71d1eea 100644 --- a/sysinv/sysinv/sysinv/sysinv/api/controllers/v1/storage_ceph_external.py +++ b/sysinv/sysinv/sysinv/sysinv/api/controllers/v1/storage_ceph_external.py @@ -291,7 +291,7 @@ class StorageCephExternalController(rest.RestController): LOG.exception(e) return dict( success="", - error=str(e)) + error=e.value) return dict(success="Success: ceph config file is uploaded", error="") @@ -311,7 +311,7 @@ def _check_and_update_services(storage_ceph_ext): if sb_list: for sb in sb_list: - if (sb.isystem_uuid != storage_ceph_ext.get("isystem_uuid", None) and + if (sb.uuid != storage_ceph_ext.get("uuid", None) and sb.backend in [constants.SB_TYPE_CEPH, constants.SB_TYPE_CEPH_EXTERNAL] and s in sb.get('services')): @@ -380,7 +380,7 @@ def _check_backend_ceph_external(storage_ceph_ext): backend_name = storage_ceph_ext.get('name') backend_list = pecan.request.dbapi.storage_backend_get_list() for backend in backend_list: - if backend.isystem_uuid != storage_ceph_ext.get("isystem_uuid", None): + if backend.uuid != storage_ceph_ext.get("uuid", None): if backend_name in constants.SB_DEFAULT_NAMES.values(): msg = _( "The \"%s\" name is reserved for internally managed " diff --git a/sysinv/sysinv/sysinv/sysinv/conductor/manager.py b/sysinv/sysinv/sysinv/sysinv/conductor/manager.py index 0729f6ce88..4b236703fd 100644 --- a/sysinv/sysinv/sysinv/sysinv/conductor/manager.py +++ b/sysinv/sysinv/sysinv/sysinv/conductor/manager.py @@ -9547,16 +9547,20 @@ class ConductorManager(service.PeriodicService): def store_ceph_external_config(self, context, contents, ceph_conf_filename): """Store the uploaded external ceph config file in /opt/platform/config """ - ## Once this directory is created at installation time, we can - ## remove this code. + # Once this directory is created at installation time, we can + # remove this code. if not os.path.exists(tsc.PLATFORM_CEPH_CONF_PATH): os.makedirs(tsc.PLATFORM_CEPH_CONF_PATH) opt_ceph_conf_file = os.path.join(tsc.PLATFORM_CEPH_CONF_PATH, ceph_conf_filename) + # Because user needs root permission to manually delete ceph config file + # from /opt/platform/config/version/ceph-config directory if the file + # already exists, we will allow ceph config file to be overwritten. + # Thus, we won't raise an exception if the file already exists. if os.path.exists(opt_ceph_conf_file): - raise exception.SysinvException(_( - "Same external ceph config file already exists.")) + LOG.info("Overwriting file %s in %s " % + (ceph_conf_filename, tsc.PLATFORM_CEPH_CONF_PATH)) try: with open(opt_ceph_conf_file, 'w+') as f: diff --git a/sysinv/sysinv/sysinv/sysinv/db/api.py b/sysinv/sysinv/sysinv/sysinv/db/api.py index 9445c3b8b8..cb53c69c6c 100644 --- a/sysinv/sysinv/sysinv/sysinv/db/api.py +++ b/sysinv/sysinv/sysinv/sysinv/db/api.py @@ -2546,7 +2546,7 @@ class Connection(object): :param stor_ceph_ext_id: The id or uuid of a ceph storage backend. :param values: Dict of values to update. { - 'ceph_conf': '/opt/extension/ceph/3p_ceph1.conf' + 'ceph_conf': '3p_ceph1.conf' } :returns: An external ceph storage backend. """