Error in Task: Creating Ceilometer MongoDB database

Bug #1641113 reported by magicboiz
18
This bug affects 4 people
Affects Status Importance Assigned to Milestone
kolla-ansible
Fix Released
Medium
Duong Ha-Quang
Ocata
Fix Released
Medium
Duong Ha-Quang
Pike
Fix Released
Medium
Duong Ha-Quang

Bug Description

This problem might be related with https://bugs.launchpad.net/kolla/+bug/1635322

It looks like field 'failed_when' has a problem in ansible/roles/ceilometer/tasks/bootstrap.yml

TASK [ceilometer : include] ****************************************************
skipping: [compute01] => {"changed": false, "skip_reason": "Conditional check failed", "skipped": true}
fatal: [control01]: FAILED! => {"failed": true, "reason": "ERROR! The field 'failed_when' is supposed to be a string type, however the incoming data structure is a <class 'ansible.parsing.yaml.objects.AnsibleSequence'>\n\nThe error appears to have been in '/usr/local/share/kolla/ansible/roles/ceilometer/tasks/bootstrap.yml': line 2, column 3, but may\nbe elsewhere in the file depending on the exact syntax problem.\n\nThe offending line appears to be:\n\n---\n- name: Creating Ceilometer MongoDB database\n ^ here\n"}

fatal: [control03]: FAILED! => {"failed": true, "reason": "ERROR! The field 'failed_when' is supposed to be a string type, however the incoming data structure is a <class 'ansible.parsing.yaml.objects.AnsibleSequence'>\n\nThe error appears to have been in '/usr/local/share/kolla/ansible/roles/ceilometer/tasks/bootstrap.yml': line 2, column 3, but may\nbe elsewhere in the file depending on the exact syntax problem.\n\nThe offending line appears to be:\n\n---\n- name: Creating Ceilometer MongoDB database\n ^ here\n"}

fatal: [control02]: FAILED! => {"failed": true, "reason": "ERROR! The field 'failed_when' is supposed to be a string type, however the incoming data structure is a <class 'ansible.parsing.yaml.objects.AnsibleSequence'>\n\nThe error appears to have been in '/usr/local/share/kolla/ansible/roles/ceilometer/tasks/bootstrap.yml': line 2, column 3, but may\nbe elsewhere in the file depending on the exact syntax problem.\n\nThe offending line appears to be:\n\n---\n- name: Creating Ceilometer MongoDB database\n ^ here\n"}

bootstrap.yml content:
---
- name: Creating Ceilometer MongoDB database
  command: docker exec -t mongodb mongo --host {{ ceilometer_database_mongodb_address }} --eval 'db = db.getSiblingDB("{{ ceilometer_database_name }}"); db.createUser({user':' "{{ ceilometer_database_user }}", pwd':' "{{ ceilometer_database_password}}", roles':' [ "readWrite", "dbAdmin" ]})'
  register: mongodb_ceilometer_database
  run_once: true
  failed_when:
    - "'already' not in mongodb_ceilometer_database.stdout"
    - mongodb_ceilometer_database.stdout.split()[4] != 'connecting'

Tags: kolla
Revision history for this message
prameswar (prameswar) wrote :

