Add a compute node¶
How to add a compute node with bootstrap-servers, pull and deploy, each with --limit on the new host, and what
deploy --limit then touches: it creates the containers of the new compute, delegates tasks to the controllers, gathers
facts for all hosts, and does not touch existing computes apart from the delegated setup. The page gives no
verification steps for the new compute.
The scenario section is written for the assumed deployment, with compute004 as the new
host.
Warning
Existing hosts' /etc/hosts is not updated (bootstrap-servers --limit), and a full bootstrap-servers run carries
its own Docker-restart risk (R14) — see the caveats in §2.
1. Commands¶
1.1 Add a compute node¶
kolla-ansible -i multinode bootstrap-servers --limit compute501
kolla-ansible -i multinode pull --limit compute501
kolla-ansible -i multinode deploy --limit compute501
Details in §2.
bootstrap-serversrunsansible/kolla-host.yml(tools/kolla-ansible:485-488): facts first, then theopenstack.kolla.baremetalrole of ansible-collection-kolla on thebaremetalhosts of the limit (kolla-host.yml:2-14). Changed in 2024.1: the container engine it installs is no longer always Docker. The role importsopenstack.kolla.{{ container_engine }}and thenopenstack.kolla.{{ container_engine }}_sdk(collectionroles/baremetal/tasks/install.yml:37-38,roles/baremetal/tasks/post-install.yml:6-7), withcontainer_enginetaken fromkolla_container_engine,dockerby default (collectionroles/baremetal/defaults/main.yml:37; kolla-ansiblegroup_vars/all.yml:92). So the new compute gets thedockeranddocker_sdkroles, or, withkolla_container_engine: podman, thepodmanandpodman_sdkroles, which are new in the 2024.1 collection. Use the engine of the rest of the deployment: everykolla_containertask ofdeploypasses the same variable (group_vars/all.yml:142-153, key at:153).- Facts for all hosts are still gathered, sequentially from
compute501(gather-facts.yml:34-62; loop items run one after another, ansible-core 2.16.20lib/ansible/executor/task_executor.py:288-336). Enable fact caching for large inventories: with cached facts the delegatedsetupis skipped (gather-facts.yml:60-61). New in 2024.1, both fact plays and thebaremetalplay setmax_fail_percentage, 100 unless you set it (gather-facts.yml:7-10, :36-39,kolla-host.yml:8-11): with the default, nothing changes for a single new host. - Discovery runs from the first compute of the batch, delegated to
nova-conductor[0](roles/nova-cell/tasks/deploy.yml:19-37,roles/nova-cell/tasks/wait_discover_computes.yml:42-43, :87-90,roles/nova-cell/tasks/discover_computes.yml:21). That host is outside the limit, butdelegate_toworks: Ansible looks the delegated host up in the whole inventory CODE (ansible-core 2.16.20lib/ansible/vars/manager.py:528-536,lib/ansible/inventory/manager.py:197-198). /etc/hostson existing hosts is not updated with the new compute (bootstrap-serverswas limited). Still holds in 2024.1: the file is written by theopenstack.kolla.etc_hostsrole, imported first byopenstack.kolla.baremetaland run on the play hosts only (collectionroles/baremetal/tasks/main.yml:2-3,roles/etc_hosts/tasks/main.yml:2-4,roles/etc_hosts/tasks/etc-hosts.yml:25-37;kolla-host.yml:4-14). Live migration withlibvirt_tls(hostname-based) and RabbitMQ name resolution may need a fullbootstrap-serversrun later (fact sheet E §3).
2. Add a compute node¶
CODE deploy --limit compute004 (after bootstrap-servers --limit and pull --limit), read from the plays and
task files:
- On compute004: 10 containers created, one per
compare_containeritem of a compute: fluentd, kolla_toolbox, cron (common), iscsid (enable_iscsidfollows the Cinder LVM backend), openvswitch_db, openvswitch_vswitchd, neutron_openvswitch_agent, nova_libvirt, nova_ssh, nova_compute (roles/common/defaults/main.yml:3-32;roles/iscsi/defaults/main.yml:3-6, :62-67,group_vars/all.yml:753, :794, playsite.yml:439-452;roles/openvswitch/defaults/main.yml:3-35;roles/neutron/defaults/main.yml:26-49;roles/nova-cell/defaults/main.yml:3-21, :53-64; groups ininventory/multinode). The count is the same as in 2023.1 (Compute scaling §2). The number of task results is NOT AVAILABLE. - New in 2024.1,
hostnqn: the nova-cell config step writes/etc/kolla/nova-compute/hostnqnon the compute,nqn.2014-08.org.nvmexpress:uuid:followed by a UUID computed fromansible_facts.hostname, and notifies the nova-compute restart (roles/nova-cell/tasks/config.yml:203-216,roles/nova-cell/templates/hostnqn.j2:1).kolla_set_configscopies it to/etc/nvme/hostnqnin thenova_computecontainer (roles/nova-cell/templates/nova-compute.json.j2:59-64). The UUID is a name-baseduuid5of the hostname CODE (ansible-core 2.16.20lib/ansible/plugins/filter/core.py:346-354), so it depends only on the hostname: a new compute that reuses a former host's hostname gets the same NQN. 2023.1 wrote no such file (nohostnqnin itsansible/tree). Whether a storage backend uses it is NOT AVAILABLE. - Order on the new host:
nova.ymlis imported before theopenvswitchandneutronplays (site.yml:609, :611-624, :671-693). So on compute004 thenova_computecontainer is started, and its registration awaited, beforeopenvswitch_db,openvswitch_vswitchdandneutron_openvswitch_agentexist. The wait only looks for the compute service inopenstack compute service list(roles/nova-cell/tasks/wait_discover_computes.yml:8-43). Still holds in 2024.1. NOT AVAILABLE Whether instances can be scheduled on compute004 successfully before the later plays finish (Execution flow §2.4). - Elsewhere (via
delegate_to):- a Neutron bootstrap (DB sync) container on
control01(roles/neutron/tasks/bootstrap_service.yml:2-21, imported byroles/neutron/tasks/bootstrap.yml:38;neutron-serveris a child ofcontrol,inventory/multinode:252-253); nova-manage cell_v2 list_cells(one-shotnova_list_cellscontainer) anddiscover_hosts(throughkolla_container_engine exec -t nova_conductor) oncontrol01(roles/nova-cell/tasks/discover_computes.yml:4-23,get_cell_settings.yml:2-21;nova-conductor→nova→control,inventory/multinode:99-100, :230-231). Changed in 2024.1: theexecgets-t(discover_computes.yml:17). A failure of this block stops every host of the play (any_errors_fatal: true,discover_computes.yml:23);openstack compute service listthroughkolla_toolboxoncontrol01, retried up to 20 times every 10 s until the new compute's service is registered (roles/nova-cell/tasks/wait_discover_computes.yml:8-43).
- a Neutron bootstrap (DB sync) container on
- Facts: gathered for all 12 hosts (the 10 of the assumed deployment, compute004 and the
localhostof[deployment],inventory/multinode:32-33). The new compute itself runs the delegatedsetuploop sequentially (gather-facts.yml:34-62). - Not touched: existing computes, apart from the delegated
setupabove. Controllers get no config writes or restarts, only delegated tasks: those listed above, the fact gathering above (setupon all three controllers), and the Neutron DB and DB-user tasks (mysql_db,mysql_userrun throughkolla_toolbox) oncontrol01(roles/neutron/tasks/bootstrap.yml:2-36). The Nova plays that target controllers (API and cell DB bootstrap, thenovarole, the scheduler cell-cache refresh) have no host in the limit, so they do not run (nova.yml:29-33, :67-71, :103-109, :152-156). - Run on compute004 but aimed at shared services: the Neutron Keystone registration (
service-ks-register) runs once, with nodelegate_to, so through thekolla_toolboxof compute004 itself (roles/neutron/tasks/deploy.yml:4,roles/neutron/tasks/register.yml:2-8,roles/service-ks-register/tasks/main.yml:2-126,run_onceat:126). - Caveats:
- Existing hosts'
/etc/hostsis not updated (bootstrap-servers --limit). - With
libvirt_tls: true(hostname-based migration), the other computes'/etc/hostslacks the new host until a fullbootstrap-serversrun, which carries its own Docker-restart risk (R14): the collectiondockerrole still notifiesRestart dockerfrom its config tasks (collectionroles/docker/tasks/config.yml:52-53, :113-114, handlerroles/docker/handlers/main.yml:10-15). Thepodmanrole has no handlers (its role directory holds onlydefaults/andtasks/). NOT AVAILABLE Whether live migration to the new compute fails meanwhile (fact sheet E §3).
- Existing hosts'
Related¶
- Risk register — R14 (
bootstrap-serversre-run on a live host), which this page names, and R23 (any run with--limiton a large inventory) - Nova — service cards of the roles
novaandnova-cell, and where to look - Pre-execution checklist — the checks before every production run
- Compute scaling
§2 — work per
compute host, read from the task files: the
compare_containeritems of a compute (10 in 2024.1, §2) - Execution flow §2.4 — compute node deployment: what one compute host experiences
- Fact sheet E §3 —
/etc/hostsgeneration - Reconfigure Nova §6 — the checks listed after a Nova
run (
openstack compute service list,nova-manage cell_v2 list_hosts); this page lists none