Hello,
I'm trying to fully automate my homelab with Proxmox and infra as code with Pulumi.
A missing feature is to allow the modification of low-level lxc settings via the API, as spotted in #1543.
Today, the GET config endpoint returns the current low-level configuration but don't allow to edit it (PUT).
I've read developers are to communicate via the mailing-list and sign the Contributor License Agreement. But before enrolling myself in a complex process (if it is?), I'd like to know if the following patch as a chance to be accepted.
Before patch:
After patch:
You can find the git diff attached, for the repo pve-container.
I'm trying to fully automate my homelab with Proxmox and infra as code with Pulumi.
A missing feature is to allow the modification of low-level lxc settings via the API, as spotted in #1543.
Today, the GET config endpoint returns the current low-level configuration but don't allow to edit it (PUT).
I've read developers are to communicate via the mailing-list and sign the Contributor License Agreement. But before enrolling myself in a complex process (if it is?), I'd like to know if the following patch as a chance to be accepted.
Before patch:
Code:
$ curl -k -H 'Authorization: [RETRACTED]' 'https://192.168.1.199:8006/api2/json/nodes/homelab/lxc/100/config' -X PUT -H "Content-Type: application/json" -d '{"lxc":[["lxc.cgroup2.devices.allow","c 10:200 rwm"],["lxc.mount.entry","/dev/net dev/net none bind,create=dir"]]}'
{
"errors": {
"lxc": "property is not defined in schema and the schema does not allow additional properties"
},
"data": null
}
After patch:
Code:
$ curl -k -H 'Authorization: [RETRACTED]' 'https://192.168.1.199:8006/api2/json/nodes/homelab/lxc/100/config' -X PUT -H "Content-Type: application/json" -d '{"lxc":[["lxc.cgroup2.devices.allow","c 10:200 rwm"],["lxc.mount.entry","/dev/net dev/net none bind,create=dir"]]}'
{
"data": null
}
$ curl -k -H 'Authorization: [RETRACTED]' 'https://192.168.1.199:8006/api2/json/nodes/homelab/lxc/100/config' | jq '.data.lxc'
[
[
"lxc.cgroup2.devices.allow",
"c 10:200 rwm"
],
[
"lxc.mount.entry",
"/dev/net dev/net none bind,create=dir"
]
]
Code:
# tail -2 /etc/pve/lxc/100.conf
lxc.cgroup2.devices.allow: c 10:200 rwm
lxc.mount.entry: /dev/net dev/net none bind,create=dir
You can find the git diff attached, for the repo pve-container.