Add a timeout option to lxc-wait
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
lxc (Ubuntu) |
Fix Released
|
Wishlist
|
Unassigned |
Bug Description
Current implementation of lxc-wait wait forever until the container reach a states passed in argument.
If for some reason the container hangs (in my case it was blocking while trying to bind mount a device) lxc-wait never exit the wait loop.
It'd be nice to have a timeout option and exit with a non-zero exit status if it reaches the timeout, something like:
lx-wait -d DURATION -n NAME -s STATE
It's a wishlist item, timeout from coreutils can be used for this purpose.
ProblemType: Bug
DistroRelease: Ubuntu 12.10
Package: lxc 0.8.0~rc1-4ubuntu17
ProcVersionSign
Uname: Linux 3.5.0-2-generic x86_64
ApportVersion: 2.2.5-0ubuntu1
Architecture: amd64
Date: Mon Jul 2 18:05:24 2012
ProcEnviron:
TERM=xterm
PATH=(custom, user)
LANG=en_US.UTF-8
SHELL=/bin/bash
SourcePackage: lxc
UpgradeStatus: Upgraded to quantal on 2012-01-31 (152 days ago)
Changed in lxc (Ubuntu): | |
importance: | Undecided → Wishlist |
status: | New → Triaged |
Serge added the timeout option to the wait() call in the API last week, so once we start rewritting the tools to use the API, we'll get that for free.