overcloud image up load is throwing a warning about old images

Bug #1896262 reported by Alex Schultz
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
tripleo
Fix Released
Medium
Yadnesh Kulkarni

Bug Description

Fresh install of the undercloud (master)

(undercloud) [centos@undercloud images]$ openstack overcloud image upload
Image "file:///var/lib/ironic/images/overcloud-full.vmlinuz" was copied.
+------------------------------------------------------+----------------+---------+
| Path | Name | Size |
+------------------------------------------------------+----------------+---------+
| file:///var/lib/ironic/images/overcloud-full.vmlinuz | overcloud-full | 6734016 |
+------------------------------------------------------+----------------+---------+
Image "file:///var/lib/ironic/images/overcloud-full.initrd" was copied.
+-----------------------------------------------------+----------------+----------+
| Path | Name | Size |
+-----------------------------------------------------+----------------+----------+
| file:///var/lib/ironic/images/overcloud-full.initrd | overcloud-full | 52612030 |
+-----------------------------------------------------+----------------+----------+
Image "file:///var/lib/ironic/images/overcloud-full.raw" was copied.
+--------------------------------------------------+----------------+------------+
| Path | Name | Size |
+--------------------------------------------------+----------------+------------+
| file:///var/lib/ironic/images/overcloud-full.raw | overcloud-full | 4073717760 |
+--------------------------------------------------+----------------+------------+
Link overcloud image to it's initrd and kernel images is MISSING OR leads to OLD image. You can keep it or fix it manually.
(undercloud) [centos@undercloud images]$ openstack overcloud image upload --update-existing
Image "/var/lib/ironic/images/overcloud-full.vmlinuz" is up-to-date, skipping.
Image "/var/lib/ironic/images/overcloud-full.initrd" is up-to-date, skipping.
Image "/var/lib/ironic/images/overcloud-full.raw" is up-to-date, skipping.
Link overcloud image to it's initrd and kernel images is MISSING OR leads to OLD image. You can keep it or fix it manually.
Image file "/var/lib/ironic/httpboot/agent.kernel" is up-to-date, skipping.
Image file "/var/lib/ironic/httpboot/agent.ramdisk" is up-to-date, skipping.

Changed in tripleo:
milestone: victoria-3 → wallaby-1
Changed in tripleo:
milestone: wallaby-1 → wallaby-2
Changed in tripleo:
assignee: nobody → Yadnesh Kulkarni (ykulkarn)
Revision history for this message
Yadnesh Kulkarni (ykulkarn) wrote :

There seems to be an issue with the value of the file path of kernel and ramdisk images
~~~
(undercloud) [stack@undercloud repos]$ openstack overcloud image upload --update-existing --image-path /home/stack/
Image "/var/lib/ironic/images/overcloud-full.vmlinuz" is up-to-date, skipping.
Image "/var/lib/ironic/images/overcloud-full.initrd" is up-to-date, skipping.
Image "/var/lib/ironic/images/overcloud-full.raw" is up-to-date, skipping.
> /usr/lib/python3.6/site-packages/tripleoclient/v1/overcloud_image.py(207)get_image_property()
-> if os.path.exists(path):
(Pdb) path
'file:///var/lib/ironic/images/overcloud-full.vmlinuz'
(Pdb) os.path.exists(path)
False
(Pdb) os.path.exists("/var/lib/ironic/images/overcloud-full.vmlinuz")
True
(Pdb)
~~~

The os module fails to check whether the file exists or not when it the path has "file://" prepended to it and returns None which further sets the img_kernel_id & img_ramdisk_id vars to None.

Revision history for this message
Yadnesh Kulkarni (ykulkarn) wrote :
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/python-tripleoclient 15.0.0

This issue was fixed in the openstack/python-tripleoclient 15.0.0 release.

Changed in tripleo:
milestone: wallaby-2 → wallaby-3
Changed in tripleo:
status: Triaged → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to python-tripleoclient (stable/victoria)

