diff options
| author | Jenkins <jenkins@review.openstack.org> | 2016-05-31 13:59:32 +0000 |
|---|---|---|
| committer | Gerrit Code Review <review@openstack.org> | 2016-05-31 13:59:33 +0000 |
| commit | ca6cf5bfd1cf23c63705caf93b70514f8d30b550 (patch) | |
| tree | 1c871d133b32debcf9acdb313e7d20651d38ab98 /docker | |
| parent | 430e79b35b2a8f2a0aa78d8a577cb4cea76464ba (diff) | |
| parent | 476da0f43acda64f660427cc0457b1fffaf4c0b7 (diff) | |
| download | kolla-ca6cf5bfd1cf23c63705caf93b70514f8d30b550.tar.gz kolla-ca6cf5bfd1cf23c63705caf93b70514f8d30b550.zip | |
Merge "Log the traceback in the kolla libraries"
Diffstat (limited to 'docker')
| -rw-r--r-- | docker/kolla-toolbox/kolla_keystone_service.py | 7 | ||||
| -rw-r--r-- | docker/kolla-toolbox/kolla_keystone_user.py | 7 | ||||
| -rw-r--r-- | docker/kolla-toolbox/kolla_sanity.py | 7 | ||||
| -rw-r--r-- | docker/kolla-toolbox/kolla_zookeeper.py | 6 |
4 files changed, 19 insertions, 8 deletions
diff --git a/docker/kolla-toolbox/kolla_keystone_service.py b/docker/kolla-toolbox/kolla_keystone_service.py index bc06fd61f..9559c3dbc 100644 --- a/docker/kolla-toolbox/kolla_keystone_service.py +++ b/docker/kolla-toolbox/kolla_keystone_service.py @@ -22,6 +22,8 @@ # in upstream shade we will be able to use more of the shade module. Until then # if we want to be 'stable' we really need to be using it as a passthrough +import traceback + import shade @@ -74,8 +76,9 @@ def main(): region=endpoint_region) module.exit_json(changed=changed) - except Exception as e: - module.exit_json(failed=True, changed=True, msg=e) + except Exception: + module.exit_json(failed=True, changed=True, + msg=repr(traceback.format_exc())) # import module snippets from ansible.module_utils.basic import * # noqa diff --git a/docker/kolla-toolbox/kolla_keystone_user.py b/docker/kolla-toolbox/kolla_keystone_user.py index 789019788..d8af461ae 100644 --- a/docker/kolla-toolbox/kolla_keystone_user.py +++ b/docker/kolla-toolbox/kolla_keystone_user.py @@ -22,6 +22,8 @@ # in upstream shade we will be able to use more of the shade module. Until then # if we want to be 'stable' we really need to be using it as a passthrough +import traceback + import shade @@ -78,8 +80,9 @@ def main(): project=project) module.exit_json(changed=changed) - except Exception as e: - module.exit_json(failed=True, changed=True, msg=e) + except Exception: + module.exit_json(failed=True, changed=True, + msg=repr(traceback.format_exc())) # import module snippets from ansible.module_utils.basic import * # noqa diff --git a/docker/kolla-toolbox/kolla_sanity.py b/docker/kolla-toolbox/kolla_sanity.py index 167663dec..c13854e9f 100644 --- a/docker/kolla-toolbox/kolla_sanity.py +++ b/docker/kolla-toolbox/kolla_sanity.py @@ -22,6 +22,8 @@ # in upstream shade we will be able to use more of the shade module. Until then # if we want to be 'stable' we really need to be using it as a passthrough +import traceback + import shade @@ -61,8 +63,9 @@ def main(): getattr(SanityChecks, module.params.pop("service"))(cloud) module.exit_json(changed=changed) - except Exception as e: - module.exit_json(failed=True, changed=True, msg=e) + except Exception: + module.exit_json(failed=True, changed=True, + msg=repr(traceback.format_exc())) # import module snippets from ansible.module_utils.basic import * # noqa diff --git a/docker/kolla-toolbox/kolla_zookeeper.py b/docker/kolla-toolbox/kolla_zookeeper.py index d6326f46a..3142c0f5a 100644 --- a/docker/kolla-toolbox/kolla_zookeeper.py +++ b/docker/kolla-toolbox/kolla_zookeeper.py @@ -15,6 +15,7 @@ # under the License. import contextlib +import traceback import kazoo.client import kazoo.exceptions @@ -56,8 +57,9 @@ def main(): changed = True module.exit_json(changed=changed) - except Exception as e: - module.exit_json(failed=True, changed=True, msg=e) + except Exception: + module.exit_json(failed=True, changed=True, + msg=repr(traceback.format_exc())) # import module snippets |
