Use of uninitialized value in split at /usr/share/perl5/PVE/INotify.pm line 1224, <GEN9> line 73.

crz

Member
Sep 18, 2021
16
5
23
Germany
Hey there,
i get the aforementioned error (Use of uninitialized value in split at /usr/share/perl5/PVE/INotify.pm line 1224, <GEN9> line 73.) when i'm using the following script on the terminal to start my VMs:

Code:
#!/bin/bash

# Prüfen der Parameter
if [ $# -ne 3 ]; then
    echo "Usage: $0 <start_vm_id> <end_vm_id> <action>"
    echo "action: start | stop | shutdown"
    exit 1
fi

START_ID=$1
END_ID=$2
ACTION=$3

# Prüfen ob Aktion gültig ist
if [[ "$ACTION" != "start" && "$ACTION" != "stop" && "$ACTION" != "shutdown" ]]; then
    echo "Ungültige Aktion: $ACTION. Nur 'start', 'stop' oder 'shutdown' erlaubt."
    exit 1
fi

# Alle VMs im Cluster abrufen
VM_LIST=$(pvesh get /cluster/resources --type vm --output-format json)

for ((VMID=START_ID; VMID<=END_ID; VMID++)); do
    NODE=$(echo "$VM_LIST" | jq -r '.[] | select(.vmid=='$VMID') | .node')

    if [ -z "$NODE" ]; then
        echo "VM $VMID existiert nicht, überspringe..."
        continue
    fi

    echo "$ACTION VM $VMID auf Node $NODE..."
    pvesh create /nodes/$NODE/qemu/$VMID/status/$ACTION
done

echo "$ACTION für alle VMs ausgeführt."

shutdown and stop will work without problems.
also the VMs will start anyway.

the cluster is newly setup, with the newest version ov pve with a subscription


Full Output after use of the script:
Code:
root@proxmox001 ~ # ./vm-control.sh 501 504 start
start VM 501 auf Node proxmox001...
Use of uninitialized value in split at /usr/share/perl5/PVE/INotify.pm line 1224, <GEN9> line 73.
Use of uninitialized value in split at /usr/share/perl5/PVE/INotify.pm line 1224, <GEN9> line 73.
Use of uninitialized value in split at /usr/share/perl5/PVE/INotify.pm line 1224, <GEN17> line 73.
Use of uninitialized value in split at /usr/share/perl5/PVE/INotify.pm line 1224, <GEN17> line 73.
UPID:proxmox001:002E5138:03AB06A6:68A707BA:qmstart:501:root@pam:
start VM 502 auf Node proxmox002...
Use of uninitialized value in split at /usr/share/perl5/PVE/INotify.pm line 1224, <GEN9> line 61.
Use of uninitialized value in split at /usr/share/perl5/PVE/INotify.pm line 1224, <GEN9> line 61.
Use of uninitialized value in split at /usr/share/perl5/PVE/INotify.pm line 1224, <GEN17> line 61.
Use of uninitialized value in split at /usr/share/perl5/PVE/INotify.pm line 1224, <GEN17> line 61.
"UPID:proxmox002:002B2B5D:03AB071C:68A707BC:qmstart:502:root@pam:"
start VM 503 auf Node proxmox003...
Use of uninitialized value in split at /usr/share/perl5/PVE/INotify.pm line 1224, <GEN9> line 61.
Use of uninitialized value in split at /usr/share/perl5/PVE/INotify.pm line 1224, <GEN9> line 61.
Use of uninitialized value in split at /usr/share/perl5/PVE/INotify.pm line 1224, <GEN17> line 61.
Use of uninitialized value in split at /usr/share/perl5/PVE/INotify.pm line 1224, <GEN17> line 61.
"UPID:proxmox003:002B2649:03AB06CF:68A707BE:qmstart:503:root@pam:"
start VM 504 auf Node proxmox004...
Use of uninitialized value in split at /usr/share/perl5/PVE/INotify.pm line 1224, <GEN9> line 61.
Use of uninitialized value in split at /usr/share/perl5/PVE/INotify.pm line 1224, <GEN9> line 61.
Use of uninitialized value in split at /usr/share/perl5/PVE/INotify.pm line 1224, <GEN17> line 61.
Use of uninitialized value in split at /usr/share/perl5/PVE/INotify.pm line 1224, <GEN17> line 61.
"UPID:proxmox004:00347FD2:03AB061B:68A707C0:qmstart:504:root@pam:"
start für alle VMs ausgeführt
 
Last edited:
from what i can tell the line 1224 of INotify is in reference to the network config, can you post maybe your /etc/network/interfaces ?
 
from what i can tell the line 1224 of INotify is in reference to the network config, can you post maybe your /etc/network/interfaces ?

it currently looks like this:

Code:
# network interface settings; autogenerated
# Please do NOT modify this file directly, unless you know what
# you're doing.
#
# If you want to manage parts of the network configuration manually,
# please utilize the 'source' or 'source-directory' directives to do
# so.
# PVE will preserve these directives, but will NOT read its network
# configuration from sourced files, so do not attempt to move any of
# the PVE managed interfaces into external files!

auto lo
iface lo inet loopback

allow-bond1 ens4f0np0

auto ens4f0np0
iface ens4f0np0 inet manual

allow-bond1 ens4f1np1

auto ens4f1np1
iface ens4f1np1 inet manual

auto ens6f0np0
iface ens6f0np0 inet manual

auto ens6f1np1
iface ens6f1np1 inet manual

auto ens22f0np0
iface ens22f0np0 inet static
        address <net1>/25
#Corosync 1

auto ens22f1np1
iface ens22f1np1 inet static
        address <net2>/25
#Corosync 2

auto bond1
iface bond1 inet manual
        bond-slaves ens4f0np0 ens4f1np1
        bond-miimon 100
        bond-mode 802.3ad
        bond-xmit-hash-policy layer3+4
        bond-lacp-rate fast
#LAN / WAN

auto bond0
iface bond0 inet static
        address <net4>/24
        bond-slaves ens6f0np0 ens6f1np1
        bond-miimon 100
        bond-mode 802.3ad
        bond-xmit-hash-policy layer3+4
        mtu 9000
#dual 25G CEPH

auto vmbr0
iface vmbr0 inet static
        bridge-ports bond1
        bridge-stp off
        bridge-fd 0
        bridge-vlan-aware yes
        bridge-vids 2-4094

auto vmbr0.946
iface vmbr0.946 inet static
        address <net3>/24
        gateway <net3GW>

auto vmbrHA_FW1
iface vmbrHA_FW1 inet manual
        bridge-ports none
        bridge-stp off
        bridge-fd 0

auto vmbrHA_FW2
iface vmbrHA_FW2 inet manual
        bridge-ports none
        bridge-stp off
        bridge-fd 0

source /etc/network/interfaces.d/*
 
ok, i think i see what might be the problem:

you have lines like this in your config:

Code:
allow-bond1 ens4f0np0<br>

which should only be there if you're using openvswitch, but you're using plain linux bridges (did you maybe have ovs configured at some point?)
our code assumes that ovs is configured when these lines exist and tries to parse the 'ovs_ports' part of the releavant bridge/bond but this does not exist, hence the error

i'd try to simply remove the 'allow-bond1 xxx' lines from your config, they should not be necessary. in any case make a backup of the file and test any changes
 
ok, i think i see what might be the problem:

you have lines like this in your config:

Code:
allow-bond1 ens4f0np0<br>

which should only be there if you're using openvswitch, but you're using plain linux bridges (did you maybe have ovs configured at some point?)
our code assumes that ovs is configured when these lines exist and tries to parse the 'ovs_ports' part of the releavant bridge/bond but this does not exist, hence the error

i'd try to simply remove the 'allow-bond1 xxx' lines from your config, they should not be necessary. in any case make a backup of the file and test any changes

Thank you, that solved the problem.
The "allow-bond1 ens4f0np0" was my mistake. I thought it is needed for bonding.