Skip to content

Step 5 — OpenStack control plane

Where: bastion. Command: scripts/bastion/06-openstack-controlplane.sh

In short

  • One resource, OpenStackControlPlane, describes the whole control plane. Nearly every Day-2 operation is an edit of this resource.
  • No order is scripted: each operator waits for what it depends on and reports the wait in the conditions of its resource.
  • Passwords are generated into the Secret osp-secret and exist nowhere else.
  • Done when the control plane shows True, "Setup complete". On the lab all pods were running ten minutes after the oc apply.

What we deploy

The OpenStack control plane services, as pods in the openstack namespace: Galera (two database servers), RabbitMQ (two message buses), Memcached, DNS, Keystone, Placement, Glance, Neutron with OVN, and Nova.

The three inputs

Input File Kolla-Ansible analogy
Secret osp-secret generated by the script passwords.yml
NetworkAttachmentDefinitions and NetConfig deployment/openstack/controlplane/networks.yaml.tmpl network_interface, api_interface, tunnel_interface and the address pools
OpenStackControlPlane deployment/openstack/controlplane/openstackcontrolplane.yaml.tmpl globals.yml + /etc/kolla/config/

Read the control plane manifest before applying it. It is commented and is the single most important file of the lab: nearly every Day-2 operation is an edit of this resource.

What happens after oc apply

OpenStackControlPlane "openstack"
   │  openstack-operator creates one CR per section
   ├── Galera "openstack", "openstack-cell1"      ─ mariadb-operator ─> StatefulSets + PVCs
   ├── RabbitMq "rabbitmq", "rabbitmq-cell1"      ─ infra-operator   ─> StatefulSets + PVCs
   ├── Memcached, DNSMasq                         ─ infra-operator
   ├── KeystoneAPI "keystone"                     ─ keystone-operator ─> db-sync Job, bootstrap Job, Deployment
   ├── PlacementAPI, Glance, NeutronAPI           ─ ...
   ├── OVNDBCluster ×2, OVNNorthd, OVNController  ─ ovn-operator
   ├── Nova (API, scheduler, conductors, metadata, novncproxy) ─ nova-operator
   └── OpenStackClient                            ─> the "openstackclient" pod

The order is not scripted anywhere. Each operator waits for what it depends on (Keystone waits for its database, Nova waits for Keystone, Placement and RabbitMQ) and reports that wait in the conditions of its resource. Watch it converge:

[READ-ONLY]

oc -n openstack get openstackcontrolplane openstack -w
oc -n openstack get pods -w

To see what the control plane is currently waiting for:

[READ-ONLY]

oc -n openstack get openstackcontrolplane openstack \
  -o jsonpath='{range .status.conditions[?(@.status!="True")]}{.type}: {.message}{"\n"}{end}'

Concepts worth understanding here

  • Public and internal endpoints. Each API has a public endpoint exposed as an OKD Route (https://keystone-public-openstack.apps.<cluster domain>) and an internal endpoint on the internalapi network (a MetalLB address). All internal endpoints share one address and differ by port, like an internal VIP.
  • customServiceConfig. The Glance and Neutron sections contain configuration snippets. The operator merges them into the generated configuration; changing them later triggers a controlled restart. This is practised in ../operations/04-change-service-configuration.md.
  • Passwords live in the cluster only. To use the admin account from the openstackclient pod you need nothing; to read a password:

    [READ-ONLY]

    oc -n openstack get secret osp-secret -o jsonpath='{.data.AdminPassword}' | base64 -d; echo
    

Verify

[READ-ONLY]

oc -n openstack get openstackcontrolplane
oc -n openstack get pods
oc -n openstack get pvc
oc -n openstack get svc -o wide | grep LoadBalancer
oc -n openstack get routes
oc -n openstack rsh openstackclient openstack endpoint list
oc -n openstack rsh openstackclient openstack compute service list
oc -n openstack rsh openstackclient openstack network agent list

Expected: the control plane True, "Setup complete"; 20 pods Running (the job pods are removed when they finish); seven PVCs Bound; LoadBalancer services with addresses in the .80–.90 ranges (172.17.0.80 shared by the internal API endpoints, .85 and .86 for the two RabbitMQ, 192.168.122.80 for DNS). compute service list shows scheduler and conductors but no nova-compute yet — that is step 6.

On the lab all pods were running ten minutes after the oc apply. The node then uses about 60 % of its 32 GiB.

If something fails

Start from the control plane conditions (command above): the message names the service that is not ready. Then:

Symptom Look at
Pods Pending oc -n openstack describe pod <pod> → events. Unbound PVC: ../troubleshooting/storage.md. Insufficient memory: ../troubleshooting/resource-exhaustion.md
Pods ContainerCreating for minutes Network attachment problems: ../troubleshooting/network.md
A Service of type LoadBalancer with <pending> address MetalLB pools: ../troubleshooting/network.md
CrashLoopBackOff oc -n openstack logs <pod> --previous; ../troubleshooting/pod-pending-or-crashloop.md
A condition stays False with no failing pod ../troubleshooting/reconciliation-not-progressing.md

Previous: Step 4 — OpenStack operators · Next: Step 6 — OpenStack data plane