juju bootstrap fails to use default-ami specified in environments config file

Reported by Andrew Glen-Young on 2011-10-31
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
pyjuju
Undecided
Unassigned

Bug Description

I have started experimenting with juju using an Openstack installation. When running 'juju bootstrap' I receive a fatal error message that the AMI could not be found:

Error Message: Image ami-a7f539ce could not be found.

I have overridden the default-ami in my ~/.juju/environments.yaml file. It looks like juju is not using the default-ami configuration settings correctly. I expect to be override the default ami that juju uses for the bootstrap node since the 'ami-a7f539ce' does not exist on the Openstack installation.

---- Configuration and example ----

Juju version:

juju 0.5+bzr411-1juju1~oneiric1

Juju environments file (~/.juju/environments.yaml):

# Some of this has been redacted.
environments:
  sample:
    type: ec2
    control-bucket: juju-7af9961c0e0746e4b619XXXXXXXXXXXX
    admin-secret: 50dd078c467f42878a7dXXXXXXXXXXXX
    default-series: oneiric
    access-key: c211d568-1c10-4cd4-a975-80af38342b41:agy_project
    secret-key: XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX
    s3-uri: http://172.16.93.65:3333
    ec2-uri: http://172.16.93.65:8773/services/Cloud
    default-instance-type: m1.tiny
    default-ami: ami-00000002

Sample error message:

$ juju --verbose bootstrap
2011-10-31 16:50:57,265 DEBUG Initializing juju bootstrap runtime
2011-10-31 16:50:57,295 INFO Bootstrapping environment 'sample' (type: ec2)...
2011-10-31 16:50:57,385 DEBUG Verifying writable storage
2011-10-31 16:50:57,469 DEBUG Launching juju bootstrap instance.
2011-10-31 16:50:57,948 DEBUG Deleted existing machine group juju-sample-0, will replace
2011-10-31 16:50:57,948 DEBUG Creating juju machine security group juju-sample-0
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/twisted/internet/defer.py", line 388, in errback
    self._startRunCallbacks(fail)
  File "/usr/lib/python2.7/dist-packages/twisted/internet/defer.py", line 455, in _startRunCallbacks
    self._runCallbacks()
  File "/usr/lib/python2.7/dist-packages/twisted/internet/defer.py", line 542, in _runCallbacks
    current.result = callback(current.result, *args, **kw)
  File "/usr/lib/python2.7/dist-packages/twisted/internet/defer.py", line 1076, in gotResult
    _inlineCallbacks(r, g, deferred)
--- <exception caught here> ---
  File "/usr/lib/python2.7/dist-packages/twisted/internet/defer.py", line 1018, in _inlineCallbacks
    result = result.throwExceptionIntoGenerator(g)
  File "/usr/lib/python2.7/dist-packages/twisted/python/failure.py", line 350, in throwExceptionIntoGenerator
    return g.throw(self.type, self.value, self.tb)
  File "/usr/lib/python2.7/dist-packages/juju/control/bootstrap.py", line 24, in command
    yield provider.bootstrap()
  File "/usr/lib/python2.7/dist-packages/twisted/internet/defer.py", line 1018, in _inlineCallbacks
    result = result.throwExceptionIntoGenerator(g)
  File "/usr/lib/python2.7/dist-packages/twisted/python/failure.py", line 350, in throwExceptionIntoGenerator
    return g.throw(self.type, self.value, self.tb)
  File "/usr/lib/python2.7/dist-packages/juju/providers/common/launch.py", line 45, in run
    machines = yield self.start_machine(machine_id, zookeepers)
  File "/usr/lib/python2.7/dist-packages/twisted/internet/defer.py", line 1018, in _inlineCallbacks
    result = result.throwExceptionIntoGenerator(g)
  File "/usr/lib/python2.7/dist-packages/twisted/python/failure.py", line 350, in throwExceptionIntoGenerator
    return g.throw(self.type, self.value, self.tb)
  File "/usr/lib/python2.7/dist-packages/juju/providers/ec2/launch.py", line 48, in start_machine
    user_data=user_data)
  File "/usr/lib/python2.7/dist-packages/twisted/internet/defer.py", line 542, in _runCallbacks
    current.result = callback(current.result, *args, **kw)
  File "/usr/lib/python2.7/dist-packages/txaws/ec2/client.py", line 23, in ec2_error_wrapper
    error_wrapper(error, EC2Error)
  File "/usr/lib/python2.7/dist-packages/txaws/client/base.py", line 46, in error_wrapper
    raise fallback_error
