[SOLVED] GlusterFS: pvedaemon - Use of uninitialized value in pattern match

pvflick

New Member
Apr 26, 2024
7
0
1
Environment: 3 node HA Proxmox-Cluster with VM images on a shared GlusterFS storage (replica 3 arbiter 1 / group virt)

Installed Proxmox-Software:
proxmox-ve: 8.2.0 (running kernel: 6.8.12-2-pve)
pve-manager: 8.2.7 (running version: 8.2.7/3e0176e6bb2ade3b)
pve-cluster: 8.0.7
pve-ha-manager: 4.0.5
glusterfs-server/client 10.3-5


Error description:
GUI: There is a popup error message >used '' not an integer (500)< when selecting a GlusterFS storage of a node (Folder / Server view) . The content of stored "VM Disks" are not displayed (name. format, size).

Whenever a GlusterFS storage is selected on the GUI the following error message shows up in the system journal log:
Code:
Oct 19 10:19:10 <node name> pvedaemon[2569]: Use of uninitialized value $used in pattern match (m//) at /usr/share/perl5/PVE/Storage/Plugin.pm line 994.
Oct 19 10:19:10 <node name> pvedaemon[2569]: Use of uninitialized value $used in concatenation (.) or string at /usr/share/perl5/PVE/Storage/Plugin.pm line 995.

The GlusterFS storage has no errors and so far the VMs with images on that GlusterFS storage perform well.

I would appreciate if one could tell me whether this is just a display problem or whether it could lead to operational or performance problems later on.
Thanks
 
Last edited:
It seams that one of the qcow2-images on the GlusterFS storage is corrupted, since disk operations of that single VM did not succeed.

1) GUI: Backup of VM images failed with:
ERROR: Backup of VM 133 failed - cannot determine size of volume 'ha-images:133/vm-133-disk-0.qcow2' - used '' not an integer
INFO: Failed at 2024-10-19 15:47:50

2) GUI: Clone or Move of VM image failed with:
create full clone of drive scsi1 (local-zfs:vm-133-disk-0)
Use of uninitialized value $used in pattern match (m//) at /usr/share/perl5/PVE/Storage/Plugin.pm line 994.
Use of uninitialized value $used in concatenation (.) or string at /usr/share/perl5/PVE/Storage/Plugin.pm line 995.
TASK ERROR: storage migration failed: used '' not an integer

Analysis:
cmdline> qemu-img info vm-133-disk-0.qcow2
image: vm-133-disk-0.qcow2
file format: qcow2
virtual size: 25 GiB (26843545600 bytes)
disk size: unavailable
cluster_size: 65536


Repair of corrupted VM image:
1) Export qcow2 image into raw format
cmdline> qemu-img convert vm-133-disk-0.qcow2 /var/lib/vz/images/vm-133-disk-0.raw

2) Import raw image into VM
qm importdisk 133 /var/lib/vz/images/vm-133-disk-0.raw local-zfs

3) GUI: Disk Action -> Move Storage (to GlusterFS)

After the VM image was repaired, the GUI error when selecting the node's GlusterFS storage disappeared. The contents of the “VM disks” of the GlusterFS storage were displayed again. (name, date, format, size)

I wonder how the VM image got corrupted.
 
Many thanks for posting also your solution and analysis! Just some tiny amount extra background:
This error indeed stems from a method to gather some file size info from our storage plugin system, i.e. it calls
qemu-img info --output=json <file>

For your case the actual-size property then was not included in the JSON response object from that command anymore due to being unavailable due to being corrupted.

FWIW: But the error handling of the code parsing the response could be slightly improved to avoid the warnings.
 

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!