Re: [pve-devel] [PATCH common] network interfaces code is split into syntax dependent and independent parts

2016-05-18 Thread Igor Vlasenko
Thanks! On Wed, May 18, 2016 at 5:50 PM, Dietmar Maurer wrote: > OK, added this manually. > >> On May 18, 2016 at 1:47 PM Igor Vlasenko wrote: >> >> >> > Added it as attachment. >> I see, attachments are prohibited. >> I'll repost it. I

Re: [pve-devel] [PATCH common] network interfaces code is split into syntax dependent and independent parts

2016-05-18 Thread Igor Vlasenko
> Added it as attachment. I see, attachments are prohibited. I'll repost it. In any case, the change is just -my $bond_modes = +our $bond_modes = diff --git a/src/PVE/INotify.pm b/src/PVE/INotify.pm index c34659f..1a34df1 100644 --- a/src/PVE/INotify.pm +++ b/src/PVE/INotify.pm @@ -665,7 +665,7

Re: [pve-devel] [PATCH common] network interfaces code is split into syntax dependent and independent parts

2016-05-18 Thread Igor Vlasenko
On Wed, May 18, 2016 at 1:54 PM, Dietmar Maurer wrote: > error: patch failed: src/PVE/INotify.pm:665 > error: src/PVE/INotify.pm: patch does not apply I am sorry, I did not set up git send-mail and am sending from gmail, may be it corrupted the spaces. Added it as attachment. ___

Re: [pve-devel] [PATCH common] network interfaces code is split into syntax dependent and independent parts

2016-05-18 Thread Igor Vlasenko
s worth to share code. Ok, let's put that matter for later. I'll try to maintain that patches locally for a time and let them mature. In that case, jut one last request on refactoring: a oneline change s/my/our for $bond_modes. Signed-off-by: Igor Vlasenko --- src/PVE/INotify.pm | 2

Re: [pve-devel] [PATCH common] network interfaces code is split into syntax dependent and independent parts

2016-05-18 Thread Igor Vlasenko
, trivial, passes tests, and the sub __prewrite_setup_network_interfaces can be used directly in code that supports etcnet or systemd-networkd. Signed-off-by: Igor Vlasenko --- src/PVE/INotify.pm | 17 ++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/src/PVE/INotify.pm b/src/P

Re: [pve-devel] [PATCH common] network interfaces code is split into syntax dependent and independent parts

2016-05-18 Thread Igor Vlasenko
On Wed, May 18, 2016 at 11:10 AM, Dietmar Maurer wrote: >> In short, etcnet is declarative type network configuration system, >> Where declarative is the same idea as > > It would make more sense if altlinux supports systemd-networkd instead? Well, etcnet is a bit older. Proper support for system

Re: [pve-devel] [PATCH common] network interfaces code is split into syntax dependent and independent parts

2016-05-18 Thread Igor Vlasenko
On Wed, May 18, 2016 at 7:57 AM, Dietmar Maurer wrote: >> I am trying to port PVE to ALT Linux. It use etcnet as network >> configuration subsystem >> instead of /etc/network/interfaces. > > Where can I find reasonable documentation for that? I only found: > https://www.altlinux.org/Etcnet > Is th

[pve-devel] [PATCH common] network interfaces code is split into syntax dependent and independent parts

2016-05-17 Thread Igor Vlasenko
. As a result, the code for etcnet will be able to use the syntax independent parts directly instead of copy-pasting it. Also, adding support for other network configuration subsystems in the future becomes easier. I hope for the patch to be included. Signed-off-by: Igor Vlasenko --- src/PVE

Re: [pve-devel] [PATCH common] support for predictable network interface device names

2016-05-17 Thread Igor Vlasenko
Thanks! On Tue, May 17, 2016 at 5:14 PM, Dietmar Maurer wrote: > applied > > ___ > pve-devel mailing list > pve-devel@pve.proxmox.com > http://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel -- С уважением, Игорь Власенко. ___

Re: [pve-devel] [PATCH common] support for predictable network interface device names

2016-05-17 Thread Igor Vlasenko
thanks! It looks good. On Tue, May 17, 2016 at 10:21 AM, Wolfgang Bumiller wrote: > Based on patch from: Igor Vlasenko > --- > Since it was just a diff pasted in a response, here the patch in a > git-am applyable form. > > src/PVE/INotify.pm | 8 > src/PVE/Network

Re: [pve-devel] [PATCH common] support for predictable network interface device names

2016-05-12 Thread Igor Vlasenko
On Thu, May 12, 2016 at 3:05 PM, Wolfgang Bumiller wrote: > On Thu, May 12, 2016 at 02:30:11PM +0300, Igor Vlasenko wrote: >> On Thu, May 12, 2016 at 2:08 PM, Wolfgang Bumiller >> wrote: >> > Could you review the following modified version of your old patch? >&

Re: [pve-devel] [PATCH common] support for predictable network interface device names

