Skip to content

Commit

Permalink
Improving un-manage log messages
Browse files Browse the repository at this point in the history
bugzilla: 1645221
tendrl-bug-id: Tendrl#1078

Signed-off-by: GowthamShanmugasundaram <[email protected]>
  • Loading branch information
GowthamShanmugam committed May 14, 2019
1 parent 0ede4e7 commit b8171ca
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 15 deletions.
2 changes: 1 addition & 1 deletion tendrl/commons/flows/unmanage_cluster/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ def run(self):
"(job_id: %s) (integration_id: %s) " %
(
_cluster.current_job['job_id'],
_cluster.integration_id
_cluster.short_name
)
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,20 +10,20 @@ def __init__(self, *args, **kwargs):

def run(self):
integration_id = self.parameters['TendrlContext.integration_id']
logger.log(
"info",
NS.get("publisher_id", None),
{
"message": "Setting cluster %s is_managed to \"no\":" %
integration_id
},
job_id=self.parameters['job_id'],
flow_id=self.parameters['flow_id']
)
try:
_cluster = NS.tendrl.objects.Cluster(
integration_id=integration_id
).load()
logger.log(
"info",
NS.get("publisher_id", None),
{
"message": "Setting cluster %s is_managed to \"no\":" %
_cluster.short_name
},
job_id=self.parameters['job_id'],
flow_id=self.parameters['flow_id']
)
_cluster.is_managed = "no"
_cluster.save()
except etcd.EtcdKeyNotFound:
Expand Down
8 changes: 4 additions & 4 deletions tendrl/commons/objects/node/flows/stop_services/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ def run(self):
NS.publisher_id,
{
"message": "Stopping service %s on node %s" %
(service, NS.node_context.node_id)
(service, NS.node_context.fqdn)
},
job_id=self.parameters['job_id'],
flow_id=self.parameters['flow_id'],
Expand All @@ -39,7 +39,7 @@ def run(self):
NS.publisher_id,
{
"message": "%s not running on "
"%s" % (service, NS.node_context.node_id)
"%s" % (service, NS.node_context.fqdn)
},
job_id=self.parameters['job_id'],
flow_id=self.parameters['flow_id'],
Expand All @@ -57,7 +57,7 @@ def run(self):
"message": "Could not stop %s"
" service on %s. Error: %s" % (
service,
NS.node_context.node_id,
NS.node_context.fqdn,
err
)
},
Expand All @@ -76,7 +76,7 @@ def run(self):
"message": "Could not disable %s"
" service on %s. Error: %s" % (
service,
NS.node_context.node_id,
NS.node_context.fqdn,
err
)
},
Expand Down

0 comments on commit b8171ca

Please sign in to comment.