Missing Changed key in JSON output

Bug #1552405 reported by Prithiv on 2016-03-02
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
kolla
Critical
Sam Yaple

Bug Description

When running kolla-ansible deploy for master branch, the register.yaml executes the keystone_bootstrap.sh script. When the script fails, it doesnt report the failure because of the missing key 'changed' in the json output of keystone_bootstrap.sh. This happens with the master branch

fatal: [localhost] => Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/ansible/runner/__init__.py", line 586, in _executor
    exec_rc = self._executor_internal(host, new_stdin)
  File "/usr/local/lib/python2.7/dist-packages/ansible/runner/__init__.py", line 789, in _executor_internal
    return self._executor_internal_inner(host, self.module_name, self.module_args, inject, port, complex_args=complex_args)
  File "/usr/local/lib/python2.7/dist-packages/ansible/runner/__init__.py", line 1101, in _executor_internal_inner
    data['changed'] = utils.check_conditional(changed_when, self.basedir, inject, fail_on_undefined=self.error_on_undefined_vars)
  File "/usr/local/lib/python2.7/dist-packages/ansible/utils/__init__.py", line 265, in check_conditional
    conditional = template.template(basedir, conditional, inject, fail_on_undefined=fail_on_undefined)
  File "/usr/local/lib/python2.7/dist-packages/ansible/utils/template.py", line 124, in template
    varname = template_from_string(basedir, varname, templatevars, fail_on_undefined)
  File "/usr/local/lib/python2.7/dist-packages/ansible/utils/template.py", line 382, in template_from_string
    res = jinja2.utils.concat(rf)
  File "<template>", line 9, in root
  File "/usr/local/lib/python2.7/dist-packages/jinja2/runtime.py", line 489, in _fail_with_undefined_error
    raise self._undefined_exception(hint)
UndefinedError: 'dict object' has no attribute 'changed'

Prithiv (prithiv) on 2016-03-02
Changed in kolla:
assignee: nobody → Prithiv (prithiv)
Prithiv (prithiv) on 2016-03-02
Changed in kolla:
importance: Undecided → Low

Change abandoned by Martin André (<email address hidden>) on branch: master
Review: https://review.openstack.org/287621
Reason: Just noticed on IRC prithiv (who reported the bug) wants to fix it himself. Let's guide him for his first commit to OpenStack.

Sam Yaple (s8m) wrote :

This became a critical bug so i am restoring my orignal patch prithiv. We need it merged sooner rather than later

Changed in kolla:
importance: Low → Critical
assignee: Prithiv (prithiv) → Sam Yaple (s8m)
Sam Yaple (s8m) wrote :
Changed in kolla:
status: New → In Progress
Steven Dake (sdake) on 2016-03-03
Changed in kolla:
milestone: none → mitaka-3

Reviewed: https://review.openstack.org/287429
Committed: https://git.openstack.org/cgit/openstack/kolla/commit/?id=69c33ce2fee3ff6128d3d65c63936441353d568b
Submitter: Jenkins
Branch: master

commit 69c33ce2fee3ff6128d3d65c63936441353d568b
Author: SamYaple <email address hidden>
Date: Wed Mar 2 20:46:00 2016 +0000

    When ansible fails it still reads chaged key

    Add changed key failure as well.
    Closes-Bug: #1552405

    Change-Id: Ic25a57ba20928bee136932cc422713e76dcbe2a1

Changed in kolla:
status: In Progress → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers