Re: [pve-devel] [PATCH pve-container] skip lxc hooks on non-PVE containers

2015-09-01 Thread Dietmar Maurer
I now get warning during 'make dinstall' make[2]: Entering directory '/home/dietmar/pve4-devel/pve-container/build' perl -I. -T ./lxc-pve-prestart-hook printmanpod >lxc-pve-prestart-hook.1.pod Use of uninitialized value $ENV{"LXC_NAME"} in pattern match (m//) at ./lxc-pve-prestart-hook line 6,

Re: [pve-devel] [PATCH pve-container] skip lxc hooks on non-PVE containers

2015-08-31 Thread Dietmar Maurer
applied. ___ pve-devel mailing list pve-devel@pve.proxmox.com http://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel

Re: [pve-devel] [PATCH pve-container] skip lxc hooks on non-PVE containers

2015-08-31 Thread Wolfgang Bumiller
> You can extract the bridge name from the LXC configuration? See > > # man lxc.container.conf > > lxc.network.link lxc does that on its own ___ pve-devel mailing list pve-devel@pve.proxmox.com

[pve-devel] [PATCH pve-container] skip lxc hooks on non-PVE containers

2015-08-31 Thread Wolfgang Bumiller
Our containers all only have a number as name. If any other character appears in a container name, skip our hooks in order to allow lxc to be used manually without interference from PVE. --- src/lxc-pve-mount-hook| 3 +++ src/lxc-pve-poststop-hook | 3 +++ src/lxc-pve-prestart-hook | 3 +++

Re: [pve-devel] [PATCH pve-container] skip lxc hooks on non-PVE containers

2015-08-31 Thread Dietmar Maurer
but we still want to add the veth device to the bridge? > diff --git a/src/lxcnetaddbr b/src/lxcnetaddbr > index bb8d726..aca6191 100755 > --- a/src/lxcnetaddbr > +++ b/src/lxcnetaddbr > @@ -3,6 +3,8 @@ > use strict; > use warnings; > > +exit 0 if $ENV{LXC_NAME} !~ /^\d+$/; > + > use

Re: [pve-devel] [PATCH pve-container] skip lxc hooks on non-PVE containers

2015-08-31 Thread Wolfgang Bumiller
> but we still want to add the veth device to the bridge? not when starting a custom non pve managed container via lxc-start (there wouldn't be a container configuration file available to extract a bridge name from) ___ pve-devel mailing list