private cloud:( environment is openstack )index file has no data for cloud

Bug #1435644 reported by chunfeng on 2015-03-24
10
This bug affects 2 people
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://172.27.0.XX:5000/v2.0/
        tenant-name: admin
        region: regionOne
        default-series: trusty
        admin-secret: <SECRET>
        auth-mode: userpass
        username: admin
        password: <SECRET>
        control-bucket: jujubucket
--- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---

when I run bootstrap command :
$juju bootstrap

Bootstrap failed, destroying environment
ERROR failed to bootstrap environment:
                 index file has no data for cloud
                {regionOne http://172.27.0.33:5000/v2.0/} not found

-----------------------------------------------------------

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
             {regionOne http://172.27.0.33:5000/v2.0/} not found

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 :

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.

description: updated
Changed in juju-core:
status: New → Incomplete
chunfeng (chunfeng) wrote :

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 :

I attached the log where the error happend:
=======================================below is log
Logging to /var/log/cloud-init-output.log on remote host
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.simplestreams simplestreams.go:432

skipping index because of error getting latest metadata
"http://cloud-images.ubuntu.com/releases/streams/v1/index.json":
 index file has no data for cloud
{regionOne http://172.27.0.33:5000/v2.0/} not found

juju.cmd supercommand.go:411
cannot set initial environ constraints: index file has no data for cloud
 {regionOne http://172.27.0.33:5000/v2.0/} not found

juju.cmd supercommand.go:411
failed to bootstrap environment: subprocess encountered error code 1

chunfeng (chunfeng) wrote :

I had already mirror the tools dir of : https://streams.canonical.com/juju/tools/ to /home/john/jujuoptstack .

then I bootstrap with below command:

juju bootstrap -v --upload-tools --metadata-source /home/john/jujuoptstack --debug --show-log

chunfeng (chunfeng) wrote :

$ juju metadata validate-images -d /home/john/jujuoptstack
ImageIds:
- af769824-197f-4ce4-85d8-7420f402770d
Region: regionOne
Resolve Metadata:
  source: local metadata directory
  signed: false
  indexURL: file:///home/john/jujuoptstack/images/streams/v1/index.json

Is the above message means the validate image passed ?

chunfeng (chunfeng) wrote :

I rerun the bootstrap comand , and find the line in logs:

juju.environs.sync sync.go:323 built tools 1.22.0.1-trusty-amd64 (9260kB)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

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-interactive authentication is disabled to avoid man-in-the-middle attacks.
Logging to /var/log/cloud-init-output.log on remote host
Running apt-get update
...
...

Installing package: rsyslog-gnutls
Installing package: cloud-utils
Installing package: cloud-image-utils
Bootstrapping Juju machine agent

========================================

juju.environs.simplestreams simplestreams.go:432

skipping index because of error getting latest metadata
"http://cloud-images.ubuntu.com/releases/streams/v1/index.json":
 index file has no data for cloud
{regionOne http://172.27.0.33:5000/v2.0/} not found

juju.cmd supercommand.go:411
cannot set initial environ constraints: index file has no data for cloud
 {regionOne http://172.27.0.33:5000/v2.0/} not found

juju.cmd supercommand.go:411
failed to bootstrap environment: subprocess encountered error code 1

Curtis Hovey (sinzui) wrote :

Please try bootstrapping with --debug to capture more information?
    juju bootstrap --debug

Changed in juju-core:
status: New → Incomplete
chunfeng (chunfeng) on 2015-03-25
Changed in juju-core:
status: Incomplete → New
chunfeng (chunfeng) wrote :

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/jujuoptstack --debug --show-log

------------------------------------------------------------------------
all log pasted at here:

http://pastebin.com/8B5SSLyx

http://pastebin.com/KvEFt8wj

Curtis Hovey (sinzui) on 2015-04-07
tags: added: metadata
Curtis Hovey (sinzui) wrote :

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/jujuoptstack

Curtis Hovey (sinzui) on 2015-04-09
Changed in juju-core:
status: New → Incomplete
chunfeng (chunfeng) wrote :

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://pastebin.com/8B5SSLyx http://pastebin.com/KvEFt8wj ).

$ juju sync-tools --debug --show-log
juju.cmd supercommand.go:37 running juju [1.22.0-trusty-amd64 gc]
 juju.api api.go:175 no cached API connection settings found
juju.provider.openstack provider.go:249 opening environment "openstack"
 juju.environs utils.go:93 StateServerInstances returned: [a50ce4e5-c0f2-41a1-b188-2f81b8729e31]
 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/jujuoptstack --debug --show-lo

the same error happened!

all log pasted at here:

http://pastebin.com/8B5SSLyx

http://pastebin.com/KvEFt8wj

Changed in juju-core:
status: Incomplete → New
Curtis Hovey (sinzui) on 2015-04-17
Changed in juju-core:
status: New → Triaged
importance: Undecided → Low
Curtis Hovey (sinzui) wrote :

This issue is a duplicate of bug 1452422 which as some insight into the real bug and a work around.

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers