./stack.sh is resulting any error "/opt/stack/devstack/functions: line 1228: : No such file or directory" on stable/grizzly branch

Bug #1190844 reported by Harika Vakadi
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
devstack
Expired
Undecided
Unassigned

Bug Description

While installing devstack on stable/grizzly branch it is running into the following error

<snip>
gzip: stdin: not in gzip format
tar: Child returned status 1
tar: Error is not recoverable: exiting now
++ for f in '"$xdir/"*-vmlinuz*' '"$xdir/"aki-*/image'
++ '[' -f '/opt/stack/devstack/files/images/cirros-0.3.1-x86_64-uec/*-vmlinuz*' ']'
++ for f in '"$xdir/"*-vmlinuz*' '"$xdir/"aki-*/image'
++ '[' -f '/opt/stack/devstack/files/images/cirros-0.3.1-x86_64-uec/aki-*/image' ']'
++ true
+ KERNEL=
++ for f in '"$xdir/"*-initrd*' '"$xdir/"ari-*/image'
++ '[' -f '/opt/stack/devstack/files/images/cirros-0.3.1-x86_64-uec/*-initrd*' ']'
++ for f in '"$xdir/"*-initrd*' '"$xdir/"ari-*/image'
++ '[' -f '/opt/stack/devstack/files/images/cirros-0.3.1-x86_64-uec/ari-*/image' ']'
++ true
+ RAMDISK=
++ for f in '"$xdir/"*.img' '"$xdir/"ami-*/image'
++ '[' -f '/opt/stack/devstack/files/images/cirros-0.3.1-x86_64-uec/*.img' ']'
++ for f in '"$xdir/"*.img' '"$xdir/"ami-*/image'
++ '[' -f '/opt/stack/devstack/files/images/cirros-0.3.1-x86_64-uec/ami-*/image' ']'
++ true
+ IMAGE=
+ [[ -z cirros-0.3.1-x86_64-uec ]]
+ '[' '' = bare ']'
+ KERNEL_ID=
+ RAMDISK_ID=
+ '[' -n '' ']'
+ '[' -n '' ']'

+ glance --os-auth-token MIIM4QYJKoZIhvcNAQcCoIIM0jCCDM4CAQExCTAHBgUrDgMCGjCCC7oGCSqGSIb3DQEHAaCCC6sEgguneyJhY2Nlc3MiOiB7InRva2VuIjogeyJpc3N1ZWRfYXQiOiAiMjAxMy0wNi0xNFQwOToxMTozMy45NDQ1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nkk1QUZ7eEh3b0Upr0w== --os-image-url http://10.233.52.245:9292 image-create --name cirros-0.3.1-x86_64-uec --public --container-format ami --disk-format ami
/opt/stack/devstack/functions: line 1228: : No such file or directory
++ failed
++ local r=1
+++ jobs -p
++ kill
++ set +o xtrace

<snip>

Can any one suggest on how to follow up, ASAP

Thanks in advance
Harika

Revision history for this message
Abhishek (mrjain) wrote :

same issue observed while installing devstack on UBUNTU 12.04 using stack user

gzip: stdin: not in gzip format
tar: Child returned status 1
tar: Error is not recoverable: exiting now
++ for f in '"$xdir/"*-vmlinuz*' '"$xdir/"aki-*/image'
++ '[' -f '/opt/stack/devstack/files/images/cirros-0.3.1-x86_64-uec/*-vmlinuz*' ']'
++ for f in '"$xdir/"*-vmlinuz*' '"$xdir/"aki-*/image'
++ '[' -f '/opt/stack/devstack/files/images/cirros-0.3.1-x86_64-uec/aki-*/image' ']'
++ true
+ KERNEL=
++ for f in '"$xdir/"*-initrd*' '"$xdir/"ari-*/image'
++ '[' -f '/opt/stack/devstack/files/images/cirros-0.3.1-x86_64-uec/*-initrd*' ']'
++ for f in '"$xdir/"*-initrd*' '"$xdir/"ari-*/image'
++ '[' -f '/opt/stack/devstack/files/images/cirros-0.3.1-x86_64-uec/ari-*/image' ']'
++ true
+ RAMDISK=
++ for f in '"$xdir/"*.img' '"$xdir/"ami-*/image'
++ '[' -f '/opt/stack/devstack/files/images/cirros-0.3.1-x86_64-uec/*.img' ']'
++ for f in '"$xdir/"*.img' '"$xdir/"ami-*/image'
++ '[' -f '/opt/stack/devstack/files/images/cirros-0.3.1-x86_64-uec/ami-*/image' ']'
++ true
+ IMAGE=
+ [[ -z cirros-0.3.1-x86_64-uec ]]
+ '[' '' = bare ']'
+ KERNEL_ID=
+ RAMDISK_ID=
+ '[' -n '' ']'
+ '[' -n '' ']'
+ glance --os-auth-token --os-image-url http://172.17.32.22:9292 image-create --name cirros-0.3.1-x86_64-uec --public --container-format ami --disk-format ami
/opt/stack/devstack/functions: line 1247: : No such file or directory
++ failed
++ local r=1
+++ jobs -p
++ kill
++ set +o xtrace

