[pve-devel] vzdump.conf exclude-path parsing

Jean-Francois Dagenais jeff.dagenais at gmail.com
Wed Mar 2 19:06:44 CET 2016


Hi all,

First time poster.

I've been digging into a problem I am getting with Proxmox VE 4.1-15. I am
specifying a pattern in "exclude-path" and am getting a perl error:

Can't use string (""/dir1/.+" "/dir2/.+"") as an ARRAY ref while "strict refs"
in use at /usr/share/perl5/PVE/VZDump.pm line 581. (500)

Here's the forum post I have created:
https://forum.proxmox.com/threads/vzdump-exclude-path-not-working-from-vzdump-conf.26317/

I'm posting here because I have messed around with the code (I am developper
this is my first time with perl) and have sort of gathered that it might be a
JSONSchema.pm problem.

Although the "format" of key "exclude-path" is set to "string-alist", no matter
what text I put in vzdump.conf, the parser always makes a simple string with it.

I ended up using split(" ", $defaults->{'exclude-path'}) and removing the
single-quotes from my vzdump.conf.

This made it work again, except I had to do it to defaults and opt->... to get
rid of the error. The result is that the excludes are added twice on the tar cmd
line.

Also, the stdexcludes is broken as well. The block starting with "if
($opts->{stdexcludes}) {" is not executed even though it should based on the
fact that I don't mention it and it should therefore default to true.

This all seems very broken and there's a couple of old thread on the forums that
talk about this.

What is the official stance on the subject?
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 236 bytes
Desc: Message signed with OpenPGP using GPGMail
URL: <http://lists.proxmox.com/pipermail/pve-devel/attachments/20160302/56c44275/attachment.sig>


More information about the pve-devel mailing list