Failure while attempting to deploy charm

Bug #1273350 reported by Sean Feole
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Amulet
Fix Released
Critical
Marco Ceppi

Bug Description

I have been having this problem when trying to use Amulet as of Friday night(1/24/2014). After importing and attempting to add a new charm, I receive the following error after running d.setup() , I have tried using amulet from trunk and the packaged source.

Below is a quick example of adding memcached, In my /tmp dir it appears that the
amulet_deployment_XXXXX directory is always created with the appropiate permissions however they are continuously empty. I know there was some updates to amulet late last week, but I think this may be more of a configuration/environment issue on my half.

In [2]: d = amulet.Deployment()

In [3]: d.add('memcached')

In [4]: d.setup()
---------------------------------------------------------------------------
OSError Traceback (most recent call last)
<ipython-input-4-d91322334f6d> in <module>()
----> 1 d.setup()

/usr/lib/python3/dist-packages/amulet/deployer.py in setup(self, timeout)
    123 _, s = tempfile.mkstemp(prefix='amulet-juju-deployer-', suffix='.json')
    124 with open(s, 'w') as f:
--> 125 f.write(json.dumps(self.schema()))
    126
    127 try:

/usr/lib/python3/dist-packages/amulet/deployer.py in schema(self)
    102
    103 def schema(self):
--> 104 return self.deployer_map(self.services, self.relations)
    105
    106 def configure(self, service, options):

/usr/lib/python3/dist-packages/amulet/deployer.py in deployer_map(self, services, relations)
    144 def deployer_map(self, services, relations):
    145 if self.use_sentries:
--> 146 self.build_sentries()
    147
    148 deployer_map = {

/usr/lib/python3/dist-packages/amulet/deployer.py in build_sentries(self)
    171 if not '_has_sentry' in details or not details['_has_sentry']:
    172 sentry = Builder('%s-sentry' % service, self.sentry_template,
--> 173 subordinate=True)
    174 self.add(sentry.metadata['name'], sentry.charm)
    175 self.relate('%s:juju-info' % service, '%s:juju-info'

/usr/lib/python3/dist-packages/amulet/charm.py in __init__(self, name, template, subordinate, hook)
     37
     38 if subordinate:
---> 39 self.require('juju-info', 'juju-info', {'scope': 'container'})
     40
     41 os.chmod(os.path.join(self.charm, 'hooks', self.hook), 0o755)

/usr/lib/python3/dist-packages/amulet/charm.py in require(self, relation, interface, opts)
     45 opts = {}
     46 opts['interface'] = interface
---> 47 self._add_relation('requires', relation, opts)
     48
     49 def provide(self, relation, interface, opts=None):

/usr/lib/python3/dist-packages/amulet/charm.py in _add_relation(self, rel_type, relation, opts)
     73 os.symlink(self.hook, hook_file)
     74
---> 75 self.write_metadata()
     76
     77 def write_metadata(self):

/usr/lib/python3/dist-packages/amulet/charm.py in write_metadata(self)
     80 m.write(metadata)
     81
---> 82 self.save()
     83
     84 def save(self):

/usr/lib/python3/dist-packages/amulet/charm.py in save(self)
     91 stderr=devnull)
     92 except subprocess.CalledProcessError:
---> 93 raise IOError('Unable to update bzr repo')

OSError: Unable to update bzr repo

Sean Feole (sfeole)
description: updated
Marco Ceppi (marcoceppi)
Changed in amulet:
status: New → Confirmed
importance: Undecided → Critical
assignee: nobody → Marco Ceppi (marcoceppi)
milestone: none → 1.2.1
Revision history for this message
Sean Feole (sfeole) wrote :

To Reproduce This:

Start from a freshly installed OS.

1.) Create an instance with canonistack
2.) Log into the instance and issue the following:

sudo add-apt-repository ppa:juju/stable
sudo apt-get update
sudo apt-get install amulet

3.) Install Ipython3

sudo apt-get install ipython3

4.) launch ipython3 and issue the following

import amulet
d = amulet.Deployer()
d.add('mysql')
d.add('mediawiki')
d.relate('mysql:db', 'mediawiki:db')
d.expose('mediawiki')
d.setup()

After Issuing d.setup() the bzr repo will fail to create.

Revision history for this message
Sean Feole (sfeole) wrote :

I forgot to add that juju-core must be installed and configured prior to running through step#2

Revision history for this message
Marco Ceppi (marcoceppi) wrote :

This is due to bzr not knowing "whoami" patched in trunk

Changed in amulet:
status: Confirmed → Fix Committed
Revision history for this message
Sean Feole (sfeole) wrote :

This has been fixed with the latest amulet package 1.2.1-0ubuntu1~ubuntu13.10.1~ppa1 ,, thanks!

Marco Ceppi (marcoceppi)
Changed in amulet:
status: Fix Committed → Fix Released
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.