ovn charm tests fail to determine release from wallaby onward

Bug #1951462 reported by Corey Bryant
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
charm-layer-ovn
Fix Released
Medium
Corey Bryant
charm-ovn-central
Fix Released
Medium
Corey Bryant
charm-ovn-chassis
Fix Released
Medium
Corey Bryant
charm-ovn-dedicated-chassis
Fix Released
Medium
Corey Bryant
charms.openstack
Fix Released
Medium
Frode Nordahl

Bug Description

This is seen at:
https://review.opendev.org/c/x/charm-ovn-dedicated-chassis/+/816055 (see focal-xena on Patchset 9)
https://review.opendev.org/c/x/charm-ovn-central/+/816052 (see focal-xena on Patchset 9)
https://review.opendev.org/c/x/charm-ovn-chassis (not sure yet as functional tests are running)

The problem is that zaza/openstack/utilities/os_versions.py includes various structs that are considered the old way to determine the release of openstack that is running. In this case we're talking about OVN_CODENAMES. So one option is to update that struct every release.

Another option is to update the charm code to depend on the openstack-release package. Then we'll never have to udpate the os_versions.py code again because get_openstack_release() will get the current openstack release when it runs 'cat /etc/openstack-release | grep OPENSTACK_CODENAME' on the unit.

tags: added: unstable-test
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to charm-ovn-chassis (master)

Fix proposed to branch: master
Review: https://review.opendev.org/c/x/charm-ovn-chassis/+/818593

Changed in charm-ovn-chassis:
status: New → In Progress
Changed in charm-ovn-central:
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to charm-ovn-central (master)

Fix proposed to branch: master
Review: https://review.opendev.org/c/x/charm-ovn-central/+/818594

Changed in charm-ovn-dedicated-chassis:
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to charm-ovn-dedicated-chassis (master)
Revision history for this message
Aurelien Lourot (aurelien-lourot) wrote :
Changed in charm-ovn-chassis:
status: In Progress → Fix Committed
milestone: none → 22.04
Changed in charm-layer-ovn:
status: New → Fix Committed
milestone: none → 22.04
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to charm-ovn-central (master)

Reviewed: https://review.opendev.org/c/x/charm-ovn-central/+/818594
Committed: https://opendev.org/x/charm-ovn-central/commit/9cd1cad8be486a6e5828492655d378c17d915beb
Submitter: "Zuul (22348)"
Branch: master

commit 9cd1cad8be486a6e5828492655d378c17d915beb
Author: Corey Bryant <email address hidden>
Date: Fri Nov 19 11:11:44 2021 -0500

    Add WallabyOVNChassisCharm class

    This aligns with the following charm-layer-ovn change:
    https://github.com/openstack-charmers/charm-layer-ovn/pull/54

    Depends-On: https://review.opendev.org/c/x/charm-ovn-central/+/816052
    Closes-Bug: #1951462
    Change-Id: I65e0e24ffe6758fae33c77d32a12906e2e03fe84

Changed in charm-ovn-central:
status: In Progress → Fix Committed
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to charm-ovn-dedicated-chassis (master)

Reviewed: https://review.opendev.org/c/x/charm-ovn-dedicated-chassis/+/818595
Committed: https://opendev.org/x/charm-ovn-dedicated-chassis/commit/015414bfce97f04d2cfa0969475dce861c41f3d8
Submitter: "Zuul (22348)"
Branch: master

commit 015414bfce97f04d2cfa0969475dce861c41f3d8
Author: Corey Bryant <email address hidden>
Date: Fri Nov 19 11:08:10 2021 -0500

    Add WallabyOVNChassisCharm class

    This aligns with the following charm-layer-ovn change:
    https://github.com/openstack-charmers/charm-layer-ovn/pull/54

    Depends-On: https://review.opendev.org/c/x/charm-ovn-dedicated-chassis/+/816055
    Closes-Bug: #1951462
    Change-Id: Ifafd9c6278e50511d3fc7caa411999578d64a0be

Changed in charm-ovn-dedicated-chassis:
status: In Progress → Fix Committed
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to charm-ovn-chassis (master)

Reviewed: https://review.opendev.org/c/x/charm-ovn-chassis/+/818593
Committed: https://opendev.org/x/charm-ovn-chassis/commit/4e52cd24ca6f984b977d92bb43fdc2bf3ee145f4
Submitter: "Zuul (22348)"
Branch: master

commit 4e52cd24ca6f984b977d92bb43fdc2bf3ee145f4
Author: Corey Bryant <email address hidden>
Date: Fri Nov 19 11:13:32 2021 -0500

    Add WallabyOVNChassisCharm class

    This aligns with the following charm-layer-ovn change:
    https://github.com/openstack-charmers/charm-layer-ovn/pull/54

    Depends-On: https://review.opendev.org/c/x/charm-ovn-chassis/+/816053
    Closes-Bug: #1951462
    Change-Id: I3cf168a19608d277f91897aef6e883f7259a91f9

