Skip to content
This repository was archived by the owner on Aug 16, 2021. It is now read-only.

Commit 7ed2114

Browse files
authored
Merge pull request #90 from postgres-ai/dmius-i3-mount-fix
Fix order of mount and docker create
2 parents 6b24201 + 6de723f commit 7ed2114

File tree

1 file changed

+10
-9
lines changed

1 file changed

+10
-9
lines changed

nancy_run.sh

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -871,15 +871,7 @@ elif [[ "$RUN_ON" == "aws" ]]; then
871871
msg " To connect docker machine use:"
872872
msg " docker \`docker-machine config $DOCKER_MACHINE\` exec -it pg_nancy_${CURRENT_TS} bash"
873873

874-
containerHash=$( \
875-
docker `docker-machine config $DOCKER_MACHINE` run \
876-
--name="pg_nancy_${CURRENT_TS}" \
877-
-v /home/ubuntu:/machine_home \
878-
-v /home/storage:/storage \
879-
-dit "postgresmen/postgres-with-stuff:pg${PG_VERSION}"
880-
)
881-
dockerConfig=$(docker-machine config $DOCKER_MACHINE)
882-
874+
docker-machine ssh $DOCKER_MACHINE "sudo sh -c \"mkdir /home/storage\""
883875
if [[ "${AWS_EC2_TYPE:0:2}" == "i3" ]]; then
884876
msg "Using high-speed NVMe SSD disks"
885877
# Init i3's NVMe storage, mounting one of the existing volumes to /storage
@@ -912,6 +904,15 @@ elif [[ "$RUN_ON" == "aws" ]]; then
912904
docker-machine ssh $DOCKER_MACHINE sudo mount /dev/xvdf /home/storage
913905
fi
914906
fi
907+
908+
containerHash=$( \
909+
docker `docker-machine config $DOCKER_MACHINE` run \
910+
--name="pg_nancy_${CURRENT_TS}" \
911+
-v /home/ubuntu:/machine_home \
912+
-v /home/storage:/storage \
913+
-dit "postgresmen/postgres-with-stuff:pg${PG_VERSION}"
914+
)
915+
dockerConfig=$(docker-machine config $DOCKER_MACHINE)
915916
else
916917
err "ASSERT: must not reach this point"
917918
exit 1

0 commit comments

Comments
 (0)