osism / issues

This repository is used for bug reports that are cross-project or not bound to a specific repository (or to an unknown repository).
https://www.osism.tech
1 stars 1 forks source link

Nova upgrade fails because of image label is not set which kolla needs #697

Closed traskat closed 1 year ago

traskat commented 1 year ago

Hey,

it seems that kolla need a label on the image of the nova_api. I am trying to upgrade to zed. Here a code example: https://opendev.org/openstack/kolla-ansible/src/commit/e5b102696bfc241cad5ce5f9850c48cda5cdc5ac/ansible/roles/nova/tasks/upgrade.yml#L12

here it will check if the string "upgrade_check" is in the labels

which is need that the block below is running. https://opendev.org/openstack/kolla-ansible/src/commit/e5b102696bfc241cad5ce5f9850c48cda5cdc5ac/ansible/roles/nova/tasks/upgrade.yml#L45

here is an example for the for the labels on the zed image:

"Labels": {
                "build-date": "20231005",
                "de.osism.commit.docker_images_kolla": "a8fe1d6",
                "de.osism.commit.kolla": "d67fd2fcb",
                "de.osism.commit.kolla_version": "15.2.1",
                "de.osism.commit.release": "9eb7bfc",
                "de.osism.release.openstack": "zed",
                "de.osism.version": "latest",
                "kolla_version": "zed",
                "name": "nova-api",
                "org.opencontainers.image.created": "2023-10-05T03:11:20.410539+00:00",
                "org.opencontainers.image.documentation": "https://docs.osism.tech",
                "org.opencontainers.image.licenses": "ASL 2.0",
                "org.opencontainers.image.ref.name": "ubuntu",
                "org.opencontainers.image.source": "https://github.com/osism/container-images-kolla",
                "org.opencontainers.image.title": "nova-api",
                "org.opencontainers.image.url": "https://www.osism.tech",
                "org.opencontainers.image.vendor": "OSISM GmbH",
                "org.opencontainers.image.version": "latest"
            }

Same is for yoga and wallaby.

In short i think the label upgrade_check needs to be that the nova upgrade check block can run otherwise it might be other upgrades are skipped or not running at all.

Thanks for the feedback.

berendt commented 1 year ago

What does the failed task look like? That the label is missing is true, I'll see why that was lost and add it again. But that should not actually lead to an error.

traskat commented 1 year ago

the failed task looks like this:

TASK [nova : Check if Nova API image supports KOLLA_UPGRADE_CHECK] *********************************************************************************************************************
ok: [ctrl1]
fatal: ctrl2]: FAILED! => {"msg": "The task includes an option with an undefined variable. The error was: list object has no element 0\n\nThe error appears to be in '/ansible/roles/nova/tasks/upgrade.yml': line 10, 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: Check if Nova API image supports KOLLA_UPGRADE_CHECK\n  ^ here\n"}
berendt commented 1 year ago

Looks like nova_api_image_info.images is empty. Can you check the task https://opendev.org/openstack/kolla-ansible/src/commit/e5b102696bfc241cad5ce5f9850c48cda5cdc5ac/ansible/roles/nova/tasks/upgrade.yml#L2-L8.

berendt commented 1 year ago

This is now (since 2023.1) done differently in current versions of Kolla. The mentioned tasks are not longer available.