From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <t.lamprecht@proxmox.com>
Received: from firstgate.proxmox.com (firstgate.proxmox.com [212.224.123.68])
 (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
 key-exchange X25519 server-signature RSA-PSS (2048 bits))
 (No client certificate requested)
 by lists.proxmox.com (Postfix) with ESMTPS id 6A3F57249A
 for <pve-devel@lists.proxmox.com>; Mon, 12 Apr 2021 14:54:27 +0200 (CEST)
Received: from firstgate.proxmox.com (localhost [127.0.0.1])
 by firstgate.proxmox.com (Proxmox) with ESMTP id 5DD791EF79
 for <pve-devel@lists.proxmox.com>; Mon, 12 Apr 2021 14:54:27 +0200 (CEST)
Received: from proxmox-new.maurer-it.com (proxmox-new.maurer-it.com
 [212.186.127.180])
 (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
 key-exchange X25519 server-signature RSA-PSS (2048 bits))
 (No client certificate requested)
 by firstgate.proxmox.com (Proxmox) with ESMTPS id 937611EF6D
 for <pve-devel@lists.proxmox.com>; Mon, 12 Apr 2021 14:54:26 +0200 (CEST)
Received: from proxmox-new.maurer-it.com (localhost.localdomain [127.0.0.1])
 by proxmox-new.maurer-it.com (Proxmox) with ESMTP id 52985420B2
 for <pve-devel@lists.proxmox.com>; Mon, 12 Apr 2021 14:54:26 +0200 (CEST)
Message-ID: <1c7fa75b-d564-2150-8cf9-7a8f9dee66fb@proxmox.com>
Date: Mon, 12 Apr 2021 14:54:25 +0200
MIME-Version: 1.0
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:88.0) Gecko/20100101
 Thunderbird/88.0
Content-Language: en-US
To: Proxmox VE development discussion <pve-devel@lists.proxmox.com>,
 Fabian Ebner <f.ebner@proxmox.com>
References: <20210412113717.25356-1-f.ebner@proxmox.com>
From: Thomas Lamprecht <t.lamprecht@proxmox.com>
In-Reply-To: <20210412113717.25356-1-f.ebner@proxmox.com>
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 7bit
X-SPAM-LEVEL: Spam detection results:  0
 AWL -0.043 Adjusted score from AWL reputation of From: address
 KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment
 RCVD_IN_DNSWL_MED        -2.3 Sender listed at https://www.dnswl.org/,
 medium trust
 SPF_HELO_NONE           0.001 SPF: HELO does not publish an SPF Record
 SPF_PASS               -0.001 SPF: sender matches SPF record
Subject: [pve-devel] applied: [PATCH storage 1/3] volume export/import:
 allow uppercase letters
X-BeenThere: pve-devel@lists.proxmox.com
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: Proxmox VE development discussion <pve-devel.lists.proxmox.com>
List-Unsubscribe: <https://lists.proxmox.com/cgi-bin/mailman/options/pve-devel>, 
 <mailto:pve-devel-request@lists.proxmox.com?subject=unsubscribe>
List-Archive: <http://lists.proxmox.com/pipermail/pve-devel/>
List-Post: <mailto:pve-devel@lists.proxmox.com>
List-Help: <mailto:pve-devel-request@lists.proxmox.com?subject=help>
List-Subscribe: <https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel>, 
 <mailto:pve-devel-request@lists.proxmox.com?subject=subscribe>
X-List-Received-Date: Mon, 12 Apr 2021 12:54:27 -0000

On 12.04.21 13:37, Fabian Ebner wrote:
> Bug reported in the community forum[0].
> 
> Currently, it's possible to break replication by:
> 1. have an existing snapshot whose name contains an uppercase letter
> 2. set up a replication job and run it
> 3. rollback to the existing snapshot
> 4. replicate again -> fails
> 
> The failure occurs, because after step 3, the most recent common snapshot is the
> previously existing one and currently no uppercase letters are allowed for
> export/import.
> 
> The pve-snapshot-name option uses the CONFIGID_RE
>     qr/[a-z][a-z0-9_-]+/i
> so it cannot be used here, because it would not allow for e.g. '__migrate__'.
> Simply allow uppercase letters, to be backwards compatible and allow all
> possible pve-snapshot-name values.
> 
> There is still an issue if there also was state volume, but that's a different
> bug[1].
> 
> [0]: https://forum.proxmox.com/threads/solved-migration-error-base-value-does-not-match-the-regex-pattern.85946/
> [1]: https://bugzilla.proxmox.com/show_bug.cgi?id=3111
> 
> Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
> ---
>  PVE/CLI/pvesm.pm | 8 ++++----
>  1 file changed, 4 insertions(+), 4 deletions(-)
> 
>

applied, thanks!

albeit with perl's extensice regex and the subtleties of unicode casing I'm not
always sure using the case-insensitive flag is the way to go, adding A-Z to the
allowed character set would be actually the smaller semantic change.

But it should not matter that much here, so I kept it as is for now...