possible container states/statuses [message #42727] |
Mon, 16 May 2011 13:43 |
knawnd
Messages: 27 Registered: April 2011
|
Junior Member |
|
|
Hi!
I wonder what the possible container states/statuses are and how they
can be detected?
I read about 'status' option in 'man vzctl' which is below:
================
status
Shows a container status. This is a line with five or six words,
separated by spaces.
First word is literally CTID.
Second word is the numeric CT ID.
Third word is showing whether this container exists or not,
it can be either exist or deleted.
Fourth word is showing the status of the container
filesystem, it can be either mounted or unmounted.
Fifth word shows if the container is running, it can be
either running or down.
Sixth word, if exists, is suspended. It appears if both a
container and its dump file exist (see chkpnt).
[...]
================
So I tried to summarize possible CT states as the following ('+' means
states is possible and '-' it is impossible):
exist mounted down (-)
exist mounted running (+)
exist unmounted down (+)
exist unmounted running (-)
exist unmounted down suspended (+)
deleted unmounted down (+)
deleted mounted down (-)
deleted mounted running (-)
deleted unmounted down (-)
Could someone confirms these are all possible container states, please?
Can container for some reason crash? If it can then what the 'vzctl
status' shows for it?
Thanks,
Nikolay.
|
|
|
|
|
|
|
Re: possible container states/statuses [message #42736 is a reply to message #42735] |
Tue, 17 May 2011 06:48 |
knawnd
Messages: 27 Registered: April 2011
|
Junior Member |
|
|
> $ vzctl status 103
> CTID 103 exist mounted running
>
> As one can see 'vzctl status' doesn't show running CT as suspended. So
> what is the proper way to detect that state (running and suspended CT)?
I guess because 'suspended' is missing from the output of 'vzctl status'
command for such CT the attempt to stop a CT in such state (running and
suspended) has to be properly traced. For example, 'vzctl stop <CT_ID>'
has to print something like "CT is running and suspended. Please, resume
it by executing 'vzctl chkpnt <CTID> --resume' command in order to stop
it". Right now the action 'vzctl stop <CTID>' on running and suspended
CT ends with "Unable to stop container: operation timed out" what is
expected.
Regards,
Nikolay.
|
|
|