What versions of MAAS and Juju are you working with?
The obvious way this might happen if you have two API clients both requesting the same machine at the same time.
What constraints are being requested? If you try the deployment request manually, does it work? (I would log in using the CLI and try doing something like
maas $PROFILE machines allocate $SYSTEM_ID <constraints>, and then
maas $PROFILE machine deploy $SYSTEM_ID and check if that succeeds.)
The fact that it gets to the
deploy operation is also interesting. That likely means that the machine has already been allocated, just couldn’t be deployed for whatever reason. So that leads to another thought: because the conflict is happening at
deploy time, that might mean that MAAS can’t find any free IP addresses to assign the node. (MAAS relies on database transactions to ensure that IP allocations are unique, but returning a
CONFLICT is unusual because MAAS should retry the allocation several times until it succeeds.) Can you check the interface configuration of the acquired node, and check if all its networks configured with automatically-assigned IP addresses are attached to subnets that have sufficient free IP addresses?