[lxc-users] strange behaviour of grep on lxc-info

Stéphane Graber stgraber at ubuntu.com
Tue Sep 9 14:59:09 UTC 2014


On Mon, Sep 08, 2014 at 11:27:14PM +0200, Tamas Papp wrote:
> 
> hi All,
> 
> # lxc-info -n jay|grep RU
> State:          RUNNING
> State:          RUNNING
> 
> # lxc-info -n jay|grep ve
> Link:           veth2O2K6R
> 
> # lxc-info -n jay|grep jay
> Name:           jay
> Name:           jay
> Name:           jay
> 
> # lxc-info -n jay|grep IP
> IP:             10.0.0.55
> IP:             10.0.0.55
> IP:             10.0.0.55
> IP:             10.0.0.55
> IP:             10.0.0.55
> IP:             10.0.0.55
> IP:             10.0.0.55
> IP:             10.0.0.55
> IP:             10.0.0.55


Interesting bug :)

Note that in most cases you can just query the one field you care about
in a parsable way, e.g. lxc-info -n jay -i -H

> 
> 
> 
> 
> Does anybody have an idea?:)
> 
> 
> 10x
> tamas
> 
> 
> ps.: Is there a nicer way to check the state of container? Something like:
> 
> # lxc-info -n t1 --state RUNNING
> STOPPED
> 
> # echo $?
> 1

lxc-wait -t0 -n t1 -s RUNNING

> _______________________________________________
> lxc-users mailing list
> lxc-users at lists.linuxcontainers.org
> http://lists.linuxcontainers.org/listinfo/lxc-users

-- 
Stéphane Graber
Ubuntu developer
http://www.ubuntu.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.linuxcontainers.org/pipermail/lxc-users/attachments/20140909/06b34faa/attachment.sig>


More information about the lxc-users mailing list