Ask Your Question
0

Can I manually edit Mysql

asked 2020-02-06 14:16:49 -0500

hkominos gravatar image

Hi all . my live tripleo installation has some garbage in mysql. For example in nova If I go for openstack server list I see my 19 servers.

However in the DB in nova.instances I see 39.

MariaDB [nova]> select id,uuid,node from instances;
+-----+--------------------------------------+--------------------------------------+
| id  | uuid                                 | node                                 |
+-----+--------------------------------------+--------------------------------------+
| 273 | bc20ff59-e8a2-4d51-99aa-94f1eea46303 | 390090cd-42a5-48d5-9a94-627682209ed6 |
| 274 | e8e148d4-8a9c-4a57-b0d0-b29230730c42 | b436a27a-8d1d-4843-9d6b-d41408978bad |
| 275 | 2faf06b6-348f-4928-8609-63a163b05283 | c8dad582-aab2-4800-887a-cbbea31f2006 |
| 276 | cf23b7be-c339-482c-8320-33528c640916 | 65923e0f-b1db-4144-8b3a-76ab90d9eaa6 |
| 277 | 0c83ce69-b241-43dd-9af2-8894eefe2db6 | 2d48ec07-e053-482e-9f97-6af939c85d7e |
| 294 | 266f55b7-c5c8-4dcf-b0b8-224d44693379 | d2882a48-44f5-42ab-a785-dbaf872f76ca |
| 297 | 40ab4957-7aa9-4e9d-9c2f-d4e1bd244cf4 | 9bfd88f9-6c50-4481-8d8a-aa69665ba7dc |
| 298 | bd8d8791-cb70-43eb-ac1c-8f4479a9d7f5 | f2ef7b97-a282-4a7e-96f1-22e9261bd953 |
| 305 | c81e4824-2d19-4118-ab93-abe9760de92d | d8b4ea1f-f8c8-4662-8108-5458a04ef225 |
| 306 | 10c672c4-84e9-43fa-86dd-ecd80ee0c2b7 | a827fd58-d05c-4903-845a-4eb9bdedc778 |
| 309 | 5fd2990a-994e-44f4-adfa-353e277570a0 | 0fec231c-1694-4094-829d-f1bef0e88d34 |
| 311 | 80f15b56-5112-4da4-b16f-fa496f10ff00 | e9c8199b-a252-40fb-a6e6-eb2150b6ca20 |
| 320 | 6ae178e8-ae34-415c-832f-e557059111e5 | fd9aea67-63d6-40cc-a071-deb456b45541 |
| 322 | b3d60067-2c68-4fe0-8213-3635839d6ed2 | 5f6690af-a080-4d41-891c-47de2579a234 |
| 323 | 9f11a37f-cf31-40c5-8661-8e60cf389a1b | cf02f9e2-9406-441e-b6c3-ee94f581f265 |
| 324 | e65cf581-2447-4bb3-919c-2c3f11894aff | 68bcaaaf-ac94-4d53-a9f2-878dd66e9131 |
| 325 | 7052d51b-5ff3-4e71-b38b-f23c82ef056a | f0c7b45e-feb2-4eb1-bffa-7ca528f6c668 |
| 326 | 9a60e3cc-d616-4d70-a71e-5f49006bde02 | cf02f9e2-9406-441e-b6c3-ee94f581f265 |
| 327 | 36463bc2-20e0-4e3a-b1fa-ca5d48984279 | f0c7b45e-feb2-4eb1-bffa-7ca528f6c668 |
| 328 | e3ac10d7-aaab-49f2-b0bc-418004f8ab95 | cf02f9e2-9406-441e-b6c3-ee94f581f265 |
| 329 | 3580f539-bbdd-47b5-83b2-e7edaec1f2f5 | 68bcaaaf-ac94-4d53-a9f2-878dd66e9131 |
| 330 | 08958a66-1698-4175-920f-cd34cb6af10e | 8a600f76-aa2f-4d3d-9fff-b16f88e6df84 |
| 331 | 0479b9a9-26a0-4c02-b5db-7b2e38e8bcf0 | fd9aea67-63d6-40cc-a071-deb456b45541 |
| 332 | 647e361c-5695-44ad-bce9-8c620754a441 | 5f6690af-a080-4d41-891c-47de2579a234 |
| 333 | 5c133733-f637-4c0d-a486-36b57ba1aaa6 | NULL                                 |
| 334 | de44da49-dd89-40d2-8df1-59565ded8350 | NULL                                 |
| 335 | 6c81e4d6-1be2-4247-8191-e5d8205a9f86 | NULL                                 |
| 336 | 4e0c951b-5100-45f7-b97e-687ec935bfe9 | NULL                                 |
| 337 | bedd2ff5-7bcc-4b4a-98d1-3f04e32a8311 | NULL                                 |
| 338 | 774861c2-5a04-4da6-8c0c-4f88f7605afe | NULL                                 |
| 339 | 9e1ba0aa-54c1-46b3-aa14-774acc97781f | 9bfd88f9-6c50-4481-8d8a-aa69665ba7dc |
| 340 | c9dd5ce1-ea30-41a3-b40e-ffb9c9198884 | 4259d846-275f-4c17-829d-8e66b0feb59a |
| 341 | b3828fa1-c473-4160-bf36-5cc020c1d6bc | b436a27a-8d1d-4843-9d6b-d41408978bad |
| 342 | 5fe71be7-13c8-4d68-9ebd-09564d18d9da | f2ef7b97-a282-4a7e-96f1-22e9261bd953 |
| 343 | c251b111-0232-4ad0-bf30-47f4a3ca44ca | a827fd58-d05c-4903-845a-4eb9bdedc778 |
| 344 | 695b192d-4575-4cb2-9616-1b44c3a99c7c | 0fec231c-1694-4094-829d-f1bef0e88d34 |
| 345 | 6340a486-1087-46a7-8c1b-c00b327834d6 | f0b5349d-5817-4300-8f44-d467e80399e0 |
| 346 | 23c1ec83-f764-41a0-877c-937a23075a05 | d8b4ea1f-f8c8-4662-8108-5458a04ef225 |
| 347 | 943b0f51-9cf8-4849-af81-026906857e57 | d2882a48-44f5-42ab-a785-dbaf872f76ca |
+-----+--------------------------------------+--------------------------------------+

