When installing ovn-chassis with enable-auto-restarts set to false units go in error state, because install hook is skipped and then nova-compute-relation-joined fails with:
unit-ovn-chassis-sriov-84: 12:01:19 ERROR unit.ovn-chassis-sriov/84.juju-log nova-compute:154: Hook error:
Traceback (most recent call last):
File "/var/lib/juju/agents/unit-ovn-chassis-sriov-84/.venv/lib/python3.6/site-packages/charms_openstack/charm/core.py", line 975, in render_configs
_render(os.path.basename(conf))
File "/var/lib/juju/agents/unit-ovn-chassis-sriov-84/.venv/lib/python3.6/site-packages/charms_openstack/charm/core.py", line 972, in _render
perms=self.permission_override_map.get(conf) or 0o640,
File "/var/lib/juju/agents/unit-ovn-chassis-sriov-84/.venv/lib/python3.6/site-packages/charmhelpers/core/templating.py", line 92, in render
host.write_file(target, content.encode(encoding), owner, group, perms)
File "/var/lib/juju/agents/unit-ovn-chassis-sriov-84/.venv/lib/python3.6/site-packages/charmhelpers/core/host.py", line 547, in write_file
gid = grp.getgrnam(group).gr_gid
KeyError: "getgrnam(): name not found: 'neutron'"
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/var/lib/juju/agents/unit-ovn-chassis-sriov-84/.venv/lib/python3.6/site-packages/charms/reactive/__init__.py", line 74, in main
bus.dispatch(restricted=restricted_mode)
File "/var/lib/juju/agents/unit-ovn-chassis-sriov-84/.venv/lib/python3.6/site-packages/charms/reactive/bus.py", line 390, in dispatch
_invoke(other_handlers)
File "/var/lib/juju/agents/unit-ovn-chassis-sriov-84/.venv/lib/python3.6/site-packages/charms/reactive/bus.py", line 359, in _invoke
handler.invoke()
File "/var/lib/juju/agents/unit-ovn-chassis-sriov-84/.venv/lib/python3.6/site-packages/charms/reactive/bus.py", line 181, in invoke
self._action(*args)
File "/var/lib/juju/agents/unit-ovn-chassis-sriov-84/charm/reactive/ovn_chassis_charm_handlers.py", line 112, in configure_ovs
'amqp.connected'))
File "/var/lib/juju/agents/unit-ovn-chassis-sriov-84/.venv/lib/python3.6/site-packages/charms_openstack/charm/core.py", line 997, in render_with_interfaces
charm_instance=self))
File "/var/lib/juju/agents/unit-ovn-chassis-sriov-84/.venv/lib/python3.6/site-packages/charms_openstack/charm/core.py", line 981, in render_configs
_render('_'.join(conf.split(os.path.sep))[1:])
File "/var/lib/juju/agents/unit-ovn-chassis-sriov-84/.venv/lib/python3.6/site-packages/charms_openstack/charm/core.py", line 972, in _render
perms=self.permission_override_map.get(conf) or 0o640,
File "/var/lib/juju/agents/unit-ovn-chassis-sriov-84/.venv/lib/python3.6/site-packages/charmhelpers/core/templating.py", line 84, in render
raise e
File "/var/lib/juju/agents/unit-ovn-chassis-sriov-84/.venv/lib/python3.6/site-packages/charmhelpers/core/templating.py", line 79, in render
template = template_env.get_template(source)
File "/var/lib/juju/agents/unit-ovn-chassis-sriov-84/.venv/lib/python3.6/site-packages/jinja2/environment.py", line 830, in get_template
return self._load_template(name, self.make_globals(globals))
File "/var/lib/juju/agents/unit-ovn-chassis-sriov-84/.venv/lib/python3.6/site-packages/jinja2/environment.py", line 804, in _load_template
template = self.loader.load(self, name, globals)
File "/var/lib/juju/agents/unit-ovn-chassis-sriov-84/.venv/lib/python3.6/site-packages/jinja2/loaders.py", line 408, in load
raise TemplateNotFound(name)
jinja2.exceptions.TemplateNotFound: etc_openvswitch_system-id.conf
Workaround is to run the deferred-hooks with the action and then resolve the units in error.
This is ovn-chassis-sriov rev 14
I had certainly envisaged that enable- auto-restarts would be set to True during deployment and then set to False once a deployment completed. However the charm should dtrt thing so I agree this is a bug