OpenVZ Forum


Home » General » Support » BUG: "prlctl destroy <UUID>" autostarts containers
BUG: "prlctl destroy <UUID>" autostarts containers [message #53710] Wed, 18 November 2020 21:13 Go to previous message
mstauber is currently offline  mstauber
Messages: 7
Registered: April 2009
Junior Member
Hello,

I just ran into a nasty "split-brain" situation because of something that appears a bug. \o/

Situation:

Two nodes, "master" and "slave". Both have the same CTs. "master" actively runs them, while "slave" has a copy of each CT for backup purposes.

Relevant versions involved:

[root@slave ~]# cat /etc/redhat-release 
Virtuozzo Linux release 7.8

[root@slave ~]# prlctl --version
prlctl version 7.0.201

[root@slave ~]# uname -a
Linux master.xxx.xxx 3.10.0-957.12.2.vz7.96.21 #1 SMP Thu Jun 27 15:10:55 MSK 2019 x86_64 x86_64 x86_64 GNU/Linux

Yes, both nodes haven't been rebooted in a few months, so the running kernel is a bit older. Mea culpa. Uptime is king.

On "slave" I needed to remove an older CT. Which was stopped. In fact all CTs on "slave" were stopped AND had "autostart" off:

[root@slave ~]# prlctl list --info|grep Autostart
Autostart: off
Autostart: off
Autostart: off
Autostart: off
Autostart: off
Autostart: off
Autostart: off
Autostart: off
Autostart: off
Autostart: off

So I ran "prlctl destroy ff717715-916c-497d-b9b5-bfab7cf8e3b5" and the CT in question was gone.

All good? Hell no! Take a look at this:

[root@slave ~]# cat /var/log/vzctl.log|grep "2020-11-18"|egrep "Start|destroyed"
2020-11-18T12:13:54-0600 vzctl : CT ff717715-916c-497d-b9b5-bfab7cf8e3b5 : Container private area was destroyed
2020-11-18T12:14:40-0600 vzctl : CT e8f386c2-08b5-45b9-b3ec-74e825ab082a : Starting Container ...
2020-11-18T12:14:40-0600 vzctl : CT f539028b-89a3-4f48-ad3a-6ea123e84d68 : Starting Container ...
2020-11-18T12:14:40-0600 vzctl : CT 48073f02-aeb7-4be8-911a-94daf2ce410d : Starting Container ...
2020-11-18T12:14:40-0600 vzctl : CT 3e2b0ace-604f-4297-9136-66f0cd0b48dc : Starting Container ...
2020-11-18T12:14:40-0600 vzctl : CT 4d615464-229e-4bfd-9b99-638563d116de : Starting Container ...
[...]

So *right* after destroying ff717715 as desired, without being asked to do so OpenVZ started up all *other* containers. Despite them all having 'autostart' off.

And of course the CTs on "slave" won the ARP-roulette and started serving traffic, which caused a hell of a mess.

I'm sorry, but why does deletion of a CT cause OpenVZ to fire up all stopped CTs even if they have "autostart" off? That's HIGHLY unexpected behavior.


With best regards,

Michael Stauber
 
Read Message
Read Message
Previous Topic: OpenVZ 7 OOM killing systemd in containers
Next Topic: Installing CentOS 7 packages on OpenVZ 7
Goto Forum:
  


Current Time: Thu Mar 28 20:11:26 GMT 2024

Total time taken to generate the page: 0.01638 seconds