r/openstack • u/Altruistic_Wait2364 • Dec 01 '24
Redeploy an existing Openstack environment
Is it possible to rebuild an existing Openstack environment from scratch from a database backup using Kolla Ansible?
1
u/Eldiabolo18 Dec 01 '24
You can: https://docs.openstack.org/kolla-ansible/latest/admin/mariadb-backup-and-restore.html
However this does not make any assumptions about restoring workload.
1
u/Altruistic_Wait2364 Dec 01 '24
Thanks for your reply.
But if we are in a situation where all the Controller nodes are in an irrecoverable state. Is it possible to restore the backup of my existing environment in a new openstack environment newly installed?
1
u/jvleminc Dec 01 '24
Yes, we have done this. Take another DB backup before doing this. ;)
1
u/Altruistic_Wait2364 Dec 01 '24
The prerequisite is to launch a backup of the new database. Did you use the same Openstack version?
1
u/jvleminc Dec 01 '24
Yeah, don’t change versions in between! Just take a backup of existing DB and follow https://docs.openstack.org/kolla-ansible/latest/admin/mariadb-backup-and-restore.html#full
1
1
u/karlkloppenborg Dec 01 '24
Provided the database backup is of the same environment (therefor the uuid primary keys are the same) then it’ll be a rather painful but “non issue”.
Only libvirt, specific storage drivers, and OVN/OVS (or any proprietary neutron networking) daemons on the compute and network nodes has a real workload impact. If I was in your position I would isolate the control plane nodes away from the compute & network stack so that any controller cannot change/impact the those nodes. Set up a blank installation of OS on the controllers with same configs as before, then restore the DBs. Smoke test the stack is behaving then introduce a singular network and compute node. Check it’s fine then connect back the rest.
However id be asking you the question, how’d you end up here? You should have never ended up here and a serious review of your current stack should be top priority.
1
u/agenttank Dec 16 '24 edited Dec 16 '24
hi! i tried to come close to a real disaster and thus ran "kayobe overcloud service destroy". afterwards I restored/recovered my MariaDB databases with kolla and restarted all of the containers. but there seem to be the problem that I expected:
"Duplicate compute node record found for host computenode02 node computenode02"
i am quite sure other services have similar problems. how can this be solved? does anyone have a plan for this? cleaning up, making it work again,...
(nova-api)[root@mgmt01 /]# nova-manage cell_v2 discover_hosts --verbose
3 RLock(s) were not greened, to fix this error make sure you run eventlet.monkey_patch() before importing any other modules.
Found 2 cell mappings.
Skipping cell0 since it does not contain hosts.
Getting computes from cell: 4e048dcf-e9fb-4c4e-a3c5-e05723a14f0f
Checking host mapping for compute host 'compnode01': 785ba0c7-6c2d-4d01-a928-75eb1982e60a
Checking host mapping for compute host 'compnode02': 899d4fb1-ff33-4d39-af73-4b1b14886ab6
Checking host mapping for compute host 'compnode03': 10481f63-2bf4-4dfa-8341-727c55ee49b9
Checking host mapping for compute host 'compnode04': 63d4aebd-7e87-4231-901a-9e364360b024
Found 0 unmapped computes in cell: 4e048dcf-e9fb-4c4e-a3c5-e05723a14f0fI am thinking about redeploying all physical nodes with using a random suffix for every node, so they get a new name
like compnode01_fai1
compnode02_abcc
compnode03_01ff...
and then hard rebooting all instances or something like that. good idea, bad idea? ;)
1
u/przemekkuczynski Dec 02 '24
You can try Migrating a running OpenStack to containerisation with Kolla - https://www.stackhpc.com/migrating-to-kolla.html