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

Asked by Harika Vakadi on 2013-06-14

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 MIIM4QYJKoZIhvcNAQcCoIIM0jCCDM4CAQExCTAHBgUrDgMCGjCCC7oGCSqGSIb3DQEHAaCCC6sEgguneyJhY2Nlc3MiOiB7InRva2VuIjogeyJpc3N1ZWRfYXQiOiAiMjAxMy0wNi0xNFQwOToxMTozMy45NDQ1NjQiLCAiZXhwaXJlcyI6ICIyMDEzLTA2LTE1VDA5OjExOjMzWiIsICJp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-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

Question information

Language:
English Edit question
Status:
Answered
For:
devstack Edit question
Assignee:
No assignee Edit question
Last query:
2013-06-14
Last reply:
2013-10-11
Jerry Zhao (zhaoxinyu) said : #1

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.

Jerry Zhao (zhaoxinyu) said : #2

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:
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.3.1/cirros-0.3.1-x86_64-uec.tar.gz
2013-10-10 23:47:04 Resolving download.cirros-cloud.net (download.cirros-cloud.net)... 69.163.202.251
2013-10-10 23:47:04 Connecting to download.cirros-cloud.net (download.cirros-cloud.net)|69.163.202.251|:80... connected.
2013-10-10 23:47:04 HTTP request sent, awaiting response... 302 Found
2013-10-10 23:47:04 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:04 --2013-10-10 23:47:03-- http://cdn.download.cirros-cloud.net/0.3.1/cirros-0.3.1-x86_64-uec.tar.gz
2013-10-10 23:47:04 Resolving cdn.download.cirros-cloud.net (cdn.download.cirros-cloud.net)... 204.2.145.74, 204.2.145.59, 2001:668:108:1e::2e21:4c90, ...
2013-10-10 23:47:04 Connecting to cdn.download.cirros-cloud.net (cdn.download.cirros-cloud.net)|204.2.145.74|:80... connected.
2013-10-10 23:47:04 HTTP request sent, awaiting response... 200 OK
2013-10-10 23:47:04 Length: 8633554 (8.2M) [application/x-tar]
2013-10-10 23:47:04 Saving to: `/opt/stack/new/devstack/files/cirros-0.3.1-x86_64-uec.tar.gz'

To work around, I just append those right address to the /etc/hosts file.
 204.2.145.74, 204.2.145.59, 67.131.38.42, 67.131.38.17, the name a few. It depends on the ISP and Geo location where you run devstack to download the image.

Can you help with this problem?

Provide an answer of your own, or ask Harika Vakadi for more information if necessary.

To post a message you must log in.