[SOLVED] Migration error --> base: value does not match the regex pattern

richi_lp

New Member
Nov 18, 2020
6
1
3
50
Hello there,

we're trying to migrate one CT from one node to another and this is the error:

Code:
()
2021-03-15 13:40:32 starting migration of CT 104 to node 'node1' (192.168.10.11)
2021-03-15 13:40:32 found local volume 'local-zfs:subvol-104-disk-0' (in current VM config)
2021-03-15 13:40:32 start replication job
2021-03-15 13:40:32 guest => CT 104, running => 0
2021-03-15 13:40:32 volumes => local-zfs:subvol-104-disk-0
2021-03-15 13:40:33 create snapshot '__replicate_104-0_1615812032__' on local-zfs:subvol-104-disk-0
2021-03-15 13:40:33 using secure transmission, rate limit: none
2021-03-15 13:40:33 incremental sync 'local-zfs:subvol-104-disk-0' (Sandbox_ok_panel1_sin_NFS => __replicate_104-0_1615812032__)
2021-03-15 13:40:35 400 Parameter verification failed.
2021-03-15 13:40:35 base: value does not match the regex pattern
2021-03-15 13:40:35 pvesm export <volume> <format> <filename> [OPTIONS]
2021-03-15 13:40:35 400 Parameter verification failed.
2021-03-15 13:40:35 base: value does not match the regex pattern
2021-03-15 13:40:35 pvesm import <volume> <format> <filename> [OPTIONS]
send/receive failed, cleaning up snapshot(s)..
2021-03-15 13:40:35 delete previous replication snapshot '__replicate_104-0_1615812032__' on local-zfs:subvol-104-disk-0
2021-03-15 13:40:35 end replication job with error: command 'set -o pipefail && pvesm export local-zfs:subvol-104-disk-0 zfs - -with-snapshots 1 -snapshot __replicate_104-0_1615812032__ -base Sandbox_ok_panel1_sin_NFS | /usr/bin/ssh -e none -o 'BatchMode=yes' -o 'HostKeyAlias=node1' root@192.168.10.11 -- pvesm import local-zfs:subvol-104-disk-0 zfs - -with-snapshots 1 -allow-rename 0 -base Sandbox_ok_panel1_sin_NFS' failed: exit code 255
2021-03-15 13:40:35 ERROR: command 'set -o pipefail && pvesm export local-zfs:subvol-104-disk-0 zfs - -with-snapshots 1 -snapshot __replicate_104-0_1615812032__ -base Sandbox_ok_panel1_sin_NFS | /usr/bin/ssh -e none -o 'BatchMode=yes' -o 'HostKeyAlias=node1' root@192.168.10.11 -- pvesm import local-zfs:subvol-104-disk-0 zfs - -with-snapshots 1 -allow-rename 0 -base Sandbox_ok_panel1_sin_NFS' failed: exit code 255
2021-03-15 13:40:35 aborting phase 1 - cleanup resources
2021-03-15 13:40:35 start final cleanup
2021-03-15 13:40:35 ERROR: migration aborted (duration 00:00:04): command 'set -o pipefail && pvesm export local-zfs:subvol-104-disk-0 zfs - -with-snapshots 1 -snapshot __replicate_104-0_1615812032__ -base Sandbox_ok_panel1_sin_NFS | /usr/bin/ssh -e none -o 'BatchMode=yes' -o 'HostKeyAlias=node1' root@192.168.10.11 -- pvesm import local-zfs:subvol-104-disk-0 zfs - -with-snapshots 1 -allow-rename 0 -base Sandbox_ok_panel1_sin_NFS' failed: exit code 255
TASK ERROR: migration aborted

We haven't found the "base" value :(

Thanks for your help
 
This is going to look weird, but "base", the value that doesn't match de regex was a comment in one of the snapshots.
After delete de snapshot the migration was successful.

Weird :rolleyes:
 
Actually not weird at all. Proxmox names disks (internally) using "base" as part of the name. Since it then relies on the name being exactly correct, including any prefixes and suffixes and it does it using Regex, its not surprising that using "base" in the name elsewhere caused you an issue.

On one hand using predictable naming allows Proxmox to avoid keeping track of objects internally, on the other - you can run into edge cases like this.
 
That makes sense.
The weird thing is "base" was in a comment of a snapshot, not in the name of the snapshot.

Please, check the screenshot ....Captura de pantalla 2021-03-16 171422.png
 
Hi,
it's not actually the base within the comment that caused the problem, it's the -base in the import/export command:
pvesm export local-zfs:subvol-104-disk-0 zfs - -with-snapshots 1 -snapshot __replicate_104-0_1615812032__ -base Sandbox_ok_panel1_sin_NFS

The regex there is [a-z0-9_\-]{1,40}, so no uppercase letters allowed. It's for internal use and the replication/migration snapshots PVE creates match that pattern, e.g. __replicate_104-0_1615812032__, __migration__.

It's strange that the replication tried to use the Sandbox_ok_panel1_sin_NFS snapshot as a base snapshot, AFAICT this can only happen if the replication snapshot on the source side got lost for some reason, or the Sandbox_ok_panel1_sin_NFS snapshot was replicated manually (not via PVE's replication).

We could try to account for the possibility of the above and expand the regex pattern (of course one needs to verify that the replication would still work as intended then). Or at least give a better warning.
 

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!