[Lxc-users] python api

Papp Tamas tompos at martos.bme.hu
Wed Mar 6 16:03:28 UTC 2013


On 03/04/2013 07:44 PM, Papp Tamas wrote:
>
> How does python api works what does it look for?
> Or maybe there is an issue only in lxc-ls:
>
> If I see correctly, it checks if /var/lib/lxc/$container/config file exists.
> I tried without the lxcpath setting as well.
> Than I see, it want's to connect to /var/lib/lxc/$container/command file and close the session.
>
>
>
> # lxc-ls --fancy
> NAME        STATE    IPV4  IPV6
> -------------------------------
> af          STOPPED  -     -
> [ and all of the container ]
>
> Containers are running fine.

Any thoughts about this?
Now I'm not able to reproduce exactly this behaviour, because(?) I reinstalled the storage pool and 
now it works more or less fine. I guess something has changed.


# lxc-ls --fancy -P /data/lxc
NAME    STATE    IPV4  IPV6
---------------------------
tipper  STOPPED  -     -


# lxc-ls --fancy -P /var/lib/lxc
lxc-attach: failed to get the init pid
lxc-attach: failed to get the init pid
NAME    STATE    IPV4  IPV6
---------------------------
tipper  RUNNING  -     -



> --- lxc-ls.ORIG	2013-03-04 19:41:41.923080356 +0100
> +++ lxc-ls	2013-03-04 19:42:57.812013651 +0100
> @@ -132,7 +132,7 @@
>                        help=_("use fancy output"))
>
>    parser.add_argument("--fancy-format", type=str, default="name,state,ipv4,ipv6",
> -                    help=_("comma separated list of fields to show"))
> +                    help=_("comma separated list of fields to show (default: name,state,ipv4,ipv6)"))
>
>    parser.add_argument("--nesting", dest="nesting", action="store_true",
>                        help=_("show nested containers"))

I suggest this change for make it obvious, it has tob be lower case (at least it doesn't work for me 
with uppercase).



Cheers,
tamas









More information about the lxc-users mailing list