Merge "Handle log message interpolation by the logger in cluster/"
This commit is contained in:
commit
bc49fd25b2
@ -147,11 +147,11 @@ class Cluster(object):
|
||||
self.db_info.save()
|
||||
|
||||
def reset_task(self):
|
||||
LOG.info(_("Setting task to NONE on cluster %s") % self.id)
|
||||
LOG.info(_("Setting task to NONE on cluster %s"), self.id)
|
||||
self.update_db(task_status=ClusterTasks.NONE)
|
||||
|
||||
def reset_status(self):
|
||||
LOG.info(_("Resetting status to NONE on cluster %s") % self.id)
|
||||
LOG.info(_("Resetting status to NONE on cluster %s"), self.id)
|
||||
self.reset_task()
|
||||
instances = inst_models.DBInstance.find_all(cluster_id=self.id,
|
||||
deleted=False).all()
|
||||
@ -389,7 +389,7 @@ class Cluster(object):
|
||||
|
||||
def rolling_upgrade(self, datastore_version):
|
||||
"""Upgrades a cluster to a new datastore version."""
|
||||
LOG.debug("Upgrading cluster %s." % self.id)
|
||||
LOG.debug("Upgrading cluster %s.", self.id)
|
||||
|
||||
self.validate_cluster_available()
|
||||
self.db_info.update(task_status=ClusterTasks.UPGRADING_CLUSTER)
|
||||
@ -443,8 +443,9 @@ class Cluster(object):
|
||||
instance.save_configuration(configuration)
|
||||
else:
|
||||
LOG.debug(
|
||||
"Node '%s' already has the configuration '%s' "
|
||||
"attached." % (instance.id, configuration_id))
|
||||
"Node '%(inst_id)s' already has the configuration "
|
||||
"'%(conf_id)s' attached.",
|
||||
{'inst_id': instance.id, 'conf_id': configuration_id})
|
||||
|
||||
# Configuration has been persisted to all instances.
|
||||
# The cluster is in a consistent state with all nodes
|
||||
@ -501,8 +502,8 @@ class Cluster(object):
|
||||
instance.delete_configuration()
|
||||
else:
|
||||
LOG.debug(
|
||||
"Node '%s' has no configuration attached."
|
||||
% instance.id)
|
||||
"Node '%s' has no configuration attached.",
|
||||
instance.id)
|
||||
|
||||
# The cluster is in a consistent state with all nodes
|
||||
# requiring restart.
|
||||
|
@ -60,7 +60,7 @@ class ClusterController(wsgi.Controller):
|
||||
def action(self, req, body, tenant_id, id):
|
||||
LOG.debug(("Committing Action Against Cluster for "
|
||||
"Tenant '%(tenant_id)s'\n"
|
||||
"req : '%(req)s'\n\nid : '%(id)s'\n\n") %
|
||||
"req : '%(req)s'\n\nid : '%(id)s'\n\n"),
|
||||
{"req": req, "id": id, "tenant_id": tenant_id})
|
||||
if not body:
|
||||
raise exception.BadRequest(_("Invalid request body."))
|
||||
@ -88,7 +88,7 @@ class ClusterController(wsgi.Controller):
|
||||
def show(self, req, tenant_id, id):
|
||||
"""Return a single cluster."""
|
||||
LOG.debug(("Showing a Cluster for Tenant '%(tenant_id)s'\n"
|
||||
"req : '%(req)s'\n\nid : '%(id)s'\n\n") %
|
||||
"req : '%(req)s'\n\nid : '%(id)s'\n\n"),
|
||||
{"req": req, "id": id, "tenant_id": tenant_id})
|
||||
|
||||
context = req.environ[wsgi.CONTEXT_KEY]
|
||||
@ -102,7 +102,7 @@ class ClusterController(wsgi.Controller):
|
||||
"'%(tenant_id)s'\n"
|
||||
"req : '%(req)s'\n\n"
|
||||
"cluster_id : '%(cluster_id)s'\n\n"
|
||||
"instance_id : '%(instance_id)s;\n\n") %
|
||||
"instance_id : '%(instance_id)s;\n\n"),
|
||||
{"req": req, "tenant_id": tenant_id,
|
||||
"cluster_id": cluster_id,
|
||||
"instance_id": instance_id})
|
||||
@ -118,7 +118,7 @@ class ClusterController(wsgi.Controller):
|
||||
def delete(self, req, tenant_id, id):
|
||||
"""Delete a cluster."""
|
||||
LOG.debug(("Deleting a Cluster for Tenant '%(tenant_id)s'\n"
|
||||
"req : '%(req)s'\n\nid : '%(id)s'\n\n") %
|
||||
"req : '%(req)s'\n\nid : '%(id)s'\n\n"),
|
||||
{"req": req, "id": id, "tenant_id": tenant_id})
|
||||
|
||||
context = req.environ[wsgi.CONTEXT_KEY]
|
||||
@ -133,8 +133,8 @@ class ClusterController(wsgi.Controller):
|
||||
def index(self, req, tenant_id):
|
||||
"""Return a list of clusters."""
|
||||
LOG.debug(("Showing a list of clusters for Tenant '%(tenant_id)s'\n"
|
||||
"req : '%(req)s'\n\n") % {"req": req,
|
||||
"tenant_id": tenant_id})
|
||||
"req : '%(req)s'\n\n"), {"req": req,
|
||||
"tenant_id": tenant_id})
|
||||
|
||||
context = req.environ[wsgi.CONTEXT_KEY]
|
||||
|
||||
@ -159,7 +159,7 @@ class ClusterController(wsgi.Controller):
|
||||
|
||||
def create(self, req, body, tenant_id):
|
||||
LOG.debug(("Creating a Cluster for Tenant '%(tenant_id)s'\n"
|
||||
"req : '%(req)s'\n\nbody : '%(body)s'\n\n") %
|
||||
"req : '%(req)s'\n\nbody : '%(body)s'\n\n"),
|
||||
{"tenant_id": tenant_id, "req": req, "body": body})
|
||||
|
||||
context = req.environ[wsgi.CONTEXT_KEY]
|
||||
|
Loading…
x
Reference in New Issue
Block a user