UnicodeDecodeError in _get_systemd_service_status

Bug #1491822 reported by j1mbutt0n on 2015-09-03
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
MAAS
Critical
Gavin Panella
1.8
Critical
Gavin Panella

Bug Description

Unhandled failure dispatching AMP command. This is probably a bug.
Please ensure that this error is handled within application code or
declared in the signature of the CreateHostMaps command.
[control:pid=4075:cmd=CreateHostMaps:ask=1d3]

Traceback (most recent call last):
  File "/usr/lib/python2.7/threading.py", line 783, in __bootstrap
    self.__bootstrap_inner()
  File "/usr/lib/python2.7/threading.py", line 810, in __bootstrap_inner
    self.run()
  File "/usr/lib/python2.7/threading.py", line 763, in run
    self.__target(*self.__args, **self.__kwargs)
--- <exception caught here> ---
  File ".../twisted/python/threadpool.py", line 196, in _worker
    result = context.call(ctx, function, *args, **kwargs)
  File ".../twisted/python/context.py", line 118, in callWithContext
    return self.currentContext().callWithContext(ctx, func, *args, **kw)
  File ".../twisted/python/context.py", line 81, in callWithContext
    return func(*args,**kw)
  File ".../provisioningserver/utils/twisted.py", line 154, in wrapper
    return func(*args, **kwargs)
  File ".../provisioningserver/rpc/dhcp.py", line 184, in create_host_maps
    _ensure_dhcpv4_is_accessible(CannotCreateHostMap)
  File ".../provisioningserver/rpc/dhcp.py", line 154, in
  _ensure_dhcpv4_is_accessible
    if service_monitor.get_service_state("dhcp4") != SERVICE_STATE.ON:
  File ".../provisioningserver/utils/twisted.py", line 154, in wrapper
    return func(*args, **kwargs)
  File ".../provisioningserver/service_monitor.py", line 120, in
  get_service_state
    return self._get_service_status(service)[0]
  File ".../provisioningserver/service_monitor.py", line 216, in
  _get_service_status
    service.service_name)
  File ".../provisioningserver/service_monitor.py", line 247, in
  _get_systemd_service_status
    if line.startswith("Loaded"):
exceptions.UnicodeDecodeError: 'ascii' codec can't decode byte 0xe2 in
position 0: ordinal not in range(128)

---

I configured 6 nodes under maas, made their status Ready.
installed open-stack and started openstack-install. After that I answered all questions (ip, username, password, api key etc..)
And in stage of juju bootstraping I got this error (from commands.log):

