shared-db-relation-changed hook errors on SSL type error

Bug #1800436 reported by Chris MacNaughton
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Nova Cloud Controller Charm
Fix Released
Undecided
Unassigned

Bug Description

on a xenial-queens ssl deployment (using the mojo specs) nova-cloud-controller fails with:

2018-10-29 08:28:14 DEBUG shared-db-relation-changed Traceback (most recent call last):
2018-10-29 08:28:14 DEBUG shared-db-relation-changed File "/var/lib/juju/agents/unit-nova-cloud-controller-0/charm/hooks/shared-db-relation-changed", line 1217, in <module>
2018-10-29 08:28:14 DEBUG shared-db-relation-changed main()
2018-10-29 08:28:14 DEBUG shared-db-relation-changed File "/var/lib/juju/agents/unit-nova-cloud-controller-0/charm/hooks/shared-db-relation-changed", line 1209, in main
2018-10-29 08:28:14 DEBUG shared-db-relation-changed hooks.execute(sys.argv)
2018-10-29 08:28:14 DEBUG shared-db-relation-changed File "/var/lib/juju/agents/unit-nova-cloud-controller-0/charm/charmhelpers/core/hookenv.py", line 848, in execute
2018-10-29 08:28:14 DEBUG shared-db-relation-changed self._hooks[hook_name]()
2018-10-29 08:28:14 DEBUG shared-db-relation-changed File "/var/lib/juju/agents/unit-nova-cloud-controller-0/charm/hooks/nova_cc_utils.py", line 1262, in wrapped_f
2018-10-29 08:28:14 DEBUG shared-db-relation-changed return f(*args, **kwargs)
2018-10-29 08:28:14 DEBUG shared-db-relation-changed File "/var/lib/juju/agents/unit-nova-cloud-controller-0/charm/charmhelpers/contrib/openstack/utils.py", line 1478, in wrapped_f
2018-10-29 08:28:14 DEBUG shared-db-relation-changed stopstart, restart_functions)
2018-10-29 08:28:14 DEBUG shared-db-relation-changed File "/var/lib/juju/agents/unit-nova-cloud-controller-0/charm/charmhelpers/core/host.py", line 730, in restart_on_change_helper
2018-10-29 08:28:14 DEBUG shared-db-relation-changed r = lambda_f()
2018-10-29 08:28:14 DEBUG shared-db-relation-changed File "/var/lib/juju/agents/unit-nova-cloud-controller-0/charm/charmhelpers/contrib/openstack/utils.py", line 1477, in <lambda>
2018-10-29 08:28:14 DEBUG shared-db-relation-changed (lambda: f(*args, **kwargs)), __restart_map_cache['cache'],
2018-10-29 08:28:14 DEBUG shared-db-relation-changed File "/var/lib/juju/agents/unit-nova-cloud-controller-0/charm/hooks/shared-db-relation-changed", line 397, in db_changed
2018-10-29 08:28:14 DEBUG shared-db-relation-changed leader_init_db_if_ready()
2018-10-29 08:28:14 DEBUG shared-db-relation-changed File "/var/lib/juju/agents/unit-nova-cloud-controller-0/charm/hooks/shared-db-relation-changed", line 121, in leader_init_db_if_ready
2018-10-29 08:28:14 DEBUG shared-db-relation-changed update_nova_relation(remote_restart=True)
2018-10-29 08:28:14 DEBUG shared-db-relation-changed File "/var/lib/juju/agents/unit-nova-cloud-controller-0/charm/hooks/shared-db-relation-changed", line 612, in update_nova_relation
2018-10-29 08:28:14 DEBUG shared-db-relation-changed compute_joined(rid=rid, remote_restart=remote_restart)
2018-10-29 08:28:14 DEBUG shared-db-relation-changed File "/var/lib/juju/agents/unit-nova-cloud-controller-0/charm/hooks/shared-db-relation-changed", line 622, in compute_joined
2018-10-29 08:28:14 DEBUG shared-db-relation-changed rel_settings.update(keystone_compute_settings())
2018-10-29 08:28:14 DEBUG shared-db-relation-changed File "/var/lib/juju/agents/unit-nova-cloud-controller-0/charm/hooks/shared-db-relation-changed", line 536, in keystone_compute_settings
2018-10-29 08:28:14 DEBUG shared-db-relation-changed ks_ca = ncc_utils.keystone_ca_cert_b64()
2018-10-29 08:28:14 DEBUG shared-db-relation-changed File "/var/lib/juju/agents/unit-nova-cloud-controller-0/charm/hooks/nova_cc_utils.py", line 907, in keystone_ca_cert_b64
2018-10-29 08:28:14 DEBUG shared-db-relation-changed return base64.b64encode(_in.read())
2018-10-29 08:28:14 DEBUG shared-db-relation-changed File "/usr/lib/python3.5/base64.py", line 59, in b64encode
2018-10-29 08:28:14 DEBUG shared-db-relation-changed encoded = binascii.b2a_base64(s)[:-1]
2018-10-29 08:28:14 DEBUG shared-db-relation-changed TypeError: a bytes-like object is required, not 'str'

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to charm-nova-cloud-controller (master)

Reviewed: https://review.openstack.org/614145
Committed: https://git.openstack.org/cgit/openstack/charm-nova-cloud-controller/commit/?id=f20ea273f95f21ee1b59efd4db9295dfce66fd02
Submitter: Zuul
Branch: master

commit f20ea273f95f21ee1b59efd4db9295dfce66fd02
Author: Chris MacNaughton <email address hidden>
Date: Tue Oct 30 09:32:31 2018 +0100

    Open file as binary to write bytes

    Due to a change in the return types in the base64
    decoded data, we should open these files in binary
    mode to write the byte streams directly.

    Change-Id: I9f88a71406b1e6ea774fdbbeea4ba447901fe5c2
    Closes-Bug: #1800436

Changed in charm-nova-cloud-controller:
status: New → Fix Committed
David Ames (thedac)
Changed in charm-nova-cloud-controller:
milestone: none → 19.04
David Ames (thedac)
Changed in charm-nova-cloud-controller:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

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