Changed in charm-layer-ovn:
importance: Undecided → Medium
Changed in charm-ovn-central:
importance: Undecided → Medium
Changed in charm-ovn-chassis:
importance: Undecided → Medium
Changed in charm-ovn-dedicated-chassis:
importance: Undecided → Medium
assignee: nobody → Corey Bryant (corey.bryant)
Changed in charm-ovn-chassis:
assignee: nobody → Corey Bryant (corey.bryant)
Changed in charm-ovn-central:
assignee: nobody → Corey Bryant (corey.bryant)
Changed in charm-layer-ovn:
assignee: nobody → Corey Bryant (corey.bryant)
Revision history for this message
Frode Nordahl (fnordahl) wrote :

There appears to be an issue with the fix for the ovn-central charm.

From its log:
2022-02-23 06:14:14 INFO juju unit_agent.go:276 Starting unit workers for "ovn-central/0"
...
2022-02-23 06:15:01 INFO unit.ovn-central/0.juju-log server.go:327 Invoking reactive handler: reactive/layer_openstack.py:15:default_install
2022-02-23 06:15:01 WARNING unit.ovn-central/0.juju-log server.go:327 Package openstack-release has no installation candidate.
2022-02-23 06:15:03 WARNING unit.ovn-central/0.juju-log server.go:327 Package horizon-common has no installation candidate.
2022-02-23 06:15:04 WARNING unit.ovn-central/0.juju-log server.go:327 Package openstack-release has no installation candidate.
2022-02-23 06:15:05 INFO unit.ovn-central/0.juju-log server.go:327 Installing ['ubuntu-cloud-keyring'] with options: ['--option=Dpkg::Options::=--force-confold']
2022-02-23 06:15:08 INFO unit.ovn-central/0.juju-log server.go:327 Installing ['ovn-central'] with options: ['--option=Dpkg::Options::=--force-confold']

As you can see the package install is attempted prior to adding UCA. I wonder if those are coming from the call to ``get_os_codename_package`` in charms.openstack.

Since the charm then does not retry even if it is listed in the Wallaby version of the charm class makes me wonder if the release selection process fails for the install hook so that the install hook is ran as one of the previous version classes. The UCA would still be set up correctly as that comes from charm config.

Since we have the same major version of OVN from Ussuri up until Xena we can't really override this behavior in the base class package codename map either.

*ponders on how to solve this problem*

Frode Nordahl (fnordahl)
Changed in charms.openstack:
status: New → Triaged
importance: Undecided → Medium
assignee: nobody → Frode Nordahl (fnordahl)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to charms.openstack (master)
Changed in charms.openstack:
status: Triaged → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote :
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to charms.openstack (master)

Reviewed: https://review.opendev.org/c/openstack/charms.openstack/+/830961
Committed: https://opendev.org/openstack/charms.openstack/commit/dda431eaf92c3acae4f279a2ed0bf074a394f697
Submitter: "Zuul (22348)"
Branch: master

commit dda431eaf92c3acae4f279a2ed0bf074a394f697
Author: Frode Nordahl <email address hidden>
Date: Fri Feb 25 11:22:53 2022 +0100

    core: Move package version helpers to BaseOpenStackCharmActions

    To resolve a inter-dependency issue between the various package
    version helpers and the UCA ``configure_source`` method, co-locate
    all of them in ``BaseOpenStackCharmActions``.

    Partial-Bug: #1951462
    Change-Id: If42ad980ff2b0430eba24531eae9a80204768388

Changed in charms.openstack:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

Reviewed: https://review.opendev.org/c/openstack/charms.openstack/+/830616
Committed: https://opendev.org/openstack/charms.openstack/commit/55cc044ea8a3e15cc87cdef132d852f0f2c98e97
Submitter: "Zuul (22348)"
Branch: master

commit 55cc044ea8a3e15cc87cdef132d852f0f2c98e97
Author: Frode Nordahl <email address hidden>
Date: Wed Feb 23 14:48:11 2022 +0100

    Fix use of ``openstack-release`` to determine codename

    The current code will oportunisticly attempt to install the
    ``openstack-release`` package, but it does so without configuring
    the UCA sources.

    Attempt to configure sources to avoid charms getting stuck in a
    chicken and egg situation.

    Closes-Bug: #1951462
    Change-Id: I8ed6e2dfc7ce83c2e56fd072458e2ef189968e41

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix proposed to charms.openstack (master)

Related fix proposed to branch: master
Review: https://review.opendev.org/c/openstack/charms.openstack/+/831074

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix merged to charms.openstack (master)

Reviewed: https://review.opendev.org/c/openstack/charms.openstack/+/831074
Committed: https://opendev.org/openstack/charms.openstack/commit/13ef220ce3529fa7b8e11c6e4c5b352d05b6f148
Submitter: "Zuul (22348)"
Branch: master

