vzifup-post error v2

  • Thread starter Thread starter cirroz
  • Start date Start date
C

cirroz

Guest
There is a bug inside /usr/sbin/vzifup-post

When you restart network with service networking restart there is a bug with wrong usage of $IFACE variable

Here are the fixes
1.
*** /etc/network/if-up.d/vzifup-post.original 2013-09-16 16:46:01.000000000 +0400
--- /etc/network/if-up.d/vzifup-post 2013-09-16 16:45:40.000000000 +0400
***************
*** 1,3 ****
--- 1,6 ----
#!/bin/sh


+ # Fix bug - grep: unrecognized option '--all'
+ [ "$ADDRFAM" = "inet" ] || [ "$ADDRFAM" = "inet6" ] || exit 0
+
exec /usr/sbin/vzifup-post "$IFACE"
2.
*** /usr/sbin/vzifup-post.original 2013-09-16 16:36:00.000000000 +0400
--- /usr/sbin/vzifup-post 2013-09-16 16:46:12.000000000 +0400
***************
*** 36,42 ****


# Check if a device name given is in the list returned by vzgetnetdev
# Indeed we do not want to add arp entries for e.g. 'lo'
! echo "${NETDEVICES}" | grep -qw "${DEV}" || exit 0


NETDEVICES="${DEV}"
update_arp
--- 36,42 ----


# Check if a device name given is in the list returned by vzgetnetdev
# Indeed we do not want to add arp entries for e.g. 'lo'
! echo "${NETDEVICES}" | grep -qw -- "${DEV}" || exit 0


NETDEVICES="${DEV}"
update_arp

# pveversion -v
proxmox-ve-2.6.32: 3.1-109 (running kernel: 2.6.32-23-pve)
pve-manager: 3.1-4 (running version: 3.1-4/f6816604)
pve-kernel-2.6.32-20-pve: 2.6.32-100
pve-kernel-2.6.32-19-pve: 2.6.32-96
pve-kernel-2.6.32-10-pve: 2.6.32-63
pve-kernel-2.6.32-22-pve: 2.6.32-107
pve-kernel-2.6.32-23-pve: 2.6.32-109
lvm2: 2.02.98-pve4
clvm: 2.02.98-pve4
corosync-pve: 1.4.5-1
openais-pve: 1.1.4-3
libqb0: 0.11.1-2
redhat-cluster-pve: 3.2.0-2
resource-agents-pve: 3.9.2-4
fence-agents-pve: 4.0.0-2
pve-cluster: 3.0-7
qemu-server: 3.1-1
pve-firmware: 1.0-23
libpve-common-perl: 3.0-6
libpve-access-control: 3.0-6
libpve-storage-perl: 3.0-10
pve-libspice-server1: 0.12.4-1
vncterm: 1.1-4
vzctl: 4.0-1pve3
vzprocps: 2.0.11-2
vzquota: 3.1-2
pve-qemu-kvm: 1.4-17
ksm-control-daemon: 1.1-1
glusterfs-client: 3.4.0-2

Link.
 
Last edited by a moderator:
Catch that bug today on 2 of my 3 nodes after dist-upgrade to 3.2 and reboot.

Code:
root@node1:~# pveversion -v
proxmox-ve-2.6.32: 3.2-121 (running kernel: 2.6.32-27-pve)
pve-manager: 3.2-1 (running version: 3.2-1/1933730b)
pve-kernel-2.6.32-20-pve: 2.6.32-100
pve-kernel-2.6.32-27-pve: 2.6.32-121
pve-kernel-2.6.32-12-pve: 2.6.32-68
pve-kernel-2.6.32-19-pve: 2.6.32-96
pve-kernel-2.6.32-17-pve: 2.6.32-83
pve-kernel-2.6.32-26-pve: 2.6.32-114
pve-kernel-2.6.32-11-pve: 2.6.32-66
pve-kernel-2.6.32-18-pve: 2.6.32-88
pve-kernel-2.6.32-23-pve: 2.6.32-109
lvm2: 2.02.98-pve4
clvm: 2.02.98-pve4
corosync-pve: 1.4.5-1
openais-pve: 1.1.4-3
libqb0: 0.11.1-2
redhat-cluster-pve: 3.2.0-2
resource-agents-pve: 3.9.2-4
fence-agents-pve: 4.0.5-1
pve-cluster: 3.0-12
qemu-server: 3.1-15
pve-firmware: 1.1-2
libpve-common-perl: 3.0-14
libpve-access-control: 3.0-11
libpve-storage-perl: 3.0-19
pve-libspice-server1: 0.12.4-3
vncterm: 1.1-6
vzctl: 4.0-1pve4
vzprocps: 2.0.11-2
vzquota: 3.1-2
pve-qemu-kvm: 1.7-4
ksm-control-daemon: 1.1-1
glusterfs-client: 3.4.2-1
 
Hi,

I tried to update the server today with apt-get update and apt-get dist-upgrade and amongst others I received this error:
..
Setting up vzctl (4.0-1pve5) ...
Installing new version of config file /etc/network/if-up.d/vzifup-post ...
OpenVZ already running..failed
..

I am therefore not sure if the update worked.

The current contents of the vzifup-post are:

cat vzifup-post
#!/bin/sh

[ "$ADDRFAM" = "inet" ] || [ "$ADDRFAM" = "inet6" ] || exit 0

exec /usr/sbin/vzifup-post "$IFACE"
--

Is this supposed to be correct file content?

Also I have:

pveversion -v

proxmox-ve-2.6.32: 3.2-121 (running kernel: 2.6.32-27-pve)
pve-manager: 3.2-1 (running version: 3.2-1/1933730b)
pve-kernel-2.6.32-27-pve: 2.6.32-121
lvm2: 2.02.98-pve4
clvm: 2.02.98-pve4
corosync-pve: 1.4.5-1
openais-pve: 1.1.4-3
libqb0: 0.11.1-2
redhat-cluster-pve: 3.2.0-2
resource-agents-pve: 3.9.2-4
fence-agents-pve: 4.0.5-1
pve-cluster: 3.0-12
qemu-server: 3.1-15
pve-firmware: 1.1-2
libpve-common-perl: 3.0-14
libpve-access-control: 3.0-11
libpve-storage-perl: 3.0-19
pve-libspice-server1: 0.12.4-3
vncterm: 1.1-6
vzctl: 4.0-1pve5
vzprocps: 2.0.11-2
vzquota: 3.1-2
pve-qemu-kvm: 1.7-4
ksm-control-daemon: 1.1-1
glusterfs-client: 3.4.2-1
 
AFAIK that error is normal if opevz is already started. Did you get any other problems beside that warning?
 
AFAIK that error is normal if opevz is already started. Did you get any other problems beside that warning?

No other issues/warnings during update.
I restarted fully the server and then I checked the contents of the file which is as above. If this the correct content then I guess it's ok.