Deploy with libpython-maas fails with 409

I used since years a python tool to deploy machines, worked like a charme.

but now I have the situation that I - whatever I do - get a

HTTP 409 Conflict (<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Tran\u2026)

while deploy via UI for the same machine is working.

I had this problem with 3.5.9, and now with 3.7.0 - I have no idea how to solve it.

The cmdline “maas” is not a solution for various reasons, and I didn’t try it because I was … to busy to figure out how to give a cloud-init as blob on command line instead of just reading the file in.

And it worked until last week. Deploy via WEbui is working, so it is not the maas-server itself.

Any hints?

how many deployments in parallel do you do?

One. Simply one.

And I have no clue, what is going on here. I tried an older machine - there it is working. Is it possible to get some more detailed information? This message is nearly useless.

How do I enable logs for maas? I just realized, that we don’t have them anymore.

https://canonical.com/maas/docs/about-maas-logging

Ok, got it.

so.

django.db.utils.IntegrityError: duplicate key value violates unique constraint “maasserver_bmc_power_type_parameters_idx”
DETAIL: Key (power_type, md5(power_parameters::text))=(ipmi, a9265bf3c81624c6b20f3de9fb87789d) already exists.

this is the reason. but I have no idea what it is telling me. :frowning:

I believe you’ll need to do trial/error until you figure out if this is related to a specific version of MAAS or the way you make the API call

this happens ith the official maas, too. eg.

maas machine deploy user_data@=cloud-init-base64.txt

and this is only related to a set of machines (I realized it a bit later).

Main problem: I don’t know what it is telling me with this duplicate key - eg., how is this generated or on what this key depends on.

So I don’t know where this is coming from. … but I’ll investigate further.

Ok. figures out: However it was possible - maas created duplicate keys for IPMI configuration. When I EDIT the ipmi, enter the original information uploaded - it works again.

Would really like to know, how this is possible. When someone has an idea - let me know.