[INFO: 09-03 17:08:42, openstack-install:177] Starting OpenStack Installer v0.99.22
[INFO: 09-03 17:08:42, openstack-install:178] Start command: ['/usr/bin/openstack-install']
[INFO: 09-03 17:08:42, openstack-install:189] Creating juju directories: /home/jim/.cloud-install/juju
[INFO: 09-03 17:08:44, openstack-install:239] Running Kilo release
[INFO: 09-03 17:10:13, installbase.py:138] Performing a Landscape OpenStack Autopilot install
[DEBUG: 09-03 17:10:41, landscape.py:73] Existing MAAS defined, doing a LDS installation with existing MAAS.
[ERROR: 09-03 17:10:51, utils.py:338] Problem with package install: Command 'DEBIAN_FRONTEND=noninteractive /usr/bin/apt-get -qyf -o Dpkg::Options::=--force-confdef -o Dpkg::Options::=--force-confold install openstack-multi' returned non-zero exit status 100
[DEBUG: 09-03 17:10:51, multi.py:120] Bootstrapping Juju: JUJU_HOME=/home/jim/.cloud-install/juju juju bootstrap
[DEBUG: 09-03 17:11:01, multi.py:126] Problem during bootstrap: '{'err': 'Bootstrapping environment "maas"\nStarting new instance for initial state server\nLaunching instance\nWARNING no architecture was specified, acquiring an arbitrary node\nBootstrap failed, destroying environment\nERROR failed to bootstrap environment: cannot start bootstrap instance: gomaasapi: got error back from server: 500 INTERNAL SERVER ERROR ((\'UNHANDLED\', \'Unknown Error [control:pid=4075:cmd=CreateHostMaps:ask=6f]\'))\n', 'output': '', 'status': 1}'
[DEBUG: 09-03 17:11:01, utils.py:56] Traceback (most recent call last):
  File "/usr/share/openstack/cloudinstall/utils.py", line 71, in run
    super().run()
  File "/usr/lib/python3.4/threading.py", line 868, in run
    self._target(*self._args, **self._kwargs)
  File "/usr/share/openstack/cloudinstall/machinewait.py", line 127, in do_continue
    self.installer.do_install()
  File "/usr/share/openstack/cloudinstall/controllers/install/multi.py", line 127, in do_install
    raise Exception("Problem with juju bootstrap.")
Exception: Problem with juju bootstrap.

[ERROR: 09-03 17:13:22, utils.py:338] Problem with package install: Command 'DEBIAN_FRONTEND=noninteractive /usr/bin/apt-get -qyf -o Dpkg::Options::=--force-confdef -o Dpkg::Options::=--force-confold install openstack-multi' returned non-zero exit status 100
[WARNING: 09-03 17:13:22, task.py:83] task name: expected Preparing Landscape, got Bootstrapping Juju
[INFO: 09-03 17:13:22, task.py:86] tasks : [('Bootstrapping Juju', 1441282251.8554897, 1441282402.3224642), ('Preparing Landscape', None, None), ('Deploying Landscape', None, None), ('Registering against Landscape', None, None)]
tasks_started: ['Bootstrapping Juju', 'Bootstrapping Juju']
[DEBUG: 09-03 17:13:22, utils.py:644] ssh keys exist for this user, they will be used instead.
[DEBUG: 09-03 17:13:22, multi.py:120] Bootstrapping Juju: JUJU_HOME=/home/jim/.cloud-install/juju juju bootstrap
[DEBUG: 09-03 17:13:38, multi.py:126] Problem during bootstrap: '{'err': 'Bootstrapping environment "maas"\nStarting new instance for initial state server\nLaunching instance\nWARNING no architecture was specified, acquiring an arbitrary node\nBootstrap failed, destroying environment\nERROR failed to bootstrap environment: cannot start bootstrap instance: gomaasapi: got error back from server: 500 INTERNAL SERVER ERROR ((\'UNHANDLED\', \'Unknown Error [control:pid=4075:cmd=CreateHostMaps:ask=13f]\'))\n', 'output': '', 'status': 1}'
[DEBUG: 09-03 17:13:38, utils.py:56] Traceback (most recent call last):
  File "/usr/share/openstack/cloudinstall/utils.py", line 71, in run
    super().run()
  File "/usr/lib/python3.4/threading.py", line 868, in run
    self._target(*self._args, **self._kwargs)
  File "/usr/share/openstack/cloudinstall/machinewait.py", line 127, in do_continue
    self.installer.do_install()
  File "/usr/share/openstack/cloudinstall/controllers/install/multi.py", line 127, in do_install
    raise Exception("Problem with juju bootstrap.")
Exception: Problem with juju bootstrap.

dpkg -l '*maas*'|cat

||/ Name Version Architecture Description
+++-==============================-=============================-============-======================================
ii maas 1.8.0+bzr4001-0ubuntu2~vivid1 all MAAS server all-in-one metapackage
ii maas-cli 1.8.0+bzr4001-0ubuntu2~vivid1 all MAAS command line API tool
ii maas-cluster-controller 1.8.0+bzr4001-0ubuntu2~vivid1 all MAAS server cluster controller
ii maas-common 1.8.0+bzr4001-0ubuntu2~vivid1 all MAAS server common files
ii maas-dhcp 1.8.0+bzr4001-0ubuntu2~vivid1 all MAAS DHCP server
ii maas-dns 1.8.0+bzr4001-0ubuntu2~vivid1 all MAAS DNS server
ii maas-proxy 1.8.0+bzr4001-0ubuntu2~vivid1 all MAAS Caching Proxy
ii maas-region-controller 1.8.0+bzr4001-0ubuntu2~vivid1 all MAAS server complete region controller
ii maas-region-controller-min 1.8.0+bzr4001-0ubuntu2~vivid1 all MAAS Server minimum region controller
ii python-django-maas 1.8.0+bzr4001-0ubuntu2~vivid1 all MAAS server Django web framework
ii python-maas-client 1.8.0+bzr4001-0ubuntu2~vivid1 all MAAS python API client
ii python-maas-provisioningserver 1.8.0+bzr4001-0ubuntu2~vivid1 all MAAS server provisioning libraries

I alo attached contents of /var/log/maas

Related branches

j1mbutt0n (mazuninanton) wrote :
j1mbutt0n (mazuninanton) on 2015-09-03
description: updated
Gavin Panella (allenap) on 2015-09-03
description: updated
summary: - openstack-install crashes on juju bootstrap
+ UnicodeDecodeError in _get_systemd_service_status
Changed in maas:
status: New → Triaged
importance: Undecided → Critical
Andres Rodriguez (andreserl) wrote :

What is the version of Juju you are using?

Changed in maas:
importance: Critical → Undecided
status: Triaged → Incomplete
importance: Undecided → Critical
status: Incomplete → Triaged
Gavin Panella (allenap) on 2015-09-03
Changed in maas:
status: Triaged → In Progress
assignee: nobody → Gavin Panella (allenap)
Changed in maas:
status: In Progress → Fix Committed
j1mbutt0n (mazuninanton) wrote :

I'm using juju 1.24.5-0ubuntu1~15.04.1~juju1

Mike Pontillo (mpontillo) wrote :

We should probably backport this fix to 1.8.

Changed in maas:
milestone: none → 1.9.0
Changed in maas:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers