Description of problem: Rather than running "openstack overcloud image upload" from the same directory as the images I attempted to run the upload from /home/stack This resulted in an error: [mchappel-director.ostack.qa.int.phx1.redhat.com] [09:40:19 AM] [stack@mchappel-director ~]$ openstack overcloud image upload --image-path /home/stack/images/ ERROR: openstack [Errno 2] No such file or directory: 'overcloud-full.vmlinuz' when I changed into /home/stack/images/ the command ran fine. This is contrary to the built in help: $ openstack help overcloud image upload usage: openstack overcloud image upload [-h] [--image-path IMAGE_PATH] [--os-image OS_IMAGE] [--http-boot HTTP_BOOT] [--update-existing] Create overcloud glance images from existing image files. optional arguments: -h, --help show this help message and exit --image-path IMAGE_PATH Path to directory containing image files --os-image OS_IMAGE OpenStack disk image filename --http-boot HTTP_BOOT Root directory for discovery images --update-existing Update images if already exist For debugging I've also run with lots of -v's [mchappel-director.ostack.qa.int.phx1.redhat.com] [09:48:38 AM] [stack@mchappel-director ~]$ ls -la /home/stack/images/ total 2307088 drwxrwxr-x. 3 stack stack 4096 Oct 26 09:32 . drwx------. 12 stack stack 4096 Oct 26 09:44 .. drwxrwxr-x. 2 stack stack 4096 Oct 26 09:21 7.0 -rw-rw-r--. 1 stack stack 61419520 Oct 7 17:12 deploy-ramdisk-ironic-7.1.0-39.tar -rw-r--r--. 1 stack stack 56384263 Oct 7 15:16 deploy-ramdisk-ironic.initramfs -rwxr-xr-x. 1 stack stack 5027648 Oct 7 15:16 deploy-ramdisk-ironic.kernel -rw-rw-r--. 1 stack stack 155238400 Oct 7 17:12 discovery-ramdisk-7.1.0-39.tar -rw-r--r--. 1 stack stack 150204679 Oct 7 15:33 discovery-ramdisk.initramfs -rwxr-xr-x. 1 stack stack 5027648 Oct 7 15:33 discovery-ramdisk.kernel -rw-rw-r--. 1 stack stack 964567040 Oct 7 17:13 overcloud-full-7.1.0-39.tar -rw-r--r--. 1 stack stack 36762407 Oct 7 15:45 overcloud-full.initrd -rw-r--r--. 1 stack stack 922770432 Oct 7 15:48 overcloud-full.qcow2 -rwxr-xr-x. 1 stack stack 5027648 Oct 7 15:45 overcloud-full.vmlinuz [mchappel-director.ostack.qa.int.phx1.redhat.com] [09:48:52 AM] [stack@mchappel-director ~]$ openstack overcloud image upload --image-path /home/stack/images/ -vvvvv > upload.log 2>&1 How reproducible: 100% Steps to Reproduce: 1. openstack overcloud image upload --image-path /home/stack/images/ from /home/stack 2.note error: ERROR: openstack [Errno 2] No such file or directory: 'overcloud-full.vmlinuz' 3. Actual results: Expected results: Additional info: Workaround is to upload the images from the directory where they are located.
Created attachment 1086525 [details] log for upload attempt
This bug did not make the OSP 8.0 release. It is being deferred to OSP 10.
*** Bug 1327414 has been marked as a duplicate of this bug. ***
Need to check if this is still an issue on 10
Since this has a workaround I'm moving this to z Workaround is to upload the images from the directory where they are located.
This is no longer an issue in Newton: [stack@instack i]$ ls -l total 0 [stack@instack i]$ ls -l /home/stack/ci_images/ total 3717864 -rw-rw-r--. 1 stack stack 436 Oct 19 15:56 images.txt -rw-rw-r--. 1 stack stack 663027712 Oct 19 08:40 instack.qcow2 -rw-rw-r--. 1 stack stack 63 Oct 19 08:40 instack.qcow2.md5 -rw-rw-r--. 1 stack stack 316979200 Oct 19 07:59 ipa_images.tar -rw-rw-r--. 1 stack stack 49 Oct 19 08:00 ipa_images.tar.md5 -rw-rw-r--. 1 stack stack 311813723 Oct 19 06:41 ironic-python-agent.initramfs -rwxr-xr-x. 2 stack stack 5157936 Oct 19 06:41 ironic-python-agent.kernel -rwxr-xr-x. 2 stack stack 5157936 Oct 19 06:41 ironic-python-agent.vmlinuz -rw-rw-r--. 1 stack stack 1492 Oct 19 08:27 metadata.txt -rw-r--r--. 1 stack stack 42169099 Oct 19 06:54 overcloud-full.initrd -rw-r--r--. 1 stack stack 1205121024 Oct 19 06:57 overcloud-full.qcow2 -rw-rw-r--. 1 stack stack 1252454400 Oct 19 08:00 overcloud-full.tar -rw-rw-r--. 1 stack stack 53 Oct 19 08:00 overcloud-full.tar.md5 -rwxr-xr-x. 1 stack stack 5157936 Oct 19 06:54 overcloud-full.vmlinuz [stack@instack i]$ openstack overcloud image upload --image-path /home/stack/ci_images/ Image "overcloud-full-vmlinuz" was uploaded. +--------------------------------------+------------------------+-------------+---------+--------+ | ID | Name | Disk Format | Size | Status | +--------------------------------------+------------------------+-------------+---------+--------+ | 90af574d-a8d4-45da-bdb3-7cfb0a04f178 | overcloud-full-vmlinuz | aki | 5157936 | active | +--------------------------------------+------------------------+-------------+---------+--------+ Image "overcloud-full-initrd" was uploaded. +--------------------------------------+-----------------------+-------------+----------+--------+ | ID | Name | Disk Format | Size | Status | +--------------------------------------+-----------------------+-------------+----------+--------+ | 6f21e01e-6442-49e8-89a4-3c265a4eb9c8 | overcloud-full-initrd | ari | 42169099 | active | +--------------------------------------+-----------------------+-------------+----------+--------+ Image "overcloud-full" was uploaded. +--------------------------------------+----------------+-------------+------------+--------+ | ID | Name | Disk Format | Size | Status | +--------------------------------------+----------------+-------------+------------+--------+ | 4e41fe87-9676-4141-bd68-b71cecad691b | overcloud-full | qcow2 | 1205121024 | active | +--------------------------------------+----------------+-------------+------------+--------+ Image "bm-deploy-kernel" was uploaded. +--------------------------------------+------------------+-------------+---------+--------+ | ID | Name | Disk Format | Size | Status | +--------------------------------------+------------------+-------------+---------+--------+ | 4dc05742-e7ec-4428-a55e-3a8aca749b2b | bm-deploy-kernel | aki | 5157936 | active | +--------------------------------------+------------------+-------------+---------+--------+ Image "bm-deploy-ramdisk" was uploaded. +--------------------------------------+-------------------+-------------+-----------+--------+ | ID | Name | Disk Format | Size | Status | +--------------------------------------+-------------------+-------------+-----------+--------+ | 7f81afef-ed0a-4ce2-bd69-a6ebe6858528 | bm-deploy-ramdisk | ari | 311813723 | active | +--------------------------------------+-------------------+-------------+-----------+--------+ Image file "/httpboot/agent.kernel" is up-to-date, skipping. Image file "/httpboot/agent.ramdisk" is up-to-date, skipping. [stack@instack i]$
I am able to reproduce this still on RDO Newton: cat /etc/yum.repos.d/delorean-newton.repo [delorean] name=delorean-puppet-tomcat-8d96971ca1c58219f856ba8c5cc1af1de95c27a6 baseurl=https://trunk.rdoproject.org/centos7-newton/8d/96/8d96971ca1c58219f856ba8c5cc1af1de95c27a6_000796fa enabled=1 gpgcheck=0 [stack@newton ~]$ pwd /home/stack [stack@newton ~]$ ls images/ dib-agent-ramdisk.log ironic-python-agent.d ironic-python-agent.kernel overcloud-full.d overcloud-full.qcow2 dib-overcloud-full.log ironic-python-agent.initramfs ironic-python-agent.vmlinuz overcloud-full.initrd overcloud-full.vmlinuz $ openstack overcloud image upload --image-path ./images/ WARNING: openstackclient.common.utils is deprecated and will be removed after Jun 2017. Please use osc_lib.utils The given file overcloud-full.vmlinuz is not a regular file
Re-opening and changing version, I can still reproduce this issue with python-tripleoclient-5.4.1-1.el7ost.noarch on OSP10: [stack@sadblabospd1prov ~(LAB_undercloud)]$ openstack overcloud image upload --update-existing --image-path ~/images/. The given file overcloud-full.vmlinuz is not a regular file
This is still happening in OSP10z3 [stack@director10 images]$ openstack overcloud image upload --image-path ~/images/ --update-existing Image "overcloud-full-vmlinuz" is up-to-date, skipping. Image "overcloud-full-initrd" is up-to-date, skipping. Image "overcloud-full" was uploaded. +--------------------------------------+----------------+-------------+------------+--------+ | ID | Name | Disk Format | Size | Status | +--------------------------------------+----------------+-------------+------------+--------+ | e548a709-4026-4965-bdf4-3aeb880d27e8 | overcloud-full | qcow2 | 1308426240 | active | +--------------------------------------+----------------+-------------+------------+--------+ Image "bm-deploy-kernel" is up-to-date, skipping. Image "bm-deploy-ramdisk" is up-to-date, skipping. Image file "/httpboot/agent.kernel" is up-to-date, skipping. Image file "/httpboot/agent.ramdisk" is up-to-date, skipping. [stack@director10 images]$ cd [stack@director10 ~]$ openstack overcloud image upload --image-path ~/images/ --update-existing The given file overcloud-full.vmlinuz is not a regular file [stack@director10 ~]$
Created attachment 1322189 [details] Proposed patch
Created attachment 1322493 [details] Proposed patch - updated
Apologies.. just noticed I went a bit gung ho with the os.path.joins, I've removed 2 extraneous ones thanks
The fix was submitted in rhos-11.0 but it was not cherry-picked to rhos-10, so it was still occurring. It has been cherry-picked in: https://code.engineering.redhat.com/gerrit/#/c/147841/
This patch was waiting in the review queue for OSP-10 for over a year, it has just merged. OSP-10 is in ELS and this is medium priority, it isn't a blocker or CVE, as such it won't be considered for inclusion in a future OSP-10 release. I will close this unless there are objections.
Thanks Jose. Closing this out due to ELS support for OSP-10.