Juju is forcing *ALL* charms in a repo to be perfect to be able to deploy *any*

Bug #952397 reported by Clint Byrum
24
This bug affects 4 people
Affects Status Importance Assigned to Milestone
pyjuju
Fix Released
Critical
Kapil Thangavelu
juju (Ubuntu)
Fix Released
High
Clint Byrum
Precise
Fix Released
High
Clint Byrum

Bug Description

I have a number of half-done charms and not really working charms in my repository.

However, I can't deploy the working charms because juju is parsing *ALL* of the charms and completely dying because of one bad charm. This is completely bogus and needs to be reverted or handled far more gracefully, as I expect quite a few charm developers will be very confused by behavior like this:

$ juju -v deploy --config /tmp/myconfig.yaml local:statusnet
2012-03-11 10:26:35,231 DEBUG Initializing juju deploy runtime
2012-03-11 10:26:35,231 INFO Searching for charm
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/juju/control/command.py", line 49, in _run
    d = defer.maybeDeferred(self.callback, self.options)
  File "/usr/lib/python2.7/dist-packages/twisted/internet/defer.py", line 134, in maybeDeferred
    result = f(*args, **kw)
  File "/usr/lib/python2.7/dist-packages/juju/control/deploy.py", line 85, in command
    num_units=options.num_units)
  File "/usr/lib/python2.7/dist-packages/twisted/internet/defer.py", line 1181, in unwindGenerator
    return _inlineCallbacks(None, gen, Deferred())
--- <exception caught here> ---
  File "/usr/lib/python2.7/dist-packages/twisted/internet/defer.py", line 1039, in _inlineCallbacks
    result = g.send(result)
  File "/usr/lib/python2.7/dist-packages/juju/control/deploy.py", line 120, in deploy
    charm = yield repo.find(charm_url)
  File "/usr/lib/python2.7/dist-packages/juju/charm/repository.py", line 78, in find
    for charm in self._collection(charm_url.collection):
  File "/usr/lib/python2.7/dist-packages/juju/charm/repository.py", line 53, in _collection
    yield get_charm_from_path(dentry_path)
  File "/usr/lib/python2.7/dist-packages/juju/charm/provider.py", line 25, in get_charm_from_path
    return CharmDirectory(specification)
  File "/usr/lib/python2.7/dist-packages/juju/charm/directory.py", line 42, in __init__
    self.config.load(os.path.join(path, "config.yaml"))
  File "/usr/lib/python2.7/dist-packages/juju/charm/config.py", line 63, in load
    self.parse(data, pathname)
  File "/usr/lib/python2.7/dist-packages/juju/charm/config.py", line 96, in parse
    self.get_defaults()
  File "/usr/lib/python2.7/dist-packages/juju/charm/config.py", line 150, in get_defaults
    d[name] = self._validate_one(name, options["default"])
  File "/usr/lib/python2.7/dist-packages/juju/charm/config.py", line 142, in _validate_one
    "Invalid value for %s: %r" % (name, value))
juju.charm.errors.ServiceConfigValueError: Invalid value for use_https: False
2012-03-11 10:26:35,340 ERROR Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/juju/control/command.py", line 49, in _run
    d = defer.maybeDeferred(self.callback, self.options)
  File "/usr/lib/python2.7/dist-packages/twisted/internet/defer.py", line 134, in maybeDeferred
    result = f(*args, **kw)
  File "/usr/lib/python2.7/dist-packages/juju/control/deploy.py", line 85, in command
    num_units=options.num_units)
  File "/usr/lib/python2.7/dist-packages/twisted/internet/defer.py", line 1181, in unwindGenerator
    return _inlineCallbacks(None, gen, Deferred())
--- <exception caught here> ---
  File "/usr/lib/python2.7/dist-packages/twisted/internet/defer.py", line 1039, in _inlineCallbacks
    result = g.send(result)
  File "/usr/lib/python2.7/dist-packages/juju/control/deploy.py", line 120, in deploy
    charm = yield repo.find(charm_url)
  File "/usr/lib/python2.7/dist-packages/juju/charm/repository.py", line 78, in find
    for charm in self._collection(charm_url.collection):
  File "/usr/lib/python2.7/dist-packages/juju/charm/repository.py", line 53, in _collection
    yield get_charm_from_path(dentry_path)
  File "/usr/lib/python2.7/dist-packages/juju/charm/provider.py", line 25, in get_charm_from_path
    return CharmDirectory(specification)
  File "/usr/lib/python2.7/dist-packages/juju/charm/directory.py", line 42, in __init__
    self.config.load(os.path.join(path, "config.yaml"))
  File "/usr/lib/python2.7/dist-packages/juju/charm/config.py", line 63, in load
    self.parse(data, pathname)
  File "/usr/lib/python2.7/dist-packages/juju/charm/config.py", line 96, in parse
    self.get_defaults()
  File "/usr/lib/python2.7/dist-packages/juju/charm/config.py", line 150, in get_defaults
    d[name] = self._validate_one(name, options["default"])
  File "/usr/lib/python2.7/dist-packages/juju/charm/config.py", line 142, in _validate_one
    "Invalid value for %s: %r" % (name, value))
juju.charm.errors.ServiceConfigValueError: Invalid value for use_https: False

Invalid value for use_https: False
2012-03-11 10:26:35,341 ERROR Invalid value for use_https: False

Related branches

Changed in juju:
status: Triaged → In Progress
assignee: nobody → Kapil Thangavelu (hazmat)
Changed in juju:
milestone: florence → honolulu
Changed in juju:
milestone: honolulu → florence
Changed in juju:
status: In Progress → Fix Released
Changed in juju (Ubuntu):
status: New → Triaged
importance: Undecided → High
Changed in juju (Ubuntu Precise):
milestone: none → ubuntu-12.04
assignee: nobody → Clint Byrum (clint-fewbar)
tags: added: rls-mgr-p-tracking
Changed in juju (Ubuntu Precise):
status: Triaged → Fix Committed
Revision history for this message
Clint Byrum (clint-fewbar) wrote :

This was in fact fixed quite a while ago during the precise dev cycle.

Changed in juju (Ubuntu):
status: Fix Committed → Fix Released
Changed in juju (Ubuntu Precise):
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.