** Changed in: landscape-client-charm
     Assignee: (unassigned) => Adam Collard (adam-collard)

** Changed in: landscape-client (Juju Charms Collection)
     Assignee: (unassigned) => Adam Collard (adam-collard)

** Changed in: landscape-client (Juju Charms Collection)
       Status: Triaged => In Progress

** Changed in: landscape-client-charm
       Status: Triaged => In Progress

** Changed in: landscape-client (Juju Charms Collection)
       Status: In Progress => Invalid

** Changed in: landscape-client-charm
       Status: In Progress => Invalid

** Also affects: landscape-client (Ubuntu)
   Importance: Undecided
       Status: New

** Description changed:

  In juju 1, the environment UUID is set in the JUJU_ENV_UUID shell
- variable, and the landscape-client charm uses that.
+ variable, and landscape-client uses that.
  
  With juju 2, however, that variable is replaced by JUJU_MODEL_UUID.
  
- The landscape-client charm, to be compatible with both juju major
- versions, needs to check for both these variables.
+ landscape-client, to be compatible with both juju major versions, needs
+ to check for both these variables.
  
  When deployed with juju 1, this backtrace happens at registration time:
  2016-04-20 13:17:05,486 ERROR    [MainThread] Error running event handler 
landscape.broker.registration.RegistrationHandler._handle_pre_exchange() for 
event type 'pre-exchange' with args () {}.
  Traceback (most recent call last):
-   File "/usr/lib/python2.7/dist-packages/landscape/reactor.py", line 92, in 
fire
-     results.append(handler(*args, **kwargs))
-   File "/usr/lib/python2.7/dist-packages/landscape/broker/registration.py", 
line 213, in _handle_pre_exchange
-     self._exchange.send(message)
-   File "/usr/lib/python2.7/dist-packages/landscape/broker/exchange.py", line 
455, in send
-     message_id = self._message_store.add(message)
-   File "/usr/lib/python2.7/dist-packages/landscape/broker/store.py", line 
367, in add
-     message = schema.coerce(message)
-   File "/usr/lib/python2.7/dist-packages/landscape/schema.py", line 230, in 
coerce
-     return super(Message, self).coerce(value)
-   File "/usr/lib/python2.7/dist-packages/landscape/schema.py", line 167, in 
coerce
-     % (k, value, self.schema[k], e))
+   File "/usr/lib/python2.7/dist-packages/landscape/reactor.py", line 92, in 
fire
+     results.append(handler(*args, **kwargs))
+   File "/usr/lib/python2.7/dist-packages/landscape/broker/registration.py", 
line 213, in _handle_pre_exchange
+     self._exchange.send(message)
+   File "/usr/lib/python2.7/dist-packages/landscape/broker/exchange.py", line 
455, in send
+     message_id = self._message_store.add(message)
+   File "/usr/lib/python2.7/dist-packages/landscape/broker/store.py", line 
367, in add
+     message = schema.coerce(message)
+   File "/usr/lib/python2.7/dist-packages/landscape/schema.py", line 230, in 
coerce
+     return super(Message, self).coerce(value)
+   File "/usr/lib/python2.7/dist-packages/landscape/schema.py", line 167, in 
coerce
+     % (k, value, self.schema[k], e))
  InvalidError: Value of 'juju-info' key of dict {'tags': None, 'timestamp': 
1461158225, 'api': '3.3', 'container-info': 'lxc', 'account_name': 
'standalone', 'vm-info': '', 'registration_password': 'secret', 
'computer_title': 'juju-c206b053-523a-42dd-8e12-321073390de6-machine-1', 
'hostname': 'juju-c206b053-523a-42dd-8e12-321073390de6-machine-1.lxd', 
'juju-info': {'environment-uuid': None, 'api-addresses': 
[u'10.0.100.50:17070'], 'machine-id': u'1'}, 'type': 'register'} could not 
coerce with <landscape.schema.KeyDict object at 0x7f1734b01510>: Value of 
'environment-uuid' key of dict {'environment-uuid': None, 'api-addresses': 
[u'10.0.100.50:17070'], 'machine-id': u'1'} could not coerce with 
<landscape.schema.Unicode object at 0x7f1734b01410>: None isn't a unicode
- 
  
  environmentuuid is null
  # cat /var/lib/landscape/client/juju-info.json ;echo
  {"environment-uuid": null, "api-addresses": "10.0.100.50:17070", 
"machine-id": "1"}
  