Fix proposed to branch: stable/victoria
Review: https://review.opendev.org/c/openstack/python-tripleoclient/+/788256

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to python-tripleoclient (stable/ussuri)

Fix proposed to branch: stable/ussuri
Review: https://review.opendev.org/c/openstack/python-tripleoclient/+/788447

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to python-tripleoclient (stable/train)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to python-tripleoclient (stable/victoria)

Reviewed: https://review.opendev.org/c/openstack/python-tripleoclient/+/788256
Committed: https://opendev.org/openstack/python-tripleoclient/commit/b639a4ba3077f8895dba51fd322808e517f979fc
Submitter: "Zuul (22348)"
Branch: stable/victoria

commit b639a4ba3077f8895dba51fd322808e517f979fc
Author: Yadnesh Kulkarni <email address hidden>
Date: Tue Jan 5 21:51:03 2021 +0530

    Overcloud image has missing kernel_id and ramdisk_id properties

    Kernel and ramdisk images are found nonexistent when "file://"
    is prepended to the image path, so replace it with empty
    string only when checking the existence of the image

    Closes-Bug: #1896262
    Signed-off-by: Yadnesh Kulkarni <email address hidden>
    Change-Id: I641dd1c3426048f5aace0ac695eb8cef7126f8c2
    (cherry picked from commit 6546970a7304e8d3109e99e980053d15d5769598)

tags: added: in-stable-victoria
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to python-tripleoclient (stable/ussuri)

Reviewed: https://review.opendev.org/c/openstack/python-tripleoclient/+/788447
Committed: https://opendev.org/openstack/python-tripleoclient/commit/65ac1e1d15e8470cfb94d851bc67cd6ecbb6e33d
Submitter: "Zuul (22348)"
Branch: stable/ussuri

commit 65ac1e1d15e8470cfb94d851bc67cd6ecbb6e33d
Author: Yadnesh Kulkarni <email address hidden>
Date: Tue Jan 5 21:51:03 2021 +0530

    Overcloud image has missing kernel_id and ramdisk_id properties

    Kernel and ramdisk images are found nonexistent when "file://"
    is prepended to the image path, so replace it with empty
    string only when checking the existence of the image

    Closes-Bug: #1896262
    Signed-off-by: Yadnesh Kulkarni <email address hidden>
    Change-Id: I641dd1c3426048f5aace0ac695eb8cef7126f8c2
    (cherry picked from commit 6546970a7304e8d3109e99e980053d15d5769598)

tags: added: in-stable-ussuri
tags: added: in-stable-train
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to python-tripleoclient (stable/train)

Reviewed: https://review.opendev.org/c/openstack/python-tripleoclient/+/788448
Committed: https://opendev.org/openstack/python-tripleoclient/commit/48e4ed8e0dff8db5274951106bebd141bbc2e32e
Submitter: "Zuul (22348)"
Branch: stable/train

commit 48e4ed8e0dff8db5274951106bebd141bbc2e32e
Author: Yadnesh Kulkarni <email address hidden>
Date: Tue Jan 5 21:51:03 2021 +0530

    Overcloud image has missing kernel_id and ramdisk_id properties

    Kernel and ramdisk images are found nonexistent when "file://"
    is prepended to the image path, so replace it with empty
    string only when checking the existence of the image

    Closes-Bug: #1896262
    Signed-off-by: Yadnesh Kulkarni <email address hidden>
    Change-Id: I641dd1c3426048f5aace0ac695eb8cef7126f8c2
    (cherry picked from commit 6546970a7304e8d3109e99e980053d15d5769598)

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/python-tripleoclient 14.2.1

This issue was fixed in the openstack/python-tripleoclient 14.2.1 release.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/python-tripleoclient 12.6.0

This issue was fixed in the openstack/python-tripleoclient 12.6.0 release.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/python-tripleoclient 13.4.4

This issue was fixed in the openstack/python-tripleoclient 13.4.4 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.