images properties have bad values

Bug #945454 reported by Jesse Andrews
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
devstack
Fix Released
Medium
Jesse Andrews

Bug Description

sometimes devstack runs into an issue where the merge gate fails due to:

    ++ nova boot --flavor 1 --image 9ee73a9a-27d5-42f8-a9d8-1009a09f9586 ex-vol --security_groups=
    ++ grep ' id '
    ++ get_field 2
    ++ read data
    ERROR: Can not find requested image (HTTP 400)
    + VM_UUID=
    + die_if_not_set VM_UUID 'Failure launching ex-vol'

after SSH-ing in I can explore glance:

    cd /opt/stack/devstack
    . openrc

glance has 3 images:

    $ glance index
    ID Name Disk Format Container Format Size
    ------------------------------------ ------------------------------ -------------------- -------------------- --------------
    9ee73a9a-27d5-42f8-a9d8-1009a09f9586 cirros-0.3.0-x86_64-blank ami ami 25165824
    5b36e95a-974e-47f1-bea1-b3bae6b17c54 cirros-0.3.0-x86_64-blank-ramd ari ari 2254249
    dfb38d56-a8f1-43e7-936d-4165cb7db3c1 cirros-0.3.0-x86_64-blank-kern aki aki 4731440

But the image properties of the ami:

    $ glance show 9ee73a9a-27d5-42f8-a9d8-1009a09f9586
    URI: http://127.0.0.1:9292/v1/images/9ee73a9a-27d5-42f8-a9d8-1009a09f9586
    Id: 9ee73a9a-27d5-42f8-a9d8-1009a09f9586
    Public: Yes
    Protected: No
    Name: cirros-0.3.0-x86_64-blank
    Status: active
    Size: 25165824
    Disk format: ami
    Container format: ami
    Minimum Ram Required (MB): 0
    Minimum Disk Required (GB): 0
    Owner: admin
    Property 'kernel_id': dfb38d56-a8f1-43e7-936d-4165cb7db3c1
    Property 'ramdisk_id': 5b36e95a-974e-47f1-bea1-b3bae6[100%]10.6M/s,ETAETA0h0m0s

the ramdisk is missing some data and has junk at the end of it.