txaws.ec2.exception.EC2Error: Error Message: Image ami-a7f539ce could not be found.
2011-10-31 16:50:58,398 ERROR Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/twisted/internet/defer.py", line 388, in errback
    self._startRunCallbacks(fail)
  File "/usr/lib/python2.7/dist-packages/twisted/internet/defer.py", line 455, in _startRunCallbacks
    self._runCallbacks()
  File "/usr/lib/python2.7/dist-packages/twisted/internet/defer.py", line 542, in _runCallbacks
    current.result = callback(current.result, *args, **kw)
  File "/usr/lib/python2.7/dist-packages/twisted/internet/defer.py", line 1076, in gotResult
    _inlineCallbacks(r, g, deferred)
--- <exception caught here> ---
  File "/usr/lib/python2.7/dist-packages/twisted/internet/defer.py", line 1018, in _inlineCallbacks
    result = result.throwExceptionIntoGenerator(g)
  File "/usr/lib/python2.7/dist-packages/twisted/python/failure.py", line 350, in throwExceptionIntoGenerator
    return g.throw(self.type, self.value, self.tb)
  File "/usr/lib/python2.7/dist-packages/juju/control/bootstrap.py", line 24, in command
    yield provider.bootstrap()
  File "/usr/lib/python2.7/dist-packages/twisted/internet/defer.py", line 1018, in _inlineCallbacks
    result = result.throwExceptionIntoGenerator(g)
  File "/usr/lib/python2.7/dist-packages/twisted/python/failure.py", line 350, in throwExceptionIntoGenerator
    return g.throw(self.type, self.value, self.tb)
  File "/usr/lib/python2.7/dist-packages/juju/providers/common/launch.py", line 45, in run
    machines = yield self.start_machine(machine_id, zookeepers)
  File "/usr/lib/python2.7/dist-packages/twisted/internet/defer.py", line 1018, in _inlineCallbacks
    result = result.throwExceptionIntoGenerator(g)
  File "/usr/lib/python2.7/dist-packages/twisted/python/failure.py", line 350, in throwExceptionIntoGenerator
    return g.throw(self.type, self.value, self.tb)
  File "/usr/lib/python2.7/dist-packages/juju/providers/ec2/launch.py", line 48, in start_machine
    user_data=user_data)
  File "/usr/lib/python2.7/dist-packages/twisted/internet/defer.py", line 542, in _runCallbacks
    current.result = callback(current.result, *args, **kw)
  File "/usr/lib/python2.7/dist-packages/txaws/ec2/client.py", line 23, in ec2_error_wrapper
    error_wrapper(error, EC2Error)
  File "/usr/lib/python2.7/dist-packages/txaws/client/base.py", line 46, in error_wrapper
    raise fallback_error
txaws.ec2.exception.EC2Error: Error Message: Image ami-a7f539ce could not be found.

Error Message: Image ami-a7f539ce could not be found.
2011-10-31 16:50:58,398 ERROR Error Message: Image ami-a7f539ce could not be found.

The relevant line from the nova-api service:

2011-10-31 16:46:44,702 DEBUG nova.api [-] arg: ImageId val: ami-a7f539ce from (pid=5404) __call__ /usr/lib/python2.7/dist-packages/nova/api/ec2/__init__.py:242

description: updated
description: updated

Excerpts from Andrew Glen-Young's message of Mon Oct 31 17:02:54 UTC 2011:
> Public bug reported:
>
> I have started experimenting with juju using an Openstack installation.
> When running 'juju bootstrap' I receive a fatal error message that the
> AMI could not be found:
>
> Error Message: Image ami-a7f539ce could not be found.
>
> I have overridden the default-ami in my ~/.juju/environments.yaml file.
> It looks like juju is not using the default-ami configuration settings
> correctly. I expect to be override the default ami that juju uses for
> the bootstrap node since the 'ami-a7f539ce' does not exist on the
> Openstack installation.
>
> ---- Configuration and example ----
>
> Juju version:
>
> juju 0.5+bzr411-1juju1~oneiric1
>
> Juju environments file (~/.juju/environments.yaml):
>
> # Some of this has been redacted.
> environments:
>   sample:
>     type: ec2
>     control-bucket: juju-7af9961c0e0746e4b619XXXXXXXXXXXX
>     admin-secret: 50dd078c467f42878a7dXXXXXXXXXXXX
>     default-series: oneiric
>     access-key: c211d568-1c10-4cd4-a975-80af38342b41:agy_project
>     secret-key: XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX
>     s3-uri: http://172.16.93.65:3333
>     ec2-uri: http://172.16.93.65:8773/services/Cloud
>     default-instance-type: m1.tiny
>     default-ami: ami-00000002

Hi Andrew! The appropriate setting is default-image-id.

https://juju.ubuntu.com/docs/provider-configuration-ec2.html

This is actually then a duplicate of bug #824787

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

Other bug subscribers