mirror of
https://github.com/ceph/ceph
synced 2025-01-10 13:10:46 +00:00
mgr/cephadm: make 'host add' idempotent
Do not let prime_empty_host blow away inventory. Signed-off-by: Sage Weil <sage@newdream.net>
This commit is contained in:
parent
2f2c997652
commit
a8acc354dc
@ -1409,8 +1409,9 @@ Then run the following:
|
||||
'args': [f'{k}={v}' for k, v in spec.location.items()],
|
||||
})
|
||||
|
||||
if spec.hostname not in self.inventory:
|
||||
self.cache.prime_empty_host(spec.hostname)
|
||||
self.inventory.add_host(spec)
|
||||
self.cache.prime_empty_host(spec.hostname)
|
||||
self.offline_hosts_remove(spec.hostname)
|
||||
self.event.set() # refresh stray health check
|
||||
self.log.info('Added host %s' % spec.hostname)
|
||||
|
Loading…
Reference in New Issue
Block a user