In the devstack install log you can see the ramdisk id isn't retrieve correctly:

    + for image_url in '${IMAGE_URLS//,/ }'
    ++ basename http://launchpad.net/cirros/trunk/0.3.0/+download/cirros-0.3.0-x86_64-uec.tar.gz
    + IMAGE_FNAME=cirros-0.3.0-x86_64-uec.tar.gz
    + '[' '!' -f /opt/stack/devstack/files/cirros-0.3.0-x86_64-uec.tar.gz ']'
    + KERNEL=
    + RAMDISK=
    + case "$IMAGE_FNAME" in
    + '[' cirros-0.3.0-x86_64-uec '!=' cirros-0.3.0-x86_64-uec.tar.gz ']'
    + IMAGE_NAME=cirros-0.3.0-x86_64-uec
    + xdir=/opt/stack/devstack/files/images/cirros-0.3.0-x86_64-uec
    + rm -Rf /opt/stack/devstack/files/images/cirros-0.3.0-x86_64-uec
    + mkdir /opt/stack/devstack/files/images/cirros-0.3.0-x86_64-uec
    + tar -zxf /opt/stack/devstack/files/cirros-0.3.0-x86_64-uec.tar.gz -C /opt/stack/devstack/files/images/cirros-0.3.0-x86_64-uec
    ++ for f in '"$xdir/"*-vmlinuz*'
    ++ '[' -f /opt/stack/devstack/files/images/cirros-0.3.0-x86_64-uec/cirros-0.3.0-x86_64-vmlinuz ']'
    ++ echo /opt/stack/devstack/files/images/cirros-0.3.0-x86_64-uec/cirros-0.3.0-x86_64-vmlinuz
    ++ break
    ++ true
    + KERNEL=/opt/stack/devstack/files/images/cirros-0.3.0-x86_64-uec/cirros-0.3.0-x86_64-vmlinuz
    ++ for f in '"$xdir/"*-initrd*'
    ++ '[' -f /opt/stack/devstack/files/images/cirros-0.3.0-x86_64-uec/cirros-0.3.0-x86_64-initrd ']'
    ++ echo /opt/stack/devstack/files/images/cirros-0.3.0-x86_64-uec/cirros-0.3.0-x86_64-initrd
    ++ break
    ++ true
    + RAMDISK=/opt/stack/devstack/files/images/cirros-0.3.0-x86_64-uec/cirros-0.3.0-x86_64-initrd
    ++ for f in '"$xdir/"*.img'
    ++ '[' -f /opt/stack/devstack/files/images/cirros-0.3.0-x86_64-uec/cirros-0.3.0-x86_64-blank.img ']'
    ++ echo /opt/stack/devstack/files/images/cirros-0.3.0-x86_64-uec/cirros-0.3.0-x86_64-blank.img
    ++ break
    ++ true
    + IMAGE=/opt/stack/devstack/files/images/cirros-0.3.0-x86_64-uec/cirros-0.3.0-x86_64-blank.img
    + '[' -n cirros-0.3.0-x86_64-uec ']'
    ++ basename /opt/stack/devstack/files/images/cirros-0.3.0-x86_64-uec/cirros-0.3.0-x86_64-blank.img .img
    + IMAGE_NAME=cirros-0.3.0-x86_64-blank
    + KERNEL_ID=
    + RAMDISK_ID=
    + '[' -n /opt/stack/devstack/files/images/cirros-0.3.0-x86_64-uec/cirros-0.3.0-x86_64-vmlinuz ']'
    ++ glance add -A 37f013b6a1224b7f87d16694ed4608cd name=cirros-0.3.0-x86_64-blank-kernel is_public=true container_format=aki disk_format=aki
    + RVAL='Uploading image '\''cirros-0.3.0-x86_64-blank-kernel'\''
    [ 6%] 3.07M/s, ETA ETA 0h 0m 1s[ 6%] 1.55M/s, ETA ETA 0h 0m 2s[ 6%] 1.03M/s, ETA ETA 0h 0m 4s[ 6%] 793.749064K/s, ETA ETA 0h 0m 5s[ 6%] 635.463898K/s, ETA ETA 0h 0m 6s[ 6%] 529.824040K/s, ETA ETA 0h 0m 8s[ 6%] 454.226722K/s, ETA ETA 0h 0m 9s[ 6%] 397.553526K/s, ETA ETA 0h 0m 10s[ 6%] 353.453639K/s, ETA ETA 0h 0m 12s[ 6%] 318.140748K/s, ETA ETA 0h 0m 13s[100%] 4.08M/s, ETA ETA 0h 0m 0s
    Added new image with ID: dfb38d56-a8f1-43e7-936d-4165cb7db3c1'
    ++ cut -d: -f2
    ++ echo Uploading image ''\''cirros-0.3.0-x86_64-blank-kernel'\''' '[' '6%]' 3.07M/s, ETA ETA 0h 0m '1s[' '6%]' 1.55M/s, ETA ETA 0h 0m '2s[' '6%]' 1.03M/s, ETA ETA 0h 0m '4s[' '6%]' 793.749064K/s, ETA ETA 0h 0m '5s[' '6%]' 635.463898K/s, ETA ETA 0h 0m '6s[' '6%]' 529.824040K/s, ETA ETA 0h 0m '8s[' '6%]' 454.226722K/s, ETA ETA 0h 0m '9s[' '6%]' 397.553526K/s, ETA ETA 0h 0m '10s[' '6%]' 353.453639K/s, ETA ETA 0h 0m '12s[' '6%]' 318.140748K/s, ETA ETA 0h 0m '13s[100%]' 4.08M/s, ETA ETA 0h 0m $'0s\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b++ tr -d ' '
    \b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b' Added new image with ID: dfb38d56-a8f1-43e7-936d-4165cb7db3c1
    + KERNEL_ID=dfb38d56-a8f1-43e7-936d-4165cb7db3c1
    + '[' -n /opt/stack/devstack/files/images/cirros-0.3.0-x86_64-uec/cirros-0.3.0-x86_64-initrd ']'
    ++ glance add -A 37f013b6a1224b7f87d16694ed4608cd name=cirros-0.3.0-x86_64-blank-ramdisk is_public=true container_format=ari disk_format=ari
    + RVAL='Uploading image '\''cirros-0.3.0-x86_64-blank-ramdisk'\''
    [ 93%] 19.7M/s, ETA ETA 0h 0m 0sAdded new image with ID: 5b36e95a-974e-47f1-bea1-b3bae6b17c54
    [100%] 10.6M/s, ETA ETA 0h 0m 0s'
    ++ echo Uploading image ''\''cirros-0.3.0-x86_64-blank-ramdisk'\''' '[' '93%]' 19.7M/s, ETA ETA 0h 0m $'0s\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\bAdded' new image with ID: 5b36e95a-974e-47f1-bea1-b3bae6b17c54 '[100%]' 10.6M/s, ETA ETA 0h 0m $'0s\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b'
    ++ cut -d: -f2
    ++ tr -d ' '
    + RAMDISK_ID='5b36e95a-974e-47f1-bea1-b3bae6b17c54[100%]10.6M/s,ETAETA0h0m0s'
    + glance add -A 37f013b6a1224b7f87d16694ed4608cd name=cirros-0.3.0-x86_64-blank is_public=true container_format=ami disk_format=ami kernel_id=dfb38d56-a8f1-43e7-936d-4165cb7db3c1 'ramdisk_id=5b36e95a-974e-47f1-bea1-b3bae6b17c54[100%]10.6M/s,ETAETA0h0m0s'
    ++ zcat --force /opt/stack/devstack/files/images/cirros-0.3.0-x86_64-uec/cirros-0.3.0-x86_64-blank.img
    The progressbar doesn't show-up because the headers[x-meta-size] is zero or missing
    Uploading image 'cirros-0.3.0-x86_64-blank'

    Added new image with ID: 9ee73a9a-27d5-42f8-a9d8-1009a09f9586

It seems that glance putting percentages is breaking our ability to grab stdout?

Revision history for this message
Jesse Andrews (anotherjesse) wrote :

seems like we might be able to use --silent-upload - see commit https://github.com/openstack/glance/commit/63f3af7c46296792f3ef06cbec7c1965d7087b6a

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to devstack (master)

Fix proposed to branch: master
Review: https://review.openstack.org/4872

Changed in devstack:
assignee: nobody → anotherjesse (anotherjesse)
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to devstack (master)

Reviewed: https://review.openstack.org/4872
Committed: http://github.com/openstack-dev/devstack/commit/7052f7299065650dccb69dd12b6e5414aac32005
Submitter: Jenkins
Branch: master

commit 7052f7299065650dccb69dd12b6e5414aac32005
Author: Jesse Andrews <email address hidden>
Date: Sat Mar 3 00:51:46 2012 -0800

    use --silent-upload for glance - bug 945454

    Change-Id: Ib96b38223e21644e3bfbbb3836eb24cbd5d33b49

Changed in devstack:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
no longer affects: glance
Dean Troyer (dtroyer)
Changed in devstack:
status: Fix Committed → Fix Released
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.