Skip to content

Commit

Permalink
Merge "FAB-8612 Cleanup eyfn/byfn with --remove-orphans"
Browse files Browse the repository at this point in the history
  • Loading branch information
mastersingh24 authored and Gerrit Code Review committed May 22, 2018
2 parents 76008b2 + 1cd059e commit 1bfdee8
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 8 deletions.
3 changes: 1 addition & 2 deletions first-network/byfn.sh
Original file line number Diff line number Diff line change
Expand Up @@ -235,8 +235,7 @@ function upgradeNetwork () {
# Tear down running network
function networkDown () {
# stop org3 containers also in addition to org1 and org2, in case we were running sample to add org3
docker-compose -f $COMPOSE_FILE -f $COMPOSE_FILE_COUCH -f $COMPOSE_FILE_ORG3 down --volumes
docker-compose -f $COMPOSE_FILE -f $COMPOSE_FILE_ORG3 down --volumes
docker-compose -f $COMPOSE_FILE -f $COMPOSE_FILE_COUCH -f $COMPOSE_FILE_ORG3 down --volumes --remove-orphans

# Don't remove the generated artifacts -- note, the ledgers are always removed
if [ "$MODE" != "restart" ]; then
Expand Down
7 changes: 1 addition & 6 deletions first-network/eyfn.sh
Original file line number Diff line number Diff line change
Expand Up @@ -136,8 +136,7 @@ function networkUp () {

# Tear down running network
function networkDown () {
docker-compose -f $COMPOSE_FILE -f $COMPOSE_FILE_ORG3 down --volumes
docker-compose -f $COMPOSE_FILE -f $COMPOSE_FILE_ORG3 -f $COMPOSE_FILE_COUCH down --volumes
docker-compose -f $COMPOSE_FILE -f $COMPOSE_FILE_ORG3 -f $COMPOSE_FILE_COUCH down --volumes --remove-orphans
# Don't remove containers, images, etc if restarting
if [ "$MODE" != "restart" ]; then
#Cleanup the chaincode containers
Expand All @@ -149,10 +148,6 @@ function networkDown () {
# remove the docker-compose yaml file that was customized to the example
rm -f docker-compose-e2e.yaml
fi

# For some black-magic reason the first docker-compose down does not actually cleanup the volumes
docker-compose -f $COMPOSE_FILE -f $COMPOSE_FILE_ORG3 down --volumes
docker-compose -f $COMPOSE_FILE -f $COMPOSE_FILE_ORG3 -f $COMPOSE_FILE_COUCH down --volumes
}

# Use the CLI container to create the configuration transaction needed to add
Expand Down

0 comments on commit 1bfdee8

Please sign in to comment.