[SOLVED] "my" variable $node masks earlier declaration in same scope at /usr/share/perl5/PVE/API2/Disks/ZFS.pm line 345.

MisterDeeds

Active Member
Nov 11, 2021
143
33
33
35
Hello all

Unfortunately I get the following message:

Code:
root@Pve02:~# pvesh get /cluster/resources --type vm --output-format json |jq '.[]|select(.pool == env.'Cluster')| .vmid, .node' | tr -d \" | awk 'NR%2{printf "%s ",$0;next;}1' | column -t | sort -k1 -n
"my" variable $node masks earlier declaration in same scope at /usr/share/perl5/PVE/API2/Disks/ZFS.pm line 345.
100 Pve01
101 Pve01
102 Pve01
103 Pve01
104 Pve01
105 Pve01
106 Pve01
107 Pve01
108 Pve01
109 Pve02
200 Pve01
201 Pve02
300 Pve01

When I run this command on the 2nd host the message does not appear. Does anyone have any idea?

Thanks and best regards
 
That's a warning because of an error in that file, the fix is already in git, with the next libpve-storage-perl (7.2-10) it will be working again.
If you can't wait until then, feel free to edit the file yourself. Just one line you have to remove :)

https://git.proxmox.com/?p=pve-stor...4;hp=f553e6e639fc4e4ecc07db833ca77c19f9851224

On the other host, you most likely have an older version of libpve-storage-perl.
 
Last edited:
Dear Matthias

Thank you very much for the quick reply.
Interestingly, the libpve-storage-perl is identical on both hosts:

Code:
root@Pve01:~# dpkg -l |grep libpve-storage-perl
ii  libpve-storage-perl                  7.2-9                          all          Proxmox VE storage management library

Code:
root@Pve02:~# dpkg -l |grep libpve-storage-perl
ii  libpve-storage-perl                  7.2-9                          all          Proxmox VE storage management library

However, I have now commented out the line itself:

Code:
vi /usr/share/perl5/PVE/API2/Disks/ZFS.pm
   Line 345:
   #my $node = $param->{node};

Now the message is gone. Thanks again and best regards!
 
  • Like
Reactions: Matthias.
Great! Please mark the thread as solved (edit it, there's a dropdown near the title) so others with the same problem can find it more easily.
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!