Unfriendly error message if trying to operate on invalid passwords.yml

Bug #1880220 reported by Mark Goddard
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
kolla-ansible
Fix Released
Low
Mark Goddard
Stein
Fix Released
Low
Radosław Piliszek
Train
Fix Released
Low
Mark Goddard
Ussuri
Fix Released
Low
Mark Goddard
Victoria
Fix Released
Low
Mark Goddard

Bug Description

The kolla-genpwd and kolla-mergepwd commands can be used to manipulate the kolla passwords.yml file. The format is a YAML encoded dict of password variable names to their values. If the format is not a dict, the error messages are unhelpful. In particular, this can happen if the file is encrypted e.g. via Ansible Vault.

For kolla-genpwd:

AttributeError: 'NoneType' object has no attribute 'items'

For kolla-mergepwd:

AttributeError: 'NoneType' object has no attribute 'update'

Mark Goddard (mgoddard)
Changed in kolla-ansible:
importance: Undecided → Low
description: updated
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to kolla-ansible (master)

Fix proposed to branch: master
Review: https://review.opendev.org/730388

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

Reviewed: https://review.opendev.org/730388
Committed: https://git.openstack.org/cgit/openstack/kolla-ansible/commit/?id=620b808cf366596d7cdd521cd5b44a973d5cdeab
Submitter: Zuul
Branch: master

commit 620b808cf366596d7cdd521cd5b44a973d5cdeab
Author: Mark Goddard <email address hidden>
Date: Fri May 22 19:16:02 2020 +0100

    Improve error reporting in password utilities

    The kolla-genpwd and kolla-mergepwd commands can be used to manipulate
    the kolla passwords.yml file. The format is a YAML encoded dict of
    password variable names to their values. If the format is not a dict,
    the error messages are unhelpful. In particular, this can happen if the
    file is encrypted e.g. via Ansible Vault.

    For kolla-genpwd:

        AttributeError: 'NoneType' object has no attribute 'items'

    For kolla-mergepwd:

        AttributeError: 'NoneType' object has no attribute 'update'

    This change adds a more friendly message.

    Change-Id: I27f0835b904e05006ae401adf383090322e1b891
    Closes-Bug: #1880220

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

Fix proposed to branch: stable/ussuri
Review: https://review.opendev.org/737968

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

Fix proposed to branch: stable/train
Review: https://review.opendev.org/737969

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

Fix proposed to branch: stable/stein
Review: https://review.opendev.org/737972

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

Reviewed: https://review.opendev.org/737968
Committed: https://git.openstack.org/cgit/openstack/kolla-ansible/commit/?id=94c7e5a963d7427d1f941f384961c356efa8a271
Submitter: Zuul
Branch: stable/ussuri

commit 94c7e5a963d7427d1f941f384961c356efa8a271
Author: Mark Goddard <email address hidden>
Date: Fri May 22 19:16:02 2020 +0100

    Improve error reporting in password utilities

    The kolla-genpwd and kolla-mergepwd commands can be used to manipulate
    the kolla passwords.yml file. The format is a YAML encoded dict of
    password variable names to their values. If the format is not a dict,
    the error messages are unhelpful. In particular, this can happen if the
    file is encrypted e.g. via Ansible Vault.

    For kolla-genpwd:

        AttributeError: 'NoneType' object has no attribute 'items'

    For kolla-mergepwd:

        AttributeError: 'NoneType' object has no attribute 'update'

    This change adds a more friendly message.

    Change-Id: I27f0835b904e05006ae401adf383090322e1b891
    Closes-Bug: #1880220
    (cherry picked from commit 620b808cf366596d7cdd521cd5b44a973d5cdeab)

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

Reviewed: https://review.opendev.org/737969
Committed: https://git.openstack.org/cgit/openstack/kolla-ansible/commit/?id=d8b05f4c1a81609451f49a76c3e29d9d15a21f76
Submitter: Zuul
Branch: stable/train

commit d8b05f4c1a81609451f49a76c3e29d9d15a21f76
Author: Mark Goddard <email address hidden>
Date: Fri May 22 19:16:02 2020 +0100

    Improve error reporting in password utilities

    The kolla-genpwd and kolla-mergepwd commands can be used to manipulate
    the kolla passwords.yml file. The format is a YAML encoded dict of
    password variable names to their values. If the format is not a dict,
    the error messages are unhelpful. In particular, this can happen if the
    file is encrypted e.g. via Ansible Vault.

    For kolla-genpwd:

        AttributeError: 'NoneType' object has no attribute 'items'

    For kolla-mergepwd:

        AttributeError: 'NoneType' object has no attribute 'update'

    This change adds a more friendly message.

    Change-Id: I27f0835b904e05006ae401adf383090322e1b891
    Closes-Bug: #1880220
    (cherry picked from commit 620b808cf366596d7cdd521cd5b44a973d5cdeab)

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

Reviewed: https://review.opendev.org/737972
Committed: https://git.openstack.org/cgit/openstack/kolla-ansible/commit/?id=90736f0fd95a18a37cbee32ed25f8e935c2d2899
Submitter: Zuul
Branch: stable/stein

commit 90736f0fd95a18a37cbee32ed25f8e935c2d2899
Author: Mark Goddard <email address hidden>
Date: Fri May 22 19:16:02 2020 +0100

    Improve error reporting in password utilities

    The kolla-genpwd and kolla-mergepwd commands can be used to manipulate
    the kolla passwords.yml file. The format is a YAML encoded dict of
    password variable names to their values. If the format is not a dict,
    the error messages are unhelpful. In particular, this can happen if the
    file is encrypted e.g. via Ansible Vault.

    For kolla-genpwd:

        AttributeError: 'NoneType' object has no attribute 'items'

    For kolla-mergepwd:

        AttributeError: 'NoneType' object has no attribute 'update'

    This change adds a more friendly message.

    Change-Id: I27f0835b904e05006ae401adf383090322e1b891
    Closes-Bug: #1880220
    (cherry picked from commit 620b808cf366596d7cdd521cd5b44a973d5cdeab)
    (cherry picked from commit d8b05f4c1a81609451f49a76c3e29d9d15a21f76)

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.