Skip to content
This repository was archived by the owner on Aug 1, 2024. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion provision.sh
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,8 @@ docker-compose exec -T mysql57 bash -c "mysql -uroot mysql" < provision.sql
# and create its users.
if needs_mongo "$to_provision_ordered"; then
echo -e "${GREEN}Waiting for MongoDB...${NC}"
until docker-compose exec -T mongo bash -c 'mongo --eval "printjson(db.serverStatus())"' &> /dev/null
# mongo container and mongo process/shell inside the container
until docker-compose exec -T mongo mongo --eval "db.serverStatus()" &> /dev/null

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This partially undoes one of the changes made in https://github.com/edx/devstack/pull/532 to support multiple devstack releases; @ztraboo , did you encounter problems trying this without wrapping in bash -c?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jmbowman I executed both the following commands and they seemed to give similar results.

With bash

(venv)ztraboo@ztraboo-macbookpro devstack % COMPOSE_PROJECT_NAME=devstack-juniper.master docker-compose exec -T mongo bash -c 'mongo --eval "printjson(db.serverStatus())"'

Without bash

(venv)ztraboo@ztraboo-macbookpro devstack % COMPOSE_PROJECT_NAME=devstack-juniper.master docker-compose exec -T mongo mongo --eval "db.serverStatus()"

do
printf "."
sleep 1
Expand Down
4 changes: 2 additions & 2 deletions upgrade_mongo_3_6.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ make dev.up.mongo
mongo_container="$(make -s dev.print-container.mongo)"

echo -e "${GREEN}Waiting for MongoDB...${NC}"
until docker exec "$mongo_container" bash -c 'mongo --eval \"printjson(db.serverStatus())\"' &> /dev/null
until docker exec "$mongo_container" mongo --eval 'db.serverStatus()' &> /dev/null
do
if docker logs "$mongo_container" | grep -q "BadValue: Invalid value for version, found 3.6, expected '3.4' or '3.2'"; then
echo -e "${YELLOW}Already upgraded to Mongo 3.6, exiting${NC}"
Expand Down Expand Up @@ -47,7 +47,7 @@ make dev.up.mongo
mongo_container="$(make -s dev.print-container.mongo)"

echo -e "${GREEN}Waiting for MongoDB...${NC}"
until docker exec "$mongo_container" bash -c 'mongo --eval \"printjson(db.serverStatus())\"' &> /dev/null
until docker exec "$mongo_container" mongo --eval 'db.serverStatus()' &> /dev/null
do
printf "."
sleep 1
Expand Down