gandi.cli
gandi.cli copied to clipboard
Using --run option on vm creation
When using '--run' option I noticed my command is only executed when I stop the new created vm and restart it. Is it the expected behaviour ?
Hi, this is not the expected behaviour, it should be executed right after vm creation.
Please can you provide the information requested by this section so we can further investigate ? https://github.com/Gandi/gandi.cli/blob/master/CONTRIBUTING.md#reporting-issues
Thanks
I have installed from github source (commit 62f01d83b32a4120cb612c8e6abdd8063e4e1a25) in a Docker instance based on debian/wheezy.
(gandi.cli)root@b0d1f7125477:/# gandi --version
Gandi CLI 0.15
Copyright: © 2014-2015 Gandi S.A.S.
License: GPL-3
(gandi.cli)root@b0d1f7125477:/# uname -a
Linux b0d1f7125477 4.0.7-boot2docker #1 SMP Wed Jul 15 00:01:41 UTC 2015 x86_64 GNU/Linux
Thanks, what was the image you used for the VM creation ? (or if you could provide the vm create parameters used if you still have them so we can try to reproduce)
I was running this command
gandi vm create --datacenter FR --memory 512 --cores 1 --ip-version 4 \
--hostname "rds-baseimage" --login admin --image "Debian 8 64 bits (HVM)" \
--size 4G --sshkey "<mykey>" \
--run "apt-get update -y -qq && DEBIAN_FRONTEND=noninteractive apt-get install -q -y curl && \
curl -sSL https://gist.githubusercontent.com/...../bootstrap.sh | sh"
Did you reproduced this issue ?
I can confirm this issue, this seems to depend on the image
Fails with Debian 8 64 bits (HVM)
:
gandi vm create --hostname test1 --image "Debian 8 64 bits (HVM)" --run "touch /tmp/ok" --ip-version 4 --bg
After creation, a ssh
to the host shows that /tmp/ok
was not created...
The same commands with: Ubuntu 14.04 64 bits LTS (HVM)
will create /tmp/ok
will succeed.
Hello,
we reproduced the bug internally and are currently debugging the image, will keep you posted.
Thanks for the inputs.