while checking manually in functions file at line 1247, it seems that glance is trying to create image for container but it is not able to locate actual image at its place.

Here is /opt/stack/devstack/functions: line 1247 :

glance --os-auth-token $token --os-image-url http://$GLANCE_HOSTPORT image-create --name "${IMAGE_NAME%.img}" --public --container-format ami --disk-format ami ${KERNEL_ID:+--property kernel_id=$KERNEL_ID} ${RAMDISK_ID:+--property ramdisk_id=$RAMDISK_ID} < "${IMAGE}"

Do we have any workaround for the same ?

Thanks!
Abhishek

Revision history for this message
Harika Vakadi (harika-vakadi) wrote :

Yes Abhishek, I have the same work around

Revision history for this message
adapaka bhavaniprasad (adapaka-prasad) wrote :

I am also facing the same issue.

Revision history for this message
Jerry Zhao (zhaoxinyu) wrote :

same here when running tempest neutron test with havana trunk code. not every time though.

Revision history for this message
Jerry Zhao (zhaoxinyu) wrote :

It seems to me that the image file is corrupted or something during download.

2013-10-10 10:58:26 + tar -zxf /opt/stack/new/devstack/files/cirros-0.3.1-x86_64-uec.tar.gz -C /opt/stack/new/devstack/files/images/cirros-0.3.1-x86_64-uec
2013-10-10 10:58:26
2013-10-10 10:58:26 gzip: stdin: not in gzip format
2013-10-10 10:58:26 tar: Child returned status 1
2013-10-10 10:58:26 tar: Error is not recoverable: exiting now

In a successful build, the log looks like this:
2013-10-10 01:17:55 2013-10-10 01:17:55 (8.62 MB/s) - `/opt/stack/new/devstack/files/cirros-0.3.1-x86_64-uec.tar.gz' saved [8633554/8633554]

In a failed build, however, looks like this:
2013-10-10 10:58:26 2013-10-10 10:58:26 (123 MB/s) - `/opt/stack/new/devstack/files/cirros-0.3.1-x86_64-uec.tar.gz' saved [1209/1209]

It is obvious that the download was interrupted.

Revision history for this message
Jerry Zhao (zhaoxinyu) wrote :

It is a network issue causing image files incomplete. Thus, image can not be created in glance. I would check network conditions if devstack is in a private environment or recheck/reverify in review.o.o to give the test a second chance.

In the long run, I think a md5 check and retry logic is needed in devstack.

Changed in devstack:
status: New → Invalid
Revision history for this message
Jerry Zhao (zhaoxinyu) wrote :
Download full text (4.4 KiB)

Just found out that the root cause is cirros image source site hostname is resolved to 82.98.86.161, which returned wrong content (both length and type).

Below is the failure log, please note the content length and type:

