]> git.proxmox.com Git - pve-cluster.git/commit
pvecm: qdevice setup: fix check for odd node count
authorAaron Lauterer <a.lauterer@proxmox.com>
Tue, 24 Mar 2020 16:16:42 +0000 (17:16 +0100)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Wed, 25 Mar 2020 08:45:00 +0000 (09:45 +0100)
commit9e7e46ae619c1271ed47e909fc74ac2dc2adc280
treebf8fd6e2d2c5c67f1874504b368d89fb86c8f7c1
parentcd519df48220e9270f69e3d08dab3602f21dfbc2
pvecm: qdevice setup: fix check for odd node count

With Perl 5.26 the behavior of `scalar(%hash)` changed [0] causing the
check for odd numbers to never evaluate to true. Allowing odd sized
clusters to set up a QDevice. The algorithm was not changed to LMS if
forced to still create the QDevice.

Instead of showing the bucket info of the referenced hash it did show
the hash reference. Dereferencing it will again return the number of
items present in the hash.

[0] https://perldoc.perl.org/perl5260delta.html#scalar(%25hash)-return-signature-changed

Signed-off-by: Aaron Lauterer <a.lauterer@proxmox.com>
data/PVE/CLI/pvecm.pm