API /api2/json/cluster/config/qdevice not working

bas

New Member
May 10, 2022
4
1
3
Hello,

API call "/api2/json/cluster/config/qdevice" does not work.

I get this response:
JSON:
{
  "data": {
    
  }
}

When running it through the CLI "pvesh get /cluster/config/qdevice --output-format json-pretty" I get the correct output (I masked the IP):
JSON:
{
   "Algorithm" : "Fifty-Fifty split",
   "Last poll call" : "2022-05-10T14:00:35 (cast vote)",
   "Model" : "Net",
   "QNetd host" : "***.***.***.***:5403",
   "State" : "Connected",
   "Tie-breaker" : "Node with lowest node ID"
}

We run PVE 5.15.30-3 community on all nodes.

Can this be fixed?

Regards,
Bas
 
Hello,

Sorry, that was the kernel:

proxmox-ve: 7.2-1 (running kernel: 5.15.30-2-pve)
pve-manager: 7.2-3 (running version: 7.2-3/c743d6c1)

We are making the API call from the browser with a root session open. But it also doesn't work with Postman with the authorization header with an API key.

Regards,
Bas
 
Hello,

I just go to the URL in a webbrowser in a session that's already authenticated in the web UI of Proxmox. All other API calls work fine, just this one doesn't return any data.
 
Hi,

yes the issue seems related to write permissions on the qdevice socket (/var/run/corosync-qdevice/corosync-qdevice.sock). The API runs under the user www-data for that endpoint, which does not have write permissions on the socket. pvesh runs under root instead (at least I am assuming you invoked it as root). We'll update you here once this is resolved :)