Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

'lxc-wait' command returns error code immediate if container is stopped #2027

Closed
aston-r opened this issue Dec 12, 2017 · 2 comments
Closed

Comments

@aston-r
Copy link

aston-r commented Dec 12, 2017

Hi,

$subj

[$]> lxc-start --version                                                                                                                     
2.1.1

STR:
-stop container
-run lxc-wait -n <container name> --state=RUNNING

Here is an example

[#]> lxc-info -sn container1
State:          STOPPED
[$]> lxc-wait -n container1 --state=RUNNING --timeout=600
[$]> echo $?
1

The issue is not reproducible on lxc-2.0.X. Also 'lxc-wait' command works for other statuses if the container is started. Please advice.

@brauner
Copy link
Member

brauner commented Dec 12, 2017

Right, this is an issue caused by the deprecation of the lxc-monitord binary which would've simply caused this to block. I was waiting for someone to bring this up and whether we need to think about a solution to this. So one way to deal with this for now is essentially to use lxc-monitor which will block. But it will report the states for all containers under a given path.

brauner pushed a commit to brauner/lxc that referenced this issue Jan 17, 2018
Closes lxc#2027.
Closes lxc/go-lxc#98.

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
@brauner
Copy link
Member

brauner commented Jan 17, 2018

Should be closed by #2089 .

brauner pushed a commit to brauner/lxc that referenced this issue Jan 17, 2018
Closes lxc#2027.
Closes lxc/go-lxc#98.

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
brauner pushed a commit that referenced this issue Jan 19, 2018
Closes #2027.
Closes lxc/go-lxc#98.

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
geaaru pushed a commit to geaaru/lxc that referenced this issue Jul 4, 2018
Closes lxc#2027.
Closes lxc/go-lxc#98.

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants