proxmox 8.3-1 auto install from url exits with error 422?

tru

New Member
Oct 21, 2024
8
1
1
Hello,

I am trying to fetch my `answer.toml` file from a public gitlab repository which ends up with a `status 422` error.
The iso image was produced with:
Bash:
$ proxmox-auto-install-assistant prepare-iso proxmox-ve_8.3-1.iso --fetch-from http --url "https://gitlab.pasteur.fr/tru/proxmox/-/raw/main/answers/raidz1-fr.toml" --cert-fingerprint "F7:5B:85:F4:19:22:14:FD:F7:6F:DF:AC:7D:EF:9C:E1:7D:08:4E:EB:A3:16:D3:7D:B6:AE:3F:2C:1A:63:6A:CE"
$ sudo dd if=proxmox-ve_8.3-1-auto-from-http-url-fp.iso of=/dev/sde


When the installer fails, I can `wget` the file without issue, but `proxmox-fetch-answer` is consistently failing with:
Bash:
root@proxmox:/ # proxmox-fetch-answer
INFO: Fetching answer file in mode Http:
INFO: SSL fingerprint provided through ISO.
INFO: Gathering system information.
INFO: Sending POST request to 'https://gitlab.pasteur.fr/tru/proxmox/-/raw/main/answers/raidz1-fr.toml'.
INFO:Fetching answer file via HTTP failed: https://gitlab.pasteur.fr/tru/proxmox/-/raw/main/answers/raidz1-fr.toml: status code 422
ERROR: Aborting: Could not find any answer file!
root@proxmox:/ # wget https://gitlab.pasteur.fr/tru/proxmox/-/raw/main/answers/raidz1-fr.toml -O -
<... works fine ...>

if I put the same file on a "regular" apache server, there is no issue. It that a `GET` VS `POST` http command?

Thanks

Tru
 
Last edited:
Hi Christoph,

Thanks for the reply, indeed:
- apache is receiving the POST, but doesn't seem to care and gives out the requested answer file.
- gitlab is trying to do something with the json POST content and is not happy about it.
Bash:
$ curl --request GET https://gitlab.pasteur.fr/tru/proxmox/-/raw/main/answers/raidz1-fr.toml
VS
$ curl --request POST --data @/tmp/a.json https://gitlab.pasteur.fr/tru/proxmox/-/raw/main/answers/raidz1-fr.toml
# with /tmp/a.json file containing the sample listed in the wiki page
# and one only get the error message code 422 :(
Bottom line, I can not abuse our gitlab to host the answer file directly unless there is an option to use `GET` to only pull the answer file.
Not sure is it easy to add a logic/option into `./proxmox-installer-common/src/http.rs` to keep the data during the fingerprint and use it if the POST step fails?

Best regards

Tru
 
It isn't planned (at this time) to add an option to retrieve the answer file via a GET request instead of a POST request.
Normally, you'd want to have customized answer files per host, since machines normally differ in some way or another - that's the reason for sending system information data with the request in the first place.

But I can see some usefulness to allow configuring this, I guess.

But feel free to create an entry over at https://bugzilla.proxmox.com/ detailing your usecase, there we can better discuss & better keep track of feature requests!