[Users] Container Reboot on Node boot up

Kir Kolyshkin kir at openvz.org
Wed Dec 5 16:14:38 EST 2012


On 12/05/2012 08:39 PM, Mark Johanson wrote:
> This has been a curiosity question I have wondered about before, but
> never got around to asking:
>
> When a node boots up, why does openvz start all the containers, then go
> through and restart them all after they are all up?

Let me quote vz.conf(5) man page:

VZFASTBOOT=yes|no
If the value of this parameter is set to yes, vz initscript
called with start argument will start the containers with
uncleanly shutdown quota state without performing quota reini‐
tialization (which is usually a time-consuming process). After
all the containers are started, the initscript when restarts
those containers with unclean quota in a normal way (to recalcu‐
late/fix quotas).

I would like to add that

1. Normal system shut down should stop and unmount all containers, so
quota state should be clean. One case when quota is dirty and requires
recalculation on container start is after a power failure.

2. This only happens if the quota is enabled for a container, after an
unclean shutdown, and if VZFASTBOOT is set.

>
> I've also noticed this during container creation and wondered why it did
> it then as well.

Not sure what do you mean by this.
> Part of the reason for asking now, is due to a cPanel template we use
> that occasionally gets a mysql error due to race conditions between
> innodb log creation and the second reboot of the container.

disable VZFASTBOOT, or,
if you are not using per-container quota, disable quota for particular 
or all containers, or,
use ploop-based containers that doesn't need vzquota

> The log issue I have fixed, but was still curious on why there is the
> reboot after start up. Is this vzquota related?

Your guess is correct



More information about the Users mailing list