Browse Source

Improve log message for better understanding

Sometimes designate central could not update the Pool configuration.
Very limited information is logged into the designate central logs
through which we can not find the root cause of failure.
This patch adds some more information into the log for better
understanding.

Change-Id: I26d36c15406436bb3b733d44c490a14e5ece39a6
Closes-Bug: 1835407
(cherry picked from commit e70af61dac)
changes/94/673394/1
Takahito Hirose 2 months ago
parent
commit
eb6abf7dbd
1 changed files with 4 additions and 3 deletions
  1. 4
    3
      designate/manage/pool.py

+ 4
- 3
designate/manage/pool.py View File

@@ -134,9 +134,10 @@ class PoolCommands(base.Commands):
134 134
                     try:
135 135
                         pool = self.central_api.get_pool(
136 136
                             self.context, xpool['id'])
137
-                    except Exception:
138
-                        LOG.critical("Bad ID Supplied for pool %s",
139
-                                     xpool['name'])
137
+                    except Exception as e:
138
+                        msg = ("Bad ID Supplied for pool. pool_id: "
139
+                            "%(pool)s message: %(res)s")
140
+                        LOG.critical(msg, {'pool': xpool['id'], 'res': e})
140 141
                         continue
141 142
                 else:
142 143
                     pool = self.central_api.find_pool(

Loading…
Cancel
Save