satishglondhe commented on issue #6765:
URL: https://github.com/apache/cloudstack/issues/6765#issuecomment-1382677111

   Thanks @weizhouapache for replying.
   I'll look into more details of cloud init setup. For now, we have added some 
delay while auto-provisioning the VM, which has resolved our issue. Let me 
explain the scenario. This may help someone, or if I'm wrong, you can give 
proper direction for this.
   On a single click, we auto-provision the VM and related services by creating 
the network, creating egress rules if applicable, registering the SSH key, 
deploying the VM, acquiring an IP address, associating the acquired IP with the 
VM, creating firewall rules, and so on. 
   Steps are
   1. User fill up the form (Region, Compute Offering, Network Type(Isolated/ 
VPC), Network(If available), SSH Key, Host Name)
   2. Click on the deploy button, and then internally our system do the 
following using APIs
   3. Register the SSH key for account/ project
   4. If the network is not available in that account we create network
   5. Create Virtual Machine
   6. Acquire one available public IP address in network
   7. Associate that public IP address to the VM
   8. Add default firewall rules
   9. And show the success message to User
   
   For each API call, we wait for the ACS response using async job request APIs 
and then fire the next API. Everything works fine except the SSH key. 
   So we observed that we get a success response for deployVirtualMachine and 
then send the acquire IP address and associate IP address request APIs to the 
VM. But here is the gotcha: deployVirtualMachine gives the response, but still 
there are some OS installation operations going on and before this operation's 
completion, as per our flow, the next API gets executed because the OS is not 
fully ready. Sometimes the SSH key works, sometimes not. So we have added some 
delay before the associate public IP address in the VM API call, and then it 
started working fine.
   
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to