gandi.cli icon indicating copy to clipboard operation
gandi.cli copied to clipboard

Using --run option on vm creation

Open rds13 opened this issue 9 years ago • 7 comments

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 ?

rds13 avatar Aug 05 '15 07:08 rds13

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

sayoun avatar Aug 05 '15 07:08 sayoun

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

rds13 avatar Aug 08 '15 16:08 rds13

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)

sayoun avatar Aug 10 '15 06:08 sayoun

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"

rds13 avatar Aug 11 '15 07:08 rds13

Did you reproduced this issue ?

rds13 avatar Aug 20 '15 09:08 rds13

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.

vaab avatar Oct 08 '15 15:10 vaab

Hello,

we reproduced the bug internally and are currently debugging the image, will keep you posted.

Thanks for the inputs.

sayoun avatar Oct 12 '15 09:10 sayoun