environment.yaml Parsing Picky About Spacing

Bug #1130947 reported by Antonio Rosales
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
pyjuju
Triaged
Low
Unassigned

Bug Description

It seems the yaml parsing is very picky on the spacing. I had 3 spaces in front of "aws", and only 2 spaces in front of "canonistack." Once I added a space to canonistack it worked.

$ juju bootstrap -e canonistack
error: Environments configuration error: /home/arosales/.juju/environments.yaml: while parsing a block mapping
  in "<byte string>", line 1, column 1
did not find expected key
  in "<byte string>", line 12, column 3:
environments:
   aws:
    type: ec2
    control-bucket:
    admin-secret:
    access-key:
    secret-key:
    default-series: precise
    juju-origin: ppa
    ssl-hostname-verification: true
    authorized-keys-path: <key path>
  canonistack:
    type: openstack_s3
    control-bucket:
    admin-secret:
    access-key:
    secret-key:
    default-series: precise
    juju-origin: ppa
    auth-url: https://keystone.canonistack.canonical.com:443/v2.0/
    default-image-id: bb636e4f-79d7-4d6b-b13b-c7d53419fd5a
    default-instance-type: m1.small

$ vi environments.yaml

--I add the correct spacing to "canonistack" and it works:--

$ juju bootstrap -e canonistack
2013-02-20 15:29:57,616 WARNING S3 API calls not using secure transport
2013-02-20 15:29:58,886 INFO Bootstrapping environment 'canonistack' (origin: ppa type: openstack_s3)...
2013-02-20 15:30:01,938 WARNING default-instance-type is deprecated, use cli --constraints
2013-02-20 15:30:03,997 INFO 'bootstrap' command finished successfully

Revision history for this message
Antonio Rosales (arosales) wrote :

It would be nice for the parsing to be a little more resilient against spacing, and to provide the user with a better error message.

-thanks,
Antonio

Curtis Hovey (sinzui)
Changed in juju:
importance: Undecided → Low
status: New → Triaged
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.