We are provisioning nodes through CM API and are constantly hitting deadlocks while running the "host install" call. Once the deadlock is hit, Host Install stage hangs indefinitely in CM and needs to be manually aborted.
So we can understand this better, could you please supply the API calls you are making or, even better, the code you are using?
Thanks for the reply. Roughly here is how the nodes are provisioned: We have a script that decides when our cluster needs more vCPU's. It then spins up as many nodes as it feels we need simultaneously and each node fires a script that setups it's self. The script uses CMApiHelper wrapper class and executes the following:
cm_api.host_install(args.host_user, args.host, args.key)
# All prior steps need to be fully completed before apply_host_template is called
# Give the service a chance to properly start up before checking whether it's up and healthy
Let me know if you need any more info, I am more than happy to provide it.
This could be a bit more complex. I'm leaning toward this being a db locking issue rather than something that CM is doing wrong, but it is hard to say without digging in deep here.
What version of postgres are you using? Perhaps it is older?
We are using the built in db via the yum package:
postgres (PostgreSQL) 8.4.20
We would not mind a remote session to gather more info if it would help to resolve this issue.