[lxc-users] Question about "lxc-wait"
Tycho Andersen
tycho.andersen at canonical.com
Mon Aug 31 14:02:28 UTC 2015
On Mon, Aug 31, 2015 at 02:57:15PM +0100, Thouraya TH wrote:
> Hello all :)
>
> Here is my script: i try to do the dumping process in parallel with its
> running
>
> #!/bin/bash
> if [ $# -ne 1 ]
> then
> echo "USE: ./Dumping.sh worker-name"
> else
>
> lxc-start -n $1 *& my_pid=$!*
> sleep 10
> mkdir $1
> while lxc-checkpoint -D /home/$1 -n $1 * $my_pid*
> do
> sleep 20
> done
> fi
> -----------
> Please, is it possible to use lxc-wait and change my script like this:
Sure, although it looks like there are several bugs.
> #!/bin/bash
> if [ $# -ne 1 ]
> then
> echo "USE: ./Dumping.sh worker-name"
> else
>
> lxc-start -n $1
> sleep 10
> mkdir $1
This creates a relative directory, while,
> while lxc-wait -n $1 -s *STOPPED*
> do
>
> lxc-checkpoint -D /home/$1 -n $1
it's not clear that this is in the same path.
It's also not clear to me why you are checkpointing the same container
in a while loop. If you checkpoint it once, it should be checkpointed,
no? This also does not accomplish your goal of checkpointing things in
parallel, as the entire script runs serially.
Tycho
> sleep 20
> done
> fi
>
> Thank you so much for answers.
> Kind regards.
> _______________________________________________
> lxc-users mailing list
> lxc-users at lists.linuxcontainers.org
> http://lists.linuxcontainers.org/listinfo/lxc-users
More information about the lxc-users
mailing list