confusing error message and backtrace in unit agent on non-existant unit passed to relation-get
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
pyjuju |
Triaged
|
Low
|
Unassigned |
Bug Description
Test case:
1. create a charm with a relation hook which stores this yaml using relation-set, like this:
--- begin monitors.yaml ---
version: '0.1'
monitors:
nrpe:
mysqld:
name: MySQL Running
args:
mysql:
basic:
--- end monitors.yaml ---
#!/bin/sh
relation-set something=$(cat monitors.yaml)
This appears to corrupt the topology node since it is not escaped properly:
2012-07-03 15:17:48,451: twisted@ERROR: Unhandled Error
Traceback (most recent call last):
File "/usr/lib/
return _inlineCallback
File "/usr/lib/
result = g.send(result)
File "/usr/lib/
unit_id = yield self._resolve_
File "/usr/lib/
return _inlineCallback
--- <exception caught here> ---
File "/usr/lib/
result = g.send(result)
File "/usr/lib/
unit_id = self._topology.
File "/usr/lib/
service_name, unit_sequence_id = unit_name.
exceptions.
Changed in juju: | |
milestone: | none → 0.8 |
Changed in juju: | |
status: | Confirmed → Triaged |
Changed in juju: | |
importance: | Medium → Low |
do you have a sample charm for this? there is no rel data in the topology,
so it would be interesting to test out.
On Tue, Jul 3, 2012 at 12:04 PM, Clint Byrum <email address hidden> wrote:
> Public bug reported: python2. 7/dist- packages/ twisted/ internet/ defer.py" , line s(None, gen, Deferred()) python2. 7/dist- packages/ twisted/ internet/ defer.py" , line python2. 7/dist- packages/ juju/state/ hook.py" , line 258, in relation_ state name(unit_ name) python2. 7/dist- packages/ twisted/ internet/ defer.py" , line s(None, gen, Deferred()) python2. 7/dist- packages/ twisted/ internet/ defer.py" , line python2. 7/dist- packages/ juju/state/ hook.py" , line 63, in get_service_ unit_id_ from_name( unit_name) python2. 7/dist- packages/ juju/state/ topology. py", line unit_id_ from_name split(" /") ValueError: need more than 1 value to unpack /bugs.launchpad .net/bugs/ 1020635 /bugs.launchpad .net/juju/ +bug/1020635/ +subscriptions
>
> Test case:
>
> 1. create a charm with a relation hook which stores this yaml using
> relation-set, like this:
>
> --- begin monitors.yaml ---
> version: '0.1'
> monitors:
> nrpe:
> mysqld:
> name: MySQL Running
> args:
> command: check_procs
> args: '-c 1: /usr/sbin/mysqld'
> mysql:
> basic:
> --- end monitors.yaml ---
>
> #!/bin/sh
> relation-set something=$(cat monitors.yaml)
>
> This appears to corrupt the topology node since it is not escaped
> properly:
>
> 2012-07-03 15:17:48,451: twisted@ERROR: Unhandled Error
> Traceback (most recent call last):
> File "/usr/lib/
> 1181, in unwindGenerator
> return _inlineCallback
> File "/usr/lib/
> 1039, in _inlineCallbacks
> result = g.send(result)
> File "/usr/lib/
> _setup_
> unit_id = yield self._resolve_
> File "/usr/lib/
> 1181, in unwindGenerator
> return _inlineCallback
> --- <exception caught here> ---
> File "/usr/lib/
> 1039, in _inlineCallbacks
> result = g.send(result)
> File "/usr/lib/
> _resolve_name
> unit_id = self._topology.
> File "/usr/lib/
> 262, in get_service_
> service_name, unit_sequence_id = unit_name.
> exceptions.
>
> ** Affects: juju
> Importance: High
> Status: New
>
> --
> You received this bug notification because you are subscribed to juju.
> https:/
>
> Title:
> cannot store yaml in relation settings
>
> To manage notifications about this bug go to:
> https:/
>