Network migration fail with "failed to parse api response" in network selection

bbgeek17

Distinguished Member
Nov 20, 2020
4,707
1,399
198
Blockbridge
www.blockbridge.com
Splitting out this post into its own thread.

Summary: PDM was connected to multiple PVE clusters that are run behind NAT (i.e. hosts have 10.x.y.z/24 IPs and are externally accessible via 172.22.0.0/16)
Connection and discovery are successful, however migration option fails with the following error in "Target Network" field:
Error: api error (status = 400 Bad Request): api returned unexpected data - failed to parse api response

As an experiment I've moved the PDM to the same network as the hosts (10.x.y.z) and did the discovery via the 10.x.y.z network. In this case the connection between PDM and PVE is direct and NAT is not involved. However, that did not change the outcome - still getting the error.

All clusters are running the latest software.

Happy to supply logs as needed.
Thanks!


Blockbridge : Ultra low latency all-NVME shared storage for Proxmox - https://www.blockbridge.com/proxmox
 
hi, thanks for the report

can you check the browser console and post which api call returns that data ?
(improving the error handling , e.g naming (e.g. including the source api call) is on our roadmap ;) )

there is probably some mismatch between what the PVE api returns and what the rust code expects (in javascript/perl land types are not that strict, so those mismatches don't appear there that often)
 
Hi Dominik,

I only have one error in the console and it seems to be unrelated:
src/widget/pve_migrate_mapping.rs:148 could not parse 'file' property of 'ide2

When initial Migate widget comes up the "Target Remote" points to itself. The "Target Network" only becomes available when I switch the remote.
At this time 4 API calls are logged in Dev Tools (2 of each):
https://172.22.2.5:8443/api2/extjs/pve/remotes/pve8r3q9-nvme/nodes/localhost/network?interface-type=any_bridge
https://172.22.2.5:8443/api2/extjs/...orage?enabled=true&format=true&content=images

The network one returns:
{
"errors": {},
"message": "api returned unexpected data - failed to parse api response",
"status": 400,
"success": false
}

curl 'https://172.22.2.5:8443/api2/extjs/pve/remotes/pve8r3q9-nvme/nodes/localhost/network?interface-type=any_bridge' \
> -H 'Accept: */*' \
> -H 'Cookie: PDMAuthCookie=PDM:root@pam:...' \
> -H 'Referer: https://172.22.2.5:8443/?' \
> -H 'Sec-Fetch-Dest: empty' \
> -H 'Sec-Fetch-Mode: cors' \
> -H 'Sec-Fetch-Site: same-origin' \
> -H 'cache-control: no-cache' \
> --insecure
{"errors":{},"message":"api returned unexpected data - failed to parse api response","status":400,"success":false}


Blockbridge : Ultra low latency all-NVME shared storage for Proxmox - https://www.blockbridge.com/proxmox
 
Last edited:
thanks, that helps a bit, so it seems our parser for the network api is not correct currently.

can you share the output of the api calls from the pve remote itself?

e.g.
Code:
pvesh get /nodes/<nodename>/network --type any_bridge --output-format json-pretty

you could also omit the '--type' so we get the output for all interfaces (maybe helps in the future)
also please censor the output if necessary ;)

thanks

EDIT: also the config of that vm would be interesting because of the 'could not parse 'file' property of 'ide2' error
 
EDIT: also the config of that vm would be interesting because of the 'could not parse 'file' property of 'ide2' error
that's caused by empty cdrom drives IIRC..
 
you could also omit the '--type' so we get the output for all interfaces (maybe helps in the future)
here you go, I guess the reason is clear - dhcp :-) As a reminder these are normally short-lived private cloud instances for CI/CD, hence the config.

pvesh get /nodes/pve8r3q9-host1-nvme/network --type any_bridge --output-format json-pretty
[
{
"active" : 1,
"autostart" : 1,
"bridge_fd" : "0",
"bridge_ports" : "ens3",
"bridge_stp" : "off",
"families" : [
"inet"
],
"iface" : "vmbr0",
"method" : "dhcp",
"method6" : "manual",
"priority" : 4,
"type" : "bridge"
}
]

pvesh get /nodes/pve8r3q9-host1-nvme/network --output-format json-pretty
[
{
"active" : 1,
"exists" : 1,
"families" : [
"inet"
],
"iface" : "ens7",
"method" : "manual",
"method6" : "manual",
"type" : "eth"
},
{
"active" : 1,
"autostart" : 1,
"bridge_fd" : "0",
"bridge_ports" : "ens3",
"bridge_stp" : "off",
"families" : [
"inet"
],
"iface" : "vmbr0",
"method" : "dhcp",
"method6" : "manual",
"priority" : 4,
"type" : "bridge"
},
{
"active" : 1,
"exists" : 1,
"families" : [
"inet"
],
"iface" : "ens3",
"method" : "manual",
"method6" : "manual",
"priority" : 3,
"type" : "eth"
}
]


qm config 100
boot: order=scsi0;ide2;net0
cores: 1
cpu: x86-64-v2-AES
ide2: none,media=cdrom
memory: 2048
meta: creation-qemu=9.0.2,ctime=1736180081
net0: virtio=02:BB:BB:7C:92:0B,bridge=vmbr0,firewall=1
numa: 0
ostype: l26
scsi0: bb-iscsi:vm-100-disk-0,iothread=1,size=1G
scsihw: virtio-scsi-single
smbios1: uuid=b1da7f16-77f8-40c1-a361-9ba43ea95452
sockets: 1
vmgenid: dc680872-1326-445c-9ded-fa53fb588bf9


Blockbridge : Ultra low latency all-NVME shared storage for Proxmox - https://www.blockbridge.com/proxmox
 
Last edited:

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!