Skip to content

Commit

Permalink
Changed to log the error as info if profile flag setting errors out
Browse files Browse the repository at this point in the history
In case profiling is already enabled for a volume, enable command
fails for the same. In the flow these are logged as errors in task.
Changed the logic to log the messages and info as its actually not
a failure.

tendrl-bug-id: Tendrl#631
Bugzilla-id: https://bugzilla.redhat.com/1577228
Signed-off-by: Shubhendu <[email protected]>
  • Loading branch information
Shubhendu committed May 14, 2018
1 parent 2e5b1a9 commit 3dcfde2
Showing 1 changed file with 5 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -60,11 +60,12 @@ def run(self):
).run()
if err != "" or rc != 0:
logger.log(
"error",
"info",
NS.publisher_id,
{
"message": "%s profiling failed for volume: %s" %
(action, volume.name)
"message": "%s profiling failed for volume: %s."
" Error: %s" %
(action, volume.name, err)
},
job_id=self.parameters["job_id"],
flow_id=self.parameters["flow_id"]
Expand All @@ -78,7 +79,7 @@ def run(self):
volume.save()
if len(failed_vols) > 0:
logger.log(
"error",
"info",
NS.publisher_id,
{
"message": "%s profiling failed for "
Expand Down

0 comments on commit 3dcfde2

Please sign in to comment.