Code review comment for lp:~hazmat/juju-deployer/unit-placement

Revision history for this message
Kapil Thangavelu (hazmat) wrote :

The second one is due to a need for 0.13 for jujuclient, i'll update the
dep spec for that and add some test for the first case.

On Thu, Oct 31, 2013 at 1:41 PM, Adam Gandelman <email address hidden> wrote:

> Review: Needs Fixing
>
> Testing this now, couple of issues so far:
>
> If a service is configured as:
>
> fooservice:
> to: [0]
>
> deployer blows up:
>
> 70, in get_unit_placement
> if ':' in unit_placement:
> TypeError: argument of type 'int' is not iterable
>
> Only running that code if unit_placement is a string seems to fix that.
>
> Adding units fails:
>
> 2013-10-31 17:34:26 [INFO] deployer.import: Adding 2 more units to
> nova-compute
> Traceback (most recent call last):
> File "/usr/local/bin/juju-deployer", line 9, in <module>
> load_entry_point('juju-deployer==0.2.8', 'console_scripts',
> 'juju-deployer')()
> File
> "/usr/local/lib/python2.7/dist-packages/juju_deployer-0.2.8-py2.7.egg/deployer/cli.py",
> line 118, in main
> run()
> File
> "/usr/local/lib/python2.7/dist-packages/juju_deployer-0.2.8-py2.7.egg/deployer/cli.py",
> line 209, in run
> importer.Importer(env, deployment, options).run()
> File
> "/usr/local/lib/python2.7/dist-packages/juju_deployer-0.2.8-py2.7.egg/deployer/action/importer.py",
> line 186, in run
> self.add_units()
> File
> "/usr/local/lib/python2.7/dist-packages/juju_deployer-0.2.8-py2.7.egg/deployer/action/importer.py",
> line 54, in add_units
> self.env.add_unit(svc.name, mspec)
> File
> "/usr/local/lib/python2.7/dist-packages/juju_deployer-0.2.8-py2.7.egg/deployer/env/go.py",
> line 28, in add_unit
> return self.client.add_unit(service_name, machine_spec)
> File
> "/usr/local/lib/python2.7/dist-packages/jujuclient-0.12-py2.7.egg/jujuclient.py",
> line 465, in add_unit
> "Params": params})
> File
> "/usr/local/lib/python2.7/dist-packages/jujuclient-0.12-py2.7.egg/jujuclient.py",
> line 135, in _rpc
> raise EnvError(result)
> jujuclient.EnvError: <Env Error - Details:
> { u'Error': u'must add at least one unit', u'RequestId': 1,
> u'Response': { }}
>
> --
>
> https://code.launchpad.net/~hazmat/juju-deployer/unit-placement/+merge/193445
> You are the owner of lp:~hazmat/juju-deployer/unit-placement.
>

« Back to merge proposal