config step fails if bootstrap node does not include compute role

Bug #2025272 reported by Andre Ruiz
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
OpenStack Snap
Triaged
Medium
Unassigned

Bug Description

I tried bootstrapping first node with only control role (no compute role), to simulate an environment where you have 3 dedicated controllers and many more dedicated computes (in my test, all of them including controllers were also storage, but this probably does not matter here).

When it comes to the moment of configuring the network, I get an error:

Error setting config for openstack-hypervisor
Traceback (most recent call last):
  File "/snap/openstack/182/lib/python3.10/site-packages/sunbeam/commands/configure.py", line 310, in
run
    run_sync(
  File "/snap/openstack/182/lib/python3.10/site-packages/sunbeam/jobs/juju.py", line 56, in run_sync
    result = asyncio.get_event_loop().run_until_complete(coro)
  File "/usr/lib/python3.10/asyncio/base_events.py", line 646, in run_until_complete
    return future.result()
  File "/snap/openstack/182/lib/python3.10/site-packages/sunbeam/jobs/juju.py", line 193, in wrapper
    return await func(self, *args, **kwargs)
  File "/snap/openstack/182/lib/python3.10/site-packages/sunbeam/jobs/juju.py", line 609, in
set_application_config
    await model_impl.applications[app].set_config(config)
KeyError: 'openstack-hypervisor'
Error: 'openstack-hypervisor'

If I repeat the same commands, just adding role compute to first node, it works ok. Seems like it is trying to configure openstack-hypervisor regarding networking parameters without checking if the compute role is actually assigned.

Revision history for this message
James Page (james-page) wrote :

Although the role scaffolding is in place, we've not tested it extensively as yet.

This does need to be resolved.

Changed in snap-openstack:
status: New → Triaged
importance: Undecided → Medium
Revision history for this message
James Page (james-page) wrote :

As discussed this is still a gap in the features supported by microstack.

That said we should fix this - I think there are a few things to consider.

a) the control role is mandatory for a bootstrap node - we must put down a control plane in order for the cloud to function. This actually happens already but what's not obvious is that if you don't provide --role control but do provide --role storage or --role compute, you'll get control anyway.

Roles probably needs to switch to optional roles - control is assumed, storage and compute are optional.

b) we should always deploy the openstack-hypervisor application, and then just not add the unit for the local node if --role compute is not specified.

c) the configure local hypervisor step should be skipped in the event that --role compute is not provided.

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.