commit 13ef220ce3529fa7b8e11c6e4c5b352d05b6f148
Author: Frode Nordahl <email address hidden>
Date: Sat Feb 26 07:34:03 2022 +0100

    core: Gracefully handle missing config option

    The ``get_os_codename_package`` function will be called by all
    charms. The newly added call to the ``configure_source`` method
    may in some circumstances raise an exception due to missing
    source configuration option.

    Handle this situation gracefully.

    Related-Bug: #1951462
    Change-Id: I2bb9c2561b89fea366bd7b7f6a10c3140ce09000

Changed in charm-ovn-dedicated-chassis:
milestone: none → 22.04
Changed in charm-ovn-central:
milestone: none → 22.04
Changed in charm-ovn-chassis:
status: Fix Committed → Fix Released
Changed in charm-ovn-dedicated-chassis:
status: Fix Committed → Fix Released
Changed in charm-ovn-central:
status: Fix Committed → Fix Released
Changed in charm-layer-ovn:
status: Fix Committed → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to charms.openstack (stable/xena)

Fix proposed to branch: stable/xena
Review: https://review.opendev.org/c/openstack/charms.openstack/+/851538

Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

Fix proposed to branch: stable/xena
Review: https://review.opendev.org/c/openstack/charms.openstack/+/851539

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to charms.openstack (stable/xena)

Reviewed: https://review.opendev.org/c/openstack/charms.openstack/+/851538
Committed: https://opendev.org/openstack/charms.openstack/commit/c0326dacc3ea05ebe46f52b4d62e7d3314776854
Submitter: "Zuul (22348)"
Branch: stable/xena

commit c0326dacc3ea05ebe46f52b4d62e7d3314776854
Author: Frode Nordahl <email address hidden>
Date: Fri Feb 25 11:22:53 2022 +0100

    core: Move package version helpers to BaseOpenStackCharmActions

    To resolve a inter-dependency issue between the various package
    version helpers and the UCA ``configure_source`` method, co-locate
    all of them in ``BaseOpenStackCharmActions``.

    Partial-Bug: #1951462
    Change-Id: If42ad980ff2b0430eba24531eae9a80204768388
    (cherry picked from commit dda431eaf92c3acae4f279a2ed0bf074a394f697)

tags: added: in-stable-xena
Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

Reviewed: https://review.opendev.org/c/openstack/charms.openstack/+/851539
Committed: https://opendev.org/openstack/charms.openstack/commit/6d3722c2e9857a738e5b0f07172052d92b83f771
Submitter: "Zuul (22348)"
Branch: stable/xena

commit 6d3722c2e9857a738e5b0f07172052d92b83f771
Author: Frode Nordahl <email address hidden>
Date: Wed Feb 23 14:48:11 2022 +0100

    Fix use of ``openstack-release`` to determine codename

    The current code will oportunisticly attempt to install the
    ``openstack-release`` package, but it does so without configuring
    the UCA sources.

    Attempt to configure sources to avoid charms getting stuck in a
    chicken and egg situation.

    Closes-Bug: #1951462
    Change-Id: I8ed6e2dfc7ce83c2e56fd072458e2ef189968e41
    (cherry picked from commit 55cc044ea8a3e15cc87cdef132d852f0f2c98e97)

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix proposed to charms.openstack (master)

Related fix proposed to branch: master
Review: https://review.opendev.org/c/openstack/charms.openstack/+/860016

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

Change abandoned by "Felipe Reyes <email address hidden>" on branch: master
Review: https://review.opendev.org/c/openstack/charms.openstack/+/860016

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix proposed to charms.openstack (stable/xena)

Related fix proposed to branch: stable/xena
Review: https://review.opendev.org/c/openstack/charms.openstack/+/860019

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix merged to charms.openstack (stable/xena)

Reviewed: https://review.opendev.org/c/openstack/charms.openstack/+/860019
Committed: https://opendev.org/openstack/charms.openstack/commit/b4303d528f39fcd99e68e9263bd70ff6cd5b7255
Submitter: "Zuul (22348)"
Branch: stable/xena

commit b4303d528f39fcd99e68e9263bd70ff6cd5b7255
Author: Frode Nordahl <email address hidden>
Date: Sat Feb 26 07:34:03 2022 +0100

    core: Gracefully handle missing config option

    The ``get_os_codename_package`` function will be called by all
    charms. The newly added call to the ``configure_source`` method
    may in some circumstances raise an exception due to missing
    source configuration option.

    Handle this situation gracefully.

    Related-Bug: #1951462
    Change-Id: I2bb9c2561b89fea366bd7b7f6a10c3140ce09000
    (cherry picked from commit 13ef220ce3529fa7b8e11c6e4c5b352d05b6f148)

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.