- I guess this is another bug: the landscape-client charm should fail hard
- if it can't get the environment-uuid, as that is absolutely required.
+ I guess this is another bug: landscape-client should fail hard if it
+ can't get the environment-uuid, as that is absolutely required.

** Also affects: landscape-client
   Importance: Undecided
       Status: New

** Changed in: landscape-client
       Status: New => In Progress

** Changed in: landscape-client
   Importance: Undecided => Medium

** Changed in: landscape-client
   Importance: Medium => High

** Changed in: landscape-client
     Assignee: (unassigned) => Adam Collard (adam-collard)

** Changed in: landscape-client (Ubuntu)
       Status: New => In Progress

** Changed in: landscape-client (Ubuntu)
     Assignee: (unassigned) => Adam Collard (adam-collard)

** Changed in: landscape-client-charm
       Status: Invalid => In Progress

** Changed in: landscape-client (Juju Charms Collection)
       Status: Invalid => In Progress

** Changed in: landscape-client (Ubuntu)
       Status: In Progress => Invalid

** Changed in: landscape-client
       Status: In Progress => Invalid

** Description changed:

  In juju 1, the environment UUID is set in the JUJU_ENV_UUID shell
- variable, and landscape-client uses that.
+ variable, and the landscape-client charm uses that.
  
  With juju 2, however, that variable is replaced by JUJU_MODEL_UUID.
  
- landscape-client, to be compatible with both juju major versions, needs
- to check for both these variables.
+ The landscape-clientc charm, to be compatible with both juju major
+ versions, needs to check for both these variables.
  
  When deployed with juju 1, this backtrace happens at registration time:
  2016-04-20 13:17:05,486 ERROR    [MainThread] Error running event handler 
landscape.broker.registration.RegistrationHandler._handle_pre_exchange() for 
event type 'pre-exchange' with args () {}.
  Traceback (most recent call last):
    File "/usr/lib/python2.7/dist-packages/landscape/reactor.py", line 92, in 
fire
      results.append(handler(*args, **kwargs))
    File "/usr/lib/python2.7/dist-packages/landscape/broker/registration.py", 
line 213, in _handle_pre_exchange
      self._exchange.send(message)
    File "/usr/lib/python2.7/dist-packages/landscape/broker/exchange.py", line 
455, in send
      message_id = self._message_store.add(message)
    File "/usr/lib/python2.7/dist-packages/landscape/broker/store.py", line 
367, in add
      message = schema.coerce(message)
    File "/usr/lib/python2.7/dist-packages/landscape/schema.py", line 230, in 
coerce
      return super(Message, self).coerce(value)
    File "/usr/lib/python2.7/dist-packages/landscape/schema.py", line 167, in 
coerce
      % (k, value, self.schema[k], e))
  InvalidError: Value of 'juju-info' key of dict {'tags': None, 'timestamp': 
1461158225, 'api': '3.3', 'container-info': 'lxc', 'account_name': 
'standalone', 'vm-info': '', 'registration_password': 'secret', 
'computer_title': 'juju-c206b053-523a-42dd-8e12-321073390de6-machine-1', 
'hostname': 'juju-c206b053-523a-42dd-8e12-321073390de6-machine-1.lxd', 
'juju-info': {'environment-uuid': None, 'api-addresses': 
[u'10.0.100.50:17070'], 'machine-id': u'1'}, 'type': 'register'} could not 
coerce with <landscape.schema.KeyDict object at 0x7f1734b01510>: Value of 
'environment-uuid' key of dict {'environment-uuid': None, 'api-addresses': 
[u'10.0.100.50:17070'], 'machine-id': u'1'} could not coerce with 
<landscape.schema.Unicode object at 0x7f1734b01410>: None isn't a unicode
  
  environmentuuid is null
  # cat /var/lib/landscape/client/juju-info.json ;echo
  {"environment-uuid": null, "api-addresses": "10.0.100.50:17070", 
"machine-id": "1"}
  
- I guess this is another bug: landscape-client should fail hard if it
- can't get the environment-uuid, as that is absolutely required.
+ I guess this is another bug: the landscape-client charm should fail hard
+ if it can't get the environment-uuid, as that is absolutely required.

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1572575

Title:
  Charm looks for JUJU_ENV_UUID but that does not exist in juju 2 models

To manage notifications about this bug go to:
https://bugs.launchpad.net/landscape-client/+bug/1572575/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to