Merge "Fix promote for Redis datastore"
This commit is contained in:
commit
1cb7dc7792
@ -122,9 +122,10 @@ class Manager(periodic_task.PeriodicTasks):
|
||||
persistence_dir = self._app.get_working_dir()
|
||||
self._perform_restore(backup_info, context, persistence_dir,
|
||||
self._app)
|
||||
else:
|
||||
self._app.restart()
|
||||
if snapshot:
|
||||
self.attach_replica(context, snapshot, snapshot['config'])
|
||||
self._app.restart()
|
||||
if cluster_config:
|
||||
self._app.status.set_status(
|
||||
rd_instance.ServiceStatuses.BUILD_PENDING)
|
||||
|
@ -66,6 +66,8 @@ class RedisSyncReplication(base.Replication):
|
||||
if master_passwd:
|
||||
connect_options['masterauth'] = master_passwd
|
||||
service.admin.config_set('masterauth', master_passwd)
|
||||
else:
|
||||
service.admin.config_set('masterauth', "")
|
||||
service.configuration_manager.apply_system_override(
|
||||
connect_options, change_id=self.CONF_LABEL_REPLICATION_SLAVE)
|
||||
service.admin.set_master(host=master_host, port=master_port)
|
||||
@ -75,7 +77,7 @@ class RedisSyncReplication(base.Replication):
|
||||
service.configuration_manager.remove_system_override(
|
||||
change_id=self.CONF_LABEL_REPLICATION_SLAVE)
|
||||
service.admin.set_master(host=None, port=None)
|
||||
service.admin.config_set('masterauth', None)
|
||||
service.admin.config_set('masterauth', "")
|
||||
return None
|
||||
|
||||
def cleanup_source_on_replica_detach(self, service, replica_info):
|
||||
|
Loading…
Reference in New Issue
Block a user