NTTLimitedRD / plumbery

Cloud automation at Dimension Data with Apache Libcloud
Apache License 2.0
14 stars 9 forks source link

Plumbery deploy won't succeed to pass the prepare step #57

Open romainkotarba opened 7 years ago

romainkotarba commented 7 years ago

Hi,

Trying to deploy 3 Ubuntu 14 VM on Dimension Data MCP EU6, the steps build + configure + start follow well. But after, I encounter a recurrent failure with the prepare command.

python -m plumbery -d fittings.yaml deploy

The libcloud script is successfully pushed to the server but not executed on any of the 3 VMs

So far the workaround found is to run the prepare.cloud-init.sh manually and reboot the server after.

The fittings.yaml file used for this example: fittings.zip

Thanks,

Romain K

bernard357 commented 7 years ago

Hello Romain, I could take your fittings plan and run it without problem from macOs in 10 minutes or so. Reboot of servers took place nicely, and I have been able to connect over ssh afterwards to check the logs, etc. In other terms: I could not reproduce the problem that you are describing from my workstation.

What operating system are you using to run plumbery please? Maybe this could give me a better clue on where to find a solution for you. Thanks

romainkotarba commented 7 years ago

Hi Bernard,

I'm working on a Windows 10 Enterprise 64 bit and using plumbery 1.0.4 with Python 2.7.6 Here is the end of the trace I have for each server deployed. It looks this is linked to VMware Tools:

00:44:52 - preparing remote install of cloud-init 00:44:52 - preparing reboot to trigger cloud-init 00:44:52 - node is reachable at '168.128.12.44' 00:44:53 Connected (version 2.0, client OpenSSH_6.6.1p1) 00:44:53 Authentication (password) successful! 00:44:53 - put meta-data 00:44:53 [chan 0] Opened sftp connection (server version 3) 00:44:54 [chan 0] sftp session closed. 00:44:54 - put user-data 00:44:54 [chan 1] Opened sftp connection (server version 3) 00:44:56 [chan 1] sftp session closed. 00:44:56 - run prepare.cloud-init.sh 00:44:56 [chan 2] Opened sftp connection (server version 3) 00:44:56 [chan 2] sftp session closed. 00:44:58 - reboot node 00:44:58 - unable to reboot node 00:44:58 VM_TOOLS_INVALID_STATUS: API Operation REBOOT_SERVER is not allowed at present - VMware Tools is not running on the Server. Please start VMware Tools, and try again.

However, I see there is a log file fo vmware that says VMWare tools were successfully installed. /var/log/vmware-tools-upgrader.log

Romain

bernard357 commented 7 years ago

ok, thanks for the comprehensive information. I will check the code to see if plumbery could loop in such situation.

bernard357 commented 7 years ago

God news, this was put to code trunk some time ago. This is why I could not reproduce the issue from my workstation. Code will be released to PyPi with the next version of plumbery.

bernard357 commented 7 years ago

Romain, a brand new package has been pushed to PyPi. Would you mind to upgrade plumbery and to check if this fixes your issue please?

pip install plumbery --upgrade python -m plumbery -v

Last command should display 17.5.22, which is the label of the new version.

Thanks for your feed-back

romainkotarba commented 7 years ago

Hi Bernard,

First thank you for the upgrade of the Plumbery version.

Now running the deploy command reaches the end without any issue. Althought the plumbery logs show the script is ran, it seems prepare.cloud-init.sh is not really executed since cloud-init is not installed on the VM when I try to call it.

16:00:05 Authentication (password) successful! 16:00:05 - put meta-data 16:00:06 [chan 0] Opened sftp connection (server version 3) 16:00:07 [chan 0] sftp session closed. 16:00:07 - put user-data 16:00:07 [chan 1] Opened sftp connection (server version 3) 16:00:08 [chan 1] sftp session closed. 16:00:08 - run prepare.cloud-init.sh 16:00:08 [chan 2] Opened sftp connection (server version 3) 16:00:08 [chan 2] sftp session closed. 16:00:10 - reboot node

Manual reboot won't help, I still have to run the prepare.cloud-init.sh first.

Best regards,