Keystone deploy and genconfig fails in check mode

Bug #2002661 reported by Mark Goddard
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
kolla-ansible
Fix Released
Medium
Unassigned

Bug Description

# Steps to reproduce

kolla-ansible deploy --check

or

kolla-ansible genconfig --check

# Expected results

The command succeeds.

# Actual results

Deployment or configuration generation fails with the following:

TASK [keystone : Set fact with the generated cron jobs for building the crontab later] **************************************************************************************
fatal: [con1]: FAILED! =>
  msg: |-
    the field 'args' has an invalid value ({'cron_jobs': '{{ (cron_jobs_json.stdout | from_json).cron_jobs }}'}), and could not be converted to an dict.The error was: Expecting value: line 1 column 1 (char 0)

    The error appears to be in '/home/stack/kayobe/venvs/kolla-ansible/share/kolla-ansible/ansible/roles/keystone/tasks/config.yml': line 206, column 3, but may
    be elsewhere in the file depending on the exact syntax problem.

    The offending line appears to be:

    - name: Set fact with the generated cron jobs for building the crontab later
      ^ here
...ignoring

TASK [keystone : Copying files for keystone-fernet] *****************************************************
An exception occurred during task execution. To see the full traceback, use -vvv. The error was: ansible.errors.AnsibleUndefinedVariable: 'cron_jobs' is undefined
failed: [con1] (item={'src': 'crontab.j2', 'dest': 'crontab'}) => changed=false
  ansible_loop_var: item
  item:
    dest: crontab
    src: crontab.j2
  msg: 'AnsibleUndefinedVariable: ''cron_jobs'' is undefined'

Mark Goddard (mgoddard)
Changed in kolla-ansible:
importance: Undecided → Medium
status: New → Triaged
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to kolla-ansible (master)
Changed in kolla-ansible:
status: Triaged → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to kolla-ansible (master)

Reviewed: https://review.opendev.org/c/openstack/kolla-ansible/+/870014
Committed: https://opendev.org/openstack/kolla-ansible/commit/572ff2f8dc848453a6781731fb400dc5c9231fad
Submitter: "Zuul (22348)"
Branch: master

commit 572ff2f8dc848453a6781731fb400dc5c9231fad
Author: Mark Goddard <email address hidden>
Date: Thu Jan 12 10:27:47 2023 +0000

    Fix deploy/genconfig in check mode

    Previously, when running one of the following commands:

      kolla-ansible deploy --check
      kolla-ansible genconfig --check

    deployment or configuration generation fails for various reasons.

    MariaDB fails to lookup the existing cluster.

    Keystone fails to generate cron config.

    Nova-cell fails to get the cell settings.

    Closes-Bug: #2002661
    Change-Id: I5e765f498ae86d213d0a4379ca5d473db1499962

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/zed)

Fix proposed to branch: stable/zed
Review: https://review.opendev.org/c/openstack/kolla-ansible/+/880310

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

Fix proposed to branch: stable/yoga
Review: https://review.opendev.org/c/openstack/kolla-ansible/+/880311

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

Fix proposed to branch: stable/xena
Review: https://review.opendev.org/c/openstack/kolla-ansible/+/880312

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

This issue was fixed in the openstack/kolla-ansible 16.0.0.0rc1 release candidate.

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

Reviewed: https://review.opendev.org/c/openstack/kolla-ansible/+/880311
Committed: https://opendev.org/openstack/kolla-ansible/commit/7aae29b4dff1e00290f8e32fc9be03c9bd53804f
Submitter: "Zuul (22348)"
Branch: stable/yoga

commit 7aae29b4dff1e00290f8e32fc9be03c9bd53804f
Author: Mark Goddard <email address hidden>
Date: Thu Jan 12 10:27:47 2023 +0000

    Fix deploy/genconfig in check mode

    Previously, when running one of the following commands:

      kolla-ansible deploy --check
      kolla-ansible genconfig --check

    deployment or configuration generation fails for various reasons.

    MariaDB fails to lookup the existing cluster.

    Keystone fails to generate cron config.

    Nova-cell fails to get the cell settings.

    Closes-Bug: #2002661
    Change-Id: I5e765f498ae86d213d0a4379ca5d473db1499962
    (cherry picked from commit 572ff2f8dc848453a6781731fb400dc5c9231fad)

tags: added: in-stable-yoga
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to kolla-ansible (stable/zed)

Reviewed: https://review.opendev.org/c/openstack/kolla-ansible/+/880310
Committed: https://opendev.org/openstack/kolla-ansible/commit/84e783f194d17a7d01351162764f32b89ee25ba2
Submitter: "Zuul (22348)"
Branch: stable/zed

commit 84e783f194d17a7d01351162764f32b89ee25ba2
Author: Mark Goddard <email address hidden>
Date: Thu Jan 12 10:27:47 2023 +0000

    Fix deploy/genconfig in check mode

    Previously, when running one of the following commands:

      kolla-ansible deploy --check
      kolla-ansible genconfig --check

    deployment or configuration generation fails for various reasons.

    MariaDB fails to lookup the existing cluster.

    Keystone fails to generate cron config.

    Nova-cell fails to get the cell settings.

    Closes-Bug: #2002661
    Change-Id: I5e765f498ae86d213d0a4379ca5d473db1499962
    (cherry picked from commit 572ff2f8dc848453a6781731fb400dc5c9231fad)

tags: added: in-stable-zed
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to kolla-ansible (stable/xena)

Reviewed: https://review.opendev.org/c/openstack/kolla-ansible/+/880312
Committed: https://opendev.org/openstack/kolla-ansible/commit/01a1d8452b0a38b85089aa13d7a14b576f51bd3c
Submitter: "Zuul (22348)"
Branch: stable/xena

commit 01a1d8452b0a38b85089aa13d7a14b576f51bd3c
Author: Mark Goddard <email address hidden>
Date: Thu Jan 12 10:27:47 2023 +0000

    Fix deploy/genconfig in check mode

    Previously, when running one of the following commands:

      kolla-ansible deploy --check
      kolla-ansible genconfig --check

    deployment or configuration generation fails for various reasons.

    MariaDB fails to lookup the existing cluster.

    Keystone fails to generate cron config.

    Nova-cell fails to get the cell settings.

    Closes-Bug: #2002661
    Change-Id: I5e765f498ae86d213d0a4379ca5d473db1499962
    (cherry picked from commit 572ff2f8dc848453a6781731fb400dc5c9231fad)

tags: added: in-stable-xena
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/kolla-ansible 14.9.0

This issue was fixed in the openstack/kolla-ansible 14.9.0 release.

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

This issue was fixed in the openstack/kolla-ansible 15.2.0 release.

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

This issue was fixed in the openstack/kolla-ansible xena-eol release.

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.