while

(undercloud) [stack@osk-comp03 ~]$ openstack server list
+--------------------------------------+------------------------+--------+---------------------+----------------+-------------+
| ID                                   | Name                   | Status | Networks            | Image          | Flavor      |
+--------------------------------------+------------------------+--------+---------------------+----------------+-------------+
| 695b192d-4575-4cb2-9616-1b44c3a99c7c | compute7               | ACTIVE | ctlplane=10.6.9.193 | overcloud-full | computebond |
| c251b111-0232-4ad0-bf30-47f4a3ca44ca | compute8               | ACTIVE | ctlplane=10.6.9.203 | overcloud-full | computebond |
| 5fe71be7-13c8-4d68-9ebd-09564d18d9da | compute9               | ACTIVE | ctlplane=10.6.9.192 | overcloud-full | computebond |
| b3828fa1-c473-4160-bf36-5cc020c1d6bc | compute6               | ACTIVE | ctlplane=10.6.9.187 | overcloud-full | computebond |
| 9e1ba0aa-54c1-46b3-aa14-774acc97781f | compute10              | ACTIVE | ctlplane=10.6.9.185 | overcloud-full | computebond |
| c9dd5ce1-ea30-41a3-b40e-ffb9c9198884 | compute11              | ACTIVE | ctlplane=10.6.9.198 | overcloud-full | computebond |
| 647e361c-5695-44ad-bce9-8c620754a441 | compute4               | ACTIVE | ctlplane=10.6.9.216 | overcloud-full | computebond |
| 0479b9a9-26a0-4c02-b5db-7b2e38e8bcf0 | compute5               | ACTIVE | ctlplane=10.6.9.186 | overcloud-full | computebond |
| 08958a66-1698-4175-920f-cd34cb6af10e | compute2               | ACTIVE | ctlplane=10.6.9.184 | overcloud-full | computebond |
| 3580f539-bbdd-47b5-83b2-e7edaec1f2f5 | compute3               | ACTIVE | ctlplane=10.6.9.223 | overcloud-full | computebond |
| e3ac10d7-aaab-49f2-b0bc-418004f8ab95 | compute0               | ACTIVE | ctlplane=10.6.9.201 | overcloud-full | computebond |
| 36463bc2-20e0-4e3a-b1fa-ca5d48984279 | compute1               | ACTIVE | ctlplane=10.6.9.206 | overcloud-full | computebond |
| 0c83ce69-b241-43dd-9af2-8894eefe2db6 | overcloud-controller-0 | ACTIVE | ctlplane=10.6.9.183 | overcloud-full | control     |
| cf23b7be-c339-482c-8320-33528c640916 | overcloud-controller-1 | ACTIVE | ctlplane=10.6.9.194 | overcloud-full | control     |
| 2faf06b6-348f-4928-8609-63a163b05283 | overcloud-controller-2 | ACTIVE | ctlplane=10.6.9.190 | overcloud-full | control     |
+--------------------------------------+------------------------+--------+---------------------+----------------+-------------+

Some of these I know that are garbage. Is it acceptable to manually remove entries from the DB or will I break everything ?

edit retag flag offensive close merge delete

Comments

How do you know that some of them are garbage? Can you explain how they ended up on your hypervisor but not in your database?

jengbers gravatar imagejengbers ( 2020-02-07 03:17:59 -0500 )edit

1 answer

Sort by ยป oldest newest most voted
0

answered 2020-02-06 21:37:50 -0500

You can remove entry, make sure all Resource associate with VM should be removed.

I.e port / groups/

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower

Stats

Asked: 2020-02-06 14:16:49 -0500

Seen: 48 times

Last updated: Feb 06