2016-05-12 Thread Igor Vlasenko
On Thu, May 12, 2016 at 2:08 PM, Wolfgang Bumiller wrote: > On Thu, May 12, 2016 at 11:42:29AM +0300, Igor Vlasenko wrote: >> On Wed, May 11, 2016 at 10:56 PM, Igor Vlasenko wrote: >> > This is an improved version of my previous patch >> > [ support for udev-style phy

Re: [pve-devel] [PATCH common] support for predictable network interface device names

2016-05-12 Thread Igor Vlasenko
On Wed, May 11, 2016 at 10:56 PM, Igor Vlasenko wrote: > This is an improved version of my previous patch > [ support for udev-style physical interface names (like enp3s0), > http://pve.proxmox.com/pipermail/pve-devel/2016-May/020958.html ] > thanks to Wolfgang. Yesterday I finished

[pve-devel] [PATCH common] support for predictable network interface device names

2016-05-11 Thread Igor Vlasenko
This is an improved version of my previous patch [ support for udev-style physical interface names (like enp3s0), http://pve.proxmox.com/pipermail/pve-devel/2016-May/020958.html ] thanks to Wolfgang. The resulting regex is large, so it is wrapped as a common subroutine. Signed-off-by: Igor

Re: [pve-devel] [PATCH common] support for udev-systemd-style physical interface names (like enp3s0)

2016-05-11 Thread Igor Vlasenko
On Wed, May 11, 2016 at 11:57 AM, Wolfgang Bumiller wrote: > On Mon, May 09, 2016 at 06:23:22PM +0300, Igor Vlasenko wrote: >> I am trying to port PVE to run under ALT Linux (rpm based platform) >> that runs udev+systemd. It has another name convention for >> network interf

Re: [pve-devel] [PATCH common] support for udev-systemd-style physical interface names (like enp3s0)

2016-05-10 Thread Igor Vlasenko
On Tue, May 10, 2016 at 11:33 AM, Dietmar Maurer wrote: > comments inline: >> --- a/src/PVE/Network.pm >> +++ b/src/PVE/Network.pm >> @@ -131,10 +131,10 @@ my $parse_tap_device_name = sub { >> >> my ($vmid, $devid); >> >> -if ($iface =~ m/^tap(\d+)i(\d+)$/) { >> +if ($iface =~ m/^tap(

Re: [pve-devel] [PATCH common] support for udev-systemd-style physical interface names (like enp3s0)

2016-05-09 Thread Igor Vlasenko
On Mon, May 9, 2016 at 7:45 PM, Igor Vlasenko wrote: > On Mon, May 9, 2016 at 7:09 PM, Dietmar Maurer wrote: >> That is not the only problem. The main problem is that systemd >> does not support OVS - or do they support that now? > > I do not know specifics, as on a test

Re: [pve-devel] [PATCH common] support for udev-systemd-style physical interface names (like enp3s0)

2016-05-09 Thread Igor Vlasenko
On Mon, May 9, 2016 at 7:09 PM, Dietmar Maurer wrote: > That is not the only problem. The main problem is that systemd > does not support OVS - or do they support that now? I do not know specifics, as on a test machine we set up the ordinary bridges, not OVS, as you can see from our (fake) /etc/n

Re: [pve-devel] [PATCH common] support for perl < 5.18

2016-05-09 Thread Igor Vlasenko
no problem. It was just a small inconvenience for me. On Mon, May 9, 2016 at 7:02 PM, Dietmar Maurer wrote: >> On Mon, May 9, 2016 at 5:47 PM, Dietmar Maurer wrote: >> > Sorry, but why is that required? >> >> -no warnings 'experimental::smartmatch'; >> >> +no if $] >= 5.017011, warnings => 'expe

[pve-devel] [PATCH common] support for udev-systemd-style physical interface names (like enp3s0)

2016-05-09 Thread Igor Vlasenko
interface names. Signed-off-by: Igor Vlasenko --- src/PVE/INotify.pm | 8 src/PVE/Network.pm | 6 +++--- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/PVE/INotify.pm b/src/PVE/INotify.pm index 74a0fe1..06c5aa5 100644 --- a/src/PVE/INotify.pm +++ b/src/PVE/INotify.pm

Re: [pve-devel] [PATCH common] support for perl < 5.18

2016-05-09 Thread Igor Vlasenko
On Mon, May 9, 2016 at 5:47 PM, Dietmar Maurer wrote: > Sorry, but why is that required? >> -no warnings 'experimental::smartmatch'; >> +no if $] >= 5.017011, warnings => 'experimental::smartmatch'; Well, this particular patch does make sense: I started tinkering with the code on a machine with p

[pve-devel] [PATCH common] support for perl < 5.18

2016-05-09 Thread Igor Vlasenko
Signed-off-by: Igor Vlasenko --- test/etc_network_interfaces/t.list-interfaces.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/etc_network_interfaces/t.list-interfaces.pl b/test/etc_network_interfaces/t.list-interfaces.pl index caffe88..99ddfa4 100644 --- a/test