Merge "Delete ceph-mon when sysinv system delete host"
This commit is contained in:
commit
46059b70b5
|
@ -1541,3 +1541,13 @@ class CephOperator(object):
|
|||
'Reason: %(reason)s') % {
|
||||
'pool_name': pool['pool_name'],
|
||||
'reason': str(e.message)})
|
||||
|
||||
def remove_ceph_monitor(self, hostname, timeout=None):
|
||||
try:
|
||||
response, body = self._ceph_api.mon_remove(hostname, body='json',
|
||||
timeout=timeout)
|
||||
if not response.ok:
|
||||
LOG.error("Remove monitor error reponse: {} {}"
|
||||
.format(response, body))
|
||||
except Exception as e:
|
||||
LOG.error("Exception in removing monitor: {}".format(e))
|
||||
|
|
|
@ -1406,6 +1406,7 @@ class ConductorManager(service.PeriodicService):
|
|||
LOG.info("Deleting ceph monitor for host %s"
|
||||
% str(host.hostname))
|
||||
self.dbapi.ceph_mon_destroy(mon[0].uuid)
|
||||
self._ceph.remove_ceph_monitor(host.hostname)
|
||||
else:
|
||||
LOG.info("No ceph monitor present for host %s. "
|
||||
"Skipping deleting ceph monitor."
|
||||
|
|
Loading…
Reference in New Issue