2013-10-10 23:47:53 + wget -c http://download.cirros-cloud.net/0.3.1/cirros-0.3.1-x86_64-uec.tar.gz -O /opt/stack/new/devstack/files/cirros-0.3.1-x86_64-uec.tar.gz
2013-10-10 23:47:53 --2013-10-10 23:47:42-- http://download.cirros-cloud.net/0.3.1/cirros-0.3.1-x86_64-uec.tar.gz
2013-10-10 23:47:53 Resolving download.cirros-cloud.net (download.cirros-cloud.net)... 69.163.202.251
2013-10-10 23:47:53 Connecting to download.cirros-cloud.net (download.cirros-cloud.net)|69.163.202.251|:80... connected.
2013-10-10 23:47:53 HTTP request sent, awaiting response... 302 Found
2013-10-10 23:47:53 Location: http://cdn.download.cirros-cloud.net/0.3.1/cirros-0.3.1-x86_64-uec.tar.gz [following]
2013-10-10 23:47:53 --2013-10-10 23:47:42-- http://cdn.download.cirros-cloud.net/0.3.1/cirros-0.3.1-x86_64-uec.tar.gz
2013-10-10 23:47:53 Resolving cdn.download.cirros-cloud.net (cdn.download.cirros-cloud.net)... 82.98.86.161, 2600:5801:8001:1::d112:2e2a, 2600:5801:8001:1::d112:2e51
2013-10-10 23:47:53 Connecting to cdn.download.cirros-cloud.net (cdn.download.cirros-cloud.net)|82.98.86.161|:80... connected.
2013-10-10 23:47:53 HTTP request sent, awaiting response... 200 OK
2013-10-10 23:47:53 Length: 1209 (1.2K) [text/html]
2013-10-10 23:47:53 Saving to: `/opt/stack/new/devstack/files/cirros-0.3.1-x86_64-uec.tar.gz'
2013-10-10 23:47:53
2013-10-10 23:47:53 0K . 100% 135M=0s

And here is the correct source:

2013-10-11 03:48:10 + wget -c http://download.cirros-cloud.net/0.3.1/cirros-0.3.1-x86_64-uec.tar.gz -O /opt/stack/new/devstack/files/cirros-0.3.1-x86_64-uec.tar.gz
2013-10-11 03:48:10 --2013-10-11 03:48:10-- http://download.cirros-cloud.net/0.3.1/cirros-0.3.1-x86_64-uec.tar.gz
2013-10-11 03:48:10 Resolving download.cirros-cloud.net (download.cirros-cloud.net)... 69.163.202.251
2013-10-11 03:48:10 Connecting to download.cirros-cloud.net (download.cirros-cloud.net)|69.163.202.251|:80... connected.
2013-10-11 03:48:10 HTTP request sent, awaiting response... 302 Found
2013-10-11 03:48:10 Location: http://cdn.download.cirros-cloud.net/0.3.1/cirros-0.3.1-x86_64-uec.tar.gz [following]
2013-10-11 03:48:10 --2013-10-11 03:48:10-- http://cdn.download.cirros-cloud.net/0.3.1/cirros-0.3.1-x86_64-uec.tar.gz
2013-10-11 03:48:10 Resolving cdn.download.cirros-cloud.net (cdn.download.cirros-cloud.net)... 67.131.38.42, 67.131.38.17, 2600:809:600::3f50:43b, ...
2013-10-11 03:48:10 Connecting to cdn.download.cirros-cloud.net (cdn.download.cirros-cloud.net)|67.131.38.42|:80... connected.
2013-10-11 03:48:10 HTTP request sent, awaiting response... 200 OK
2013-10-11 03:48:10 Length: 8633554 (8.2M) [application/x-tar]
2013-10-11 03:48:10 Saving to: `/opt/stack/new/devstack/files/cirros-0.3.1-x86_64-uec.tar.gz'

Another right source:

2013-10-10 23:47:04 + wget -c http://download.cirros-cloud.net/0.3.1/cirros-0.3.1-x86_64-uec.tar.gz -O /opt/stack/new/devstack/files/cirros-0.3.1-x86_64-uec.tar.gz
2013-10-10 23:47:04 --2013-10-10 23:46:58-- http://download.cirros-cloud.net/0....

Read more...

Revision history for this message
Jerry Zhao (zhaoxinyu) wrote :

Convert back to bug because the cirros image source is so flaky recently and causes many gate rechecks.
I think there better be a checksum mechanism or check content types(html content on failure instead of gzip type on success) to detect and retry for image download. Even a local mirror for the cirros image also works.

Changed in devstack:
status: Invalid → Confirmed
Revision history for this message
Jerry Zhao (zhaoxinyu) wrote :

The CDN for cirros image is not the root cause. In some cases, the source site download.cirros-cloud.net is also resolved as 82.98.86.161, which sometimes is an IP result of the CNAME CDN site cdn.download.cirros-cloud.net.

2013-10-16 18:15:56 + IMAGE_FNAME=cirros-0.3.1-x86_64-uec.tar.gz
2013-10-16 18:15:56 + [[ ! -f /opt/stack/new/devstack/files/cirros-0.3.1-x86_64-uec.tar.gz ]]
2013-10-16 18:15:56 + wget -c http://download.cirros-cloud.net/0.3.1/cirros-0.3.1-x86_64-uec.tar.gz -O /opt/stack/new/devstack/files/cirros-0.3.1-x86_64-uec.tar.gz
2013-10-16 18:15:56 --2013-10-16 18:15:21-- http://download.cirros-cloud.net/0.3.1/cirros-0.3.1-x86_64-uec.tar.gz
2013-10-16 18:15:56 Resolving download.cirros-cloud.net (download.cirros-cloud.net)... 82.98.86.161
2013-10-16 18:15:56 Connecting to download.cirros-cloud.net (download.cirros-cloud.net)|82.98.86.161|:80... connected.
2013-10-16 18:15:56 HTTP request sent, awaiting response... 200 OK
2013-10-16 18:15:56 Length: 1209 (1.2K) [text/html]
2013-10-16 18:15:56 Saving to: `/opt/stack/new/devstack/files/cirros-0.3.1-x86_64-uec.tar.gz'
2013-10-16 18:15:56
2013-10-16 18:15:56 0K . 100% 159M=0s

Revision history for this message
Dean Troyer (dtroyer) wrote :

Is there a link to a known failed gate check due to this? If it is intermittent we should get it added to the elastic-recheck list.

Changed in devstack:
status: Confirmed → Incomplete
Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for devstack because there has been no activity for 60 days.]

Changed in devstack:
status: Incomplete → Expired
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.