private cloud:( environment is openstack )index file has no data for cloud
| Affects | Status | Importance | Assigned to | Milestone | |
|---|---|---|---|---|---|
| juju-core |
Low
|
Unassigned | |||
Bug Description
hi all,
I knew this message is not code error , but the message just told error happend without any valid tips tell me , where is wrong , what I should todo .
I am using openstack in private cloud . my environment.yaml as below :
--- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---
default: openstack
environments:
openstack:
type: openstack
auth-url: http://
region: regionOne
auth-mode: userpass
username: admin
password: <SECRET>
--- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---
when I run bootstrap command :
$juju bootstrap
Bootstrap failed, destroying environment
ERROR failed to bootstrap environment:
-------
I had already fight for this error for 11 days .
I also try :
1. juju metadata generate-image ... ...
2. juju metadata generate-tools ... ...
3. juju bootstrap --metadata-source
4. the VM is booting up , and I can ssh into it ,
5. BUT , the bootstrap is failed at :
index file has no data for cloud
I do not know where I missed for configure , so I send my wonder to launchpad bugs , sorry for that .
This may not be a code bug , but a procedure "bug" .
thanks in advance .
| Curtis Hovey (sinzui) wrote : | #1 |
| description: | updated |
| Changed in juju-core: | |
| status: | New → Incomplete |
| chunfeng (chunfeng) wrote : | #2 |
thanks Curtis Hovey (sinzui) ,
I am quite sure that juju can connect to cloud , because juju create a file in "control-bucket: jujubucket" .
What I really want to make clear is : "index file has no data for cloud" , what is the index file means ?
Where the file should located in ? in my "generate-tools -d /path" or somewhere ?
Is the file exist but items not find or file itself not exist ?
thanks again .
| Changed in juju-core: | |
| status: | Incomplete → New |
| chunfeng (chunfeng) wrote : | #3 |
I attached the log where the error happend:
=======
Logging to /var/log/
Running apt-get update
Running apt-get upgrade
Installing package: curl
Installing package: cpu-checker
Installing package: bridge-utils
Installing package: rsyslog-gnutls
Installing package: cloud-utils
Installing package: cloud-image-utils
Bootstrapping Juju machine agent
=======
juju.environs.
skipping index because of error getting latest metadata
"http://
index file has no data for cloud
{regionOne http://
juju.cmd supercommand.go:411
cannot set initial environ constraints: index file has no data for cloud
{regionOne http://
juju.cmd supercommand.go:411
failed to bootstrap environment: subprocess encountered error code 1
| chunfeng (chunfeng) wrote : | #4 |
I had already mirror the tools dir of : https:/
then I bootstrap with below command:
juju bootstrap -v --upload-tools --metadata-source /home/john/
| chunfeng (chunfeng) wrote : | #5 |
$ juju metadata validate-images -d /home/john/
ImageIds:
- af769824-
Region: regionOne
Resolve Metadata:
source: local metadata directory
signed: false
indexURL: file://
Is the above message means the validate image passed ?
| chunfeng (chunfeng) wrote : | #6 |
I rerun the bootstrap comand , and find the line in logs:
juju.environs.sync sync.go:323 built tools 1.22.0.
^^^^^^^
What this line standfor ?
Is juju copy the build tools to some where? in control-bucket , there is only one file "private-state" .
^^^^^^^
...
...
juju.cmd cmd.go:113 Installing Juju agent on bootstrap instance
juju.environs cloudinit.go:171 Setting numa ctl preference to false
Waiting for address
Attempting to connect to 172.27.0.50:22
...
...
Keyboard-
Logging to /var/log/
Running apt-get update
...
...
Installing package: rsyslog-gnutls
Installing package: cloud-utils
Installing package: cloud-image-utils
Bootstrapping Juju machine agent
=======
juju.environs.
skipping index because of error getting latest metadata
"http://
index file has no data for cloud
{regionOne http://
juju.cmd supercommand.go:411
cannot set initial environ constraints: index file has no data for cloud
{regionOne http://
juju.cmd supercommand.go:411
failed to bootstrap environment: subprocess encountered error code 1
| Curtis Hovey (sinzui) wrote : | #7 |
Please try bootstrapping with --debug to capture more information?
juju bootstrap --debug
| Changed in juju-core: | |
| status: | New → Incomplete |
| Changed in juju-core: | |
| status: | Incomplete → New |
| chunfeng (chunfeng) wrote : | #8 |
hi Curtis Hovey (sinzui) ,
sorry for reopen this issue again , I am already usging --debug --show-log flags:
juju bootstrap -v --upload-tools --metadata-source /home/john/
-------
all log pasted at here:
| tags: | added: metadata |
| Curtis Hovey (sinzui) wrote : | #9 |
I think the --upload-tools --metadata-source are contradicting each other.
--upload-tools means create a custom agent from the local juju client and upload it to the state-server, and this version will never be recorded in the metadata streams.
--metadata-source means use these local metadata for images and/or tools (agents).
I think you be more successful publishing the image and tools streams from an instance in the cloud and setting
image-metadata-url and agent-metadata-url in environments.yaml to point to the cloud's streams.
Or ignore the --upload and use juju to seed the agents in the envuironment, then bootstrap with them
juju sync-tools
juju bootstrap --metadata-source /home/john/
| Changed in juju-core: | |
| status: | New → Incomplete |
| chunfeng (chunfeng) wrote : | #10 |
hi , Curtis Hovey (sinzui) ,
thanks for your comments on my issue .
when I try to run : juju sync-tools command , it failed ( I DELETEED the instance , cause the instance not config well by above errors . http://
$ juju sync-tools --debug --show-log
juju.cmd supercommand.go:37 running juju [1.22.0-
juju.api api.go:175 no cached API connection settings found
juju.provider.
juju.environs utils.go:93 StateServerInst
juju.environs utils.go:75 error getting state instances: no instances found
juju.cmd supercommand.go:411 no instances found
When I run :
juju bootstrap -v --metadata-source /home/john/
the same error happened!
all log pasted at here:
| Changed in juju-core: | |
| status: | Incomplete → New |
| Changed in juju-core: | |
| status: | New → Triaged |
| importance: | Undecided → Low |
| Curtis Hovey (sinzui) wrote : | #11 |
This issue is a duplicate of bug 1452422 which as some insight into the real bug and a work around.


Looks like juju could not contact the cloud properly. You need to review the region name. You may need to add proxy setting, either to environments.yaml if the settings are needed from inside the cloud, or export those settings when bootstrapping so that your localhost can contact the machines during bootstrap.