please pull latest master code. there was typo mistake( bug : https://bugs.launchpad.net/kolla/+bug/1640872 ) that change pushed to gerrit at https://review.openstack.org/#/c/396329/.

Changed in kolla:
status: New → Invalid
Revision history for this message
prameswar (prameswar) wrote :

if this issue still exist with latest master then comment . for now marking as invalid

Revision history for this message
magicboiz (magicboiz) wrote :

Hi

I'm working on master branch. I dont have that typo (mondo vs mongo) in my local files.

thx

prameswar (prameswar)
Changed in kolla:
status: Invalid → Confirmed
Revision history for this message
magicboiz (magicboiz) wrote :

Hi

this problem seems related with ansible bug: https://github.com/ansible/ansible/issues/18311

Revision history for this message
Javier Castillo (javcasalc) wrote :
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on kolla (master)

Change abandoned by Javier Castillo Alcíbar (<email address hidden>) on branch: master
Review: https://review.openstack.org/397729
Reason: moved to kolla-ansible repo

affects: kolla → kolla-ansible
Changed in kolla-ansible:
importance: Undecided → Medium
Revision history for this message
Javier Castillo (javcasalc) wrote :
Duong Ha-Quang (duonghq)
Changed in kolla-ansible:
assignee: nobody → Duong Ha-Quang (duonghq)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to kolla-ansible (master)

Fix proposed to branch: master
Review: https://review.openstack.org/437819

Changed in kolla-ansible:
status: Confirmed → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to kolla-ansible (master)

Reviewed: https://review.openstack.org/437819
Committed: https://git.openstack.org/cgit/openstack/kolla-ansible/commit/?id=2ade45e1c74cebbedf322fcf652f5d92c81d2d63
Submitter: Jenkins
Branch: master

commit 2ade45e1c74cebbedf322fcf652f5d92c81d2d63
Author: Duong Ha-Quang <email address hidden>
Date: Fri Feb 24 14:25:40 2017 +0700

    Fix Creating Ceilometer MongoDB database failed

    The check whether 'already' presents in mongodb output
    should belong to changed_when.

    Change-Id: Ib982a59820d53ccf5439f59df50c1b1938650967
    Closes-Bug: #1641113

Changed in kolla-ansible:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to kolla-ansible (stable/ocata)

Fix proposed to branch: stable/ocata
Review: https://review.openstack.org/439402

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to kolla-ansible (stable/ocata)

Reviewed: https://review.openstack.org/439402
Committed: https://git.openstack.org/cgit/openstack/kolla-ansible/commit/?id=9dc07857942accb487ee08e46379ca2671ee660e
Submitter: Jenkins
Branch: stable/ocata

commit 9dc07857942accb487ee08e46379ca2671ee660e
Author: Duong Ha-Quang <email address hidden>
Date: Fri Feb 24 14:25:40 2017 +0700

    Fix Creating Ceilometer MongoDB database failed

    The check whether 'already' presents in mongodb output
    should belong to changed_when.

    Change-Id: Ib982a59820d53ccf5439f59df50c1b1938650967
    Closes-Bug: #1641113
    (cherry picked from commit 2ade45e1c74cebbedf322fcf652f5d92c81d2d63)

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/kolla-ansible 4.0.0.0rc2

This issue was fixed in the openstack/kolla-ansible 4.0.0.0rc2 release candidate.

no longer affects: kolla
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/kolla-ansible 5.0.0.0b2

This issue was fixed in the openstack/kolla-ansible 5.0.0.0b2 development milestone.

Revision history for this message
Khawar Munir Abbasi (khawar426) wrote :

I am getting the following error in newton release 3.0.3

TASK [ceilometer : Ensuring the containers up] *********************************
fatal: [localhost]: FAILED! => {"failed": true, "msg": "ERROR! The conditional check 'container_state.Running == false' failed. The error was: ERROR! error while evaluating conditional (container_state.Running == false): ERROR! 'dict object' has no attribute 'Running'"}

I made the following modifications as mentioned in /usr/local/share/kolla/ansible/roles/ceilometer/tasks/bootstrap.yml and executed kolla-ansible deploy -i INVENTORY --tags ceilometer

  changed_when: "{{ 'already' not in mongodb_ceilometer_database.stdout }}"
  failed_when: "{{ mongodb_ceilometer_database.stdout.split()[4] != 'connecting' }}"

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on kolla-ansible (master)

Change abandoned by "Michal Nasiadka <email address hidden>" on branch: master
Review: https://review.opendev.org/c/openstack/kolla-ansible/+/398190
Reason: No updates since 2018

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.