I’m working on some python scripts for integration similar to spinning up a machine from the pool, running a job and then releasing it when done.
It seems deployment fails for my machines with "Failed to render preseed: " if I don’t push them through a test cycle first though. I was wondering if my code was wrong, so I trying maas local machine deploy --debug, and I’m getting the same error.
nafallo@maas:~$ maas local machine deploy bcdywy --debug
400 Bad Request
Content-Length: 26
Content-Type: text/plain; charset=utf-8
Date: Wed, 15 Jun 2022 08:06:00 GMT
Server: TwistedWeb/18.9.0
Status: 400
Vary: Cookie
X-Frame-Options: SAMEORIGIN
Failed to render preseed:
I played around with replacing /etc/maas/preseeds/curtin_userdata with curtin_userdata_custom, but that seems to have been a red herring. It was more likely that I pushed the machine that worked through a test cycle, than modifying the file actually helping.
Any suggestions as to finding the reason for this failed rendering? Logs haven’t helped either.
==> /var/log/maas/maas.log <==
2022-06-15T08:06:00.377574+00:00 maas maas.api: [info] Request from user nafallo to acquire machine: badger.magicalforest.net (bcdywy)
2022-06-15T08:06:00.424662+00:00 maas maas.node: [info] badger: Status transition from READY to ALLOCATED
2022-06-15T08:06:00.443657+00:00 maas maas.node: [info] badger: allocated to user nafallo
==> /var/log/maas/regiond.log <==
2022-06-15 08:06:01 maasserver.preseed: [warn] WARNING: '/etc/maas/preseeds/curtin_userdata' contains deprecated preseed variables. Please remove: main_archive_directory, ports_archive_directory
2022-06-15 08:06:01 regiond: [info] 127.0.0.1 POST /MAAS/api/2.0/machines/bcdywy/?op=deploy HTTP/1.1 --> 400 BAD_REQUEST (referrer: -; agent: Python-httplib2/0.14.0 (gzip))
@nafallo, you might glance at this article and see what additional info might help. if you could give us a step-by-step reproducer, that might help a little. but yeah, this is weird.
Deploying System
Machine Deployed Successfully, Releasing...
Deploying System
Deploy failed with: Failed to render preseed:
Running Test
Deploying System
Machine Deployed Successfully, Releasing...
Deploying only seems to be working if I run tests in between deploys.
Hi @nafallo, does the maas local machine deploy bcdywy --debug output contain any additional info after the “failed to render” message?
There should be output from the actual error that’s happening
@nafallo, we’re not getting anywhere with this one. have you learned anything new? if not, please go ahead and file a bug and place it against both MAS and curtin. if you can cross-post the bug number here, that’s great, but not essential.
I recently hit the issue which had the same symptoms as this. In my case disabling allow_dns on one of the subnets attached to the rack controller and the guest fixed the issue for me. I have raised two bugs to track the issue: