Quoting Stéphane Graber (stgra...@ubuntu.com):
> This commit does the following changes to the python API:
> - Rename the add_device API call to add_device_node
> - Adds an extra check that the container is running to add_device_node
> - Introduces a new add_device_net function
>
> And the foll
Re-arrange the code so that we only grab the container object when doing
something more than building a simple list of existing containers.
This means that now the following calls can run unprivileged:
- lxc-ls
- lxc-ls -1
Everything else will still require root privileges.
Signed-off-by: Stép
This commit does the following changes to the python API:
- Rename the add_device API call to add_device_node
- Adds an extra check that the container is running to add_device_node
- Introduces a new add_device_net function
And the following changes to the lxc-device tool:
- Change parser setu
Quoting Stéphane Graber (stgra...@ubuntu.com):
> On 12/04/2012 04:34 PM, Serge Hallyn wrote:
> > Quoting Stéphane Graber (stgra...@ubuntu.com):
> >> Instead of returning a python stacktrace, check what the current euid is
> >> and show an argparse error message similar to that used in
> >> lxc-sta
On 12/04/2012 04:34 PM, Serge Hallyn wrote:
> Quoting Stéphane Graber (stgra...@ubuntu.com):
>> Instead of returning a python stacktrace, check what the current euid is
>> and show an argparse error message similar to that used in
>> lxc-start-ephemeral.
>>
>> Signed-off-by: Stéphane Graber
>
>
Quoting Stéphane Graber (stgra...@ubuntu.com):
> Instead of returning a python stacktrace, check what the current euid is
> and show an argparse error message similar to that used in
> lxc-start-ephemeral.
>
> Signed-off-by: Stéphane Graber
Acked-by: Serge E. Hallyn
> ---
> src/lxc/lxc-devic
Quoting Stéphane Graber (stgra...@ubuntu.com):
> Instead of returning a python stacktrace, check what the current euid is
> and show an argparse error message similar to that used in
> lxc-start-ephemeral.
>
> Signed-off-by: Stéphane Graber
Wait, you must be root to call lxc-ls at all?
> ---
>
Quoting Stéphane Graber (stgra...@ubuntu.com):
> Use argparse's error function instead of our own print + exit.
>
> Signed-off-by: Stéphane Graber
Acked-by: Serge E. Hallyn
> ---
> src/lxc/lxc-start-ephemeral.in | 11 ---
> 1 file changed, 4 insertions(+), 7 deletions(-)
>
> diff --g
Use argparse's error function instead of our own print + exit.
Signed-off-by: Stéphane Graber
---
src/lxc/lxc-start-ephemeral.in | 11 ---
1 file changed, 4 insertions(+), 7 deletions(-)
diff --git a/src/lxc/lxc-start-ephemeral.in b/src/lxc/lxc-start-ephemeral.in
index ccf6059..e11919f
The LXC API currently doesn't work terribly well when the user isn't root for
a variety of reasons.
The python binding therfore immediately returns an exception if a non-root
user tries to access a container object (as the C calls would fail anyway).
These commits update the various python script
Instead of returning a python stacktrace, check what the current euid is
and show an argparse error message similar to that used in lxc-start-ephemeral.
Signed-off-by: Stéphane Graber
---
src/lxc/lxc-device | 6 ++
1 file changed, 6 insertions(+)
diff --git a/src/lxc/lxc-device b/src/lxc/lx
Instead of returning a python stacktrace, check what the current euid is
and show an argparse error message similar to that used in lxc-start-ephemeral.
Signed-off-by: Stéphane Graber
---
src/lxc/lxc-ls | 7 +++
1 file changed, 7 insertions(+)
diff --git a/src/lxc/lxc-ls b/src/lxc/lxc-ls
in
On 11/29/2012 04:24 PM, Dwight Engen wrote:
> The $LXCPATH (default /var/lib/lxc) directory was not being created by
> make install, so unless it gets created by some other means
> (packaging tools), commands such as lxc-create will fail.
>
> Signed-off-by: Dwight Engen
Acked-by: Stéphane Graber
Quoting Stéphane Graber (stgra...@ubuntu.com):
> > @@ -134,9 +133,12 @@ int lxc_execute(const char *name, char *const argv[],
> > int quiet,
> > .argv = argv,
> > .quiet = quiet
> > };
> > + int ret;
> >
> > if (lxc_check_inherited(conf, -1))
> > ret
On 12/04/2012 01:19 PM, Serge Hallyn wrote:
> When a physical nic is being set up, store its ifindex and original name
> in struct lxc_conf. At reboot, reset the original name.
> We can't just go over the original network list in lxc_conf at shutdown
> because that may be tweaked in the meantime t
On 12/04/2012 12:35 PM, Serge Hallyn wrote:
> Quoting Stéphane Graber (stgra...@ubuntu.com):
>> Re-introduce the old lxc-ls script and manpage under a new legacy
>> sub-directory.
>>
>> Those will be installed in place of their python equivalent when LXC
>> is built without --enable-python.
>>
>> A
On 12/03/2012 09:01 PM, Serge Hallyn wrote:
> Quoting Stéphane Graber (stgra...@ubuntu.com):
>> This rewrite is mostly compatible with the shell version.
>> --active and -1 still work and behave as they used to.
>>
>> This adds --running, --stopped and --frozen as state filters.
>>
>> A new "fancy"
When a physical nic is being set up, store its ifindex and original name
in struct lxc_conf. At reboot, reset the original name.
We can't just go over the original network list in lxc_conf at shutdown
because that may be tweaked in the meantime through the C api. The
saved_nics list is only setup
Quoting Stéphane Graber (stgra...@ubuntu.com):
> On 12/03/2012 08:41 PM, Serge Hallyn wrote:
> > Add 'lxc.logfile' and 'lxc.loglevel' config items. Values provided on
> > the command line override the config items.
> >
> > Have lxccontainer not set a default loglevel and logfile.
> >
> > Signed-
Quoting Stéphane Graber (stgra...@ubuntu.com):
> Re-introduce the old lxc-ls script and manpage under a new legacy
> sub-directory.
>
> Those will be installed in place of their python equivalent when LXC
> is built without --enable-python.
>
> Any other script ported to python should be added to
Quoting Dwight Engen (dwight.en...@oracle.com):
> On Mon, 3 Dec 2012 21:25:00 -0600
> Serge Hallyn wrote:
>
> > Quoting Michael H. Warfield (m...@wittsend.com):
> > > On Mon, 2012-12-03 at 20:43 -0600, Serge Hallyn wrote:
> > > > A-ha, actually busybox cp does not support -T, at least here on
> >
Re-introduce the old lxc-ls script and manpage under a new legacy
sub-directory.
Those will be installed in place of their python equivalent when LXC
is built without --enable-python.
Any other script ported to python should be added to those lists.
Signed-off-by: Stéphane Graber
---
.gitignor
On 12/03/2012 08:41 PM, Serge Hallyn wrote:
> Add 'lxc.logfile' and 'lxc.loglevel' config items. Values provided on
> the command line override the config items.
>
> Have lxccontainer not set a default loglevel and logfile.
>
> Signed-off-by: Serge Hallyn
Haven't tested it but the code matches
On Mon, 3 Dec 2012 21:25:00 -0600
Serge Hallyn wrote:
> Quoting Michael H. Warfield (m...@wittsend.com):
> > On Mon, 2012-12-03 at 20:43 -0600, Serge Hallyn wrote:
> > > A-ha, actually busybox cp does not support -T, at least here on
> > > ubuntu 12.10. So should we go with rsync -ah after all s
24 matches
Mail list logo