Skip to content

Commit 9853fc5

Browse files
authored
Remove a compute service (#263)
Signed-off-by: Christian Berendt <berendt@osism.tech>
1 parent cda6a98 commit 9853fc5

File tree

2 files changed

+67
-0
lines changed

2 files changed

+67
-0
lines changed

docs/guides/operations-guide/openstack/day2-operations/resource-manager.md

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,38 @@ sidebar_position: 52
55

66
# Resource Manager
77

8+
## Preparations
9+
10+
Prepare use of the OpenStack Resource Manager.
11+
12+
```
13+
git clone https://github.com/osism/openstack-resource-manager
14+
cd openstack-resource-manager
15+
pipenv install
16+
pipenv shell
17+
```
18+
19+
Prepare cloud profile `admin` in `clouds.yml` and `secure.yml` (use `clouds.yml.sample` and `secure.yml.sample`
20+
in the [openstack-resource-manager](https://github.com/osism/openstack-resource-manager) repository as sample files).
21+
22+
## Nova
23+
24+
### Live migration
25+
26+
Live migrate all instances from compute node `SOURCE` to compute node `TARGET`.
27+
28+
```
29+
$ python3 src/host-action.py --yes --disable --action live-migrate --host SOURCE --input TARGET
30+
```
31+
32+
### Evacutation
33+
34+
Evacuate all instances from compute node `SOURCE` to compute node `TARGET`.
35+
36+
```
37+
$ python3 src/host-action.py --yes --action evacutate --host SOURCE --input TARGET
38+
```
39+
840
## Octavia
941

1042
### Amphora rotation

docs/guides/operations-guide/openstack/nova.md

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,3 +58,38 @@ openstack --os-cloud admin compute service list --long
5858
| b77c5aeb-91c0-4972-84ea-7c8bd5a49fdd | nova-compute | testbed-node-0 | nova | disabled | up | 2023-12-14T14:20:24.000000 | None | False |
5959
+--------------------------------------+----------------+-----------------+----------+----------+-------+----------------------------+----------------------------------------------------+-------------+
6060
```
61+
62+
## Remove a compute service
63+
64+
1. Live migrate all instances running on the compute node
65+
with the help of the [OpenStack Resource Manager](./day2-operations/resource-manager#live-migration)
66+
67+
2. Evacuate all instances on the compute node
68+
with the help of the [OpenStack Resource Manager](./day2-operations/resource-manager#evacutation)
69+
70+
3. Ensure that no more instances are running on the compute node
71+
72+
```
73+
ps ax | grep qemu
74+
```
75+
76+
4. Stop all OpenStack Nova services on the compute node
77+
78+
```
79+
systemctl stop kolla-nova_ssh-container.service
80+
systemctl stop kolla-nova_libvirt-container.service
81+
systemctl stop kolla-nova_compute-container.service
82+
83+
5. Delete the compute service
84+
85+
```
86+
$ openstack --os-cloud admin compute service list
87+
+--------------------------------------+----------------+---------+----------+----------+-------+----------------------------+
88+
| ID | Binary | Host | Zone | Status | State | Updated At |
89+
+--------------------------------------+----------------+---------+----------+----------+-------+----------------------------+
90+
| f161d739-21de-4cb0-a5d3-d21cff652697 | nova-scheduler | manager | internal | enabled | up | 2023-12-21T11:52:59.000000 |
91+
| 646d16db-acd9-486c-bd16-8fe2c13bf198 | nova-conductor | manager | internal | enabled | up | 2023-12-21T11:53:04.000000 |
92+
| 90345eb5-cf2f-47ef-becc-758ee36fb132 | nova-compute | manager | nova | disabled | down | 2023-12-21T11:53:00.000000 |
93+
+--------------------------------------+----------------+---------+----------+----------+-------+----------------------------+
94+
$ openstack --os-cloud admin compute service delete 90345eb5-cf2f-47ef-becc-758ee36fb132
95+
```

0 commit comments

Comments
 (0)