diff options
author | Michael Chapman <woppin@gmail.com> | 2016-01-14 16:52:15 +1100 |
---|---|---|
committer | Michael Chapman <woppin@gmail.com> | 2016-01-14 16:52:15 +1100 |
commit | 56463a5e664d13fb29272f7391befbcdf880682d (patch) | |
tree | 6841f5843ad69595b2e83c120a9cd40a8bdfea1b /ci | |
parent | b08e3323c00bf216730ed44c729562ffa1f57ac9 (diff) |
Deploy failed due to .ssh already existing
In a local test, I observed virt-customize failing during ssh
key injection
Injecting ssh key to instack VM
[ 0.0] Examining the guest ...
[ 48.0] Setting a random seed
[ 48.0] Running: mkdir /root/.ssh/
mkdir: cannot create directory '/root/.ssh/': File exists
virt-customize: mkdir /root/.ssh/: command exited with an error
Adding -p should prevent this from happening.
Change-Id: If8f085cba3083ccf3d5e8f648a9830f142ea53d9
Diffstat (limited to 'ci')
-rwxr-xr-x | ci/deploy.sh | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/ci/deploy.sh b/ci/deploy.sh index 05df6406..0ae7bf88 100755 --- a/ci/deploy.sh +++ b/ci/deploy.sh @@ -511,7 +511,7 @@ function setup_instack_vm { # if the VM is not running update the authkeys and start it if ! virsh list | grep instack > /dev/null; then echo "Injecting ssh key to instack VM" - virt-customize -c qemu:///system -d instack --run-command "mkdir /root/.ssh/" \ + virt-customize -c qemu:///system -d instack --run-command "mkdir -p /root/.ssh/" \ --upload ~/.ssh/id_rsa.pub:/root/.ssh/authorized_keys \ --run-command "chmod 600 /root/.ssh/authorized_keys && restorecon /root/.ssh/authorized_keys" \ --run-command "cp /root/.ssh/authorized_keys /home/stack/.ssh/" \ |