Skip to content

Commit

Permalink
[CE-257] Fix chain starting health checking bug
Browse files Browse the repository at this point in the history
The cluster may fail due to the health check and hang to that status.

This patchset introduces a new 'status' field to track the cluter status
and also updates the agent artifacts.

The fabric v0.6 and syslog options are removed in case others may
choose. Will deprecate those related code in following patchsets.

Change-Id: Ib17acc97411bcf646aae9b27a47a2479fdd97727
Signed-off-by: Baohua Yang <yangbaohua@gmail.com>
  • Loading branch information
yeasy committed Feb 4, 2018
1 parent e5880a7 commit 1a2c810
Show file tree
Hide file tree
Showing 359 changed files with 11,278 additions and 3,781 deletions.
6 changes: 3 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
# This makefile defines the following targets
#
# - all (default): Builds all targets and runs all tests/checks
# - checks: Setup as master node, and runs all tests/checks, will be triggered by CI
# - check: Setup as master node, and runs all tests/checks, will be triggered by CI
# - clean: Cleans the build area
# - doc: Start a local web service to explore the documentation
# - docker[-clean]: Build/clean docker images locally
Expand Down Expand Up @@ -133,10 +133,10 @@ license:
install: $(patsubst %,build/docker/%/.push,$(DOCKER_IMAGES))

check: setup-master ##@Code Check code format
@$(MAKE) license
tox
# @$(MAKE) license
@$(MAKE) test-case
make start && sleep 10 && make stop
make start && sleep 60 && make stop

test-case: ##@Code Run test case for flask server
@$(MAKE) -C test/ all
Expand Down
2 changes: 2 additions & 0 deletions scripts/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,5 @@ Here we collect scripts to help setup and manage the lifecycle of cello service.
Most of them are needed by the master node.

Those under [worker_node_setup](worker_node) directory should be put at the worker node to help setup.

<a rel="license" href="http://creativecommons.org/licenses/by/4.0/"><img alt="Creative Commons License" style="border-width:0" src="https://i.creativecommons.org/l/by/4.0/88x31.png" /></a><br />This work is licensed under a <a rel="license" href="http://creativecommons.org/licenses/by/4.0/">Creative Commons Attribution 4.0 International License</a>
4 changes: 2 additions & 2 deletions scripts/check_license.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,15 @@
CHECK=$(git diff --name-only HEAD * | grep -v check_license.sh | grep -v .json$ | grep -v .jpg$ | grep -v .JPG$ | grep -v .png$ | grep -v .ico$ \
| grep -v .graffle$ | grep -v .svg$ | grep -v .pug$ | grep -v .rst$ | grep -v .git \
| grep -v .pem$ | grep -v .crt$ | grep -v .key$ | grep -v lib/ | grep -v fonts/ | grep -v .min.css$ \
| grep -v .block$ | grep -v .less$ | grep -v crypto-config/ | grep -v .min.js$ \
| grep -v .block$ | grep -v .less$ | grep -v crypto-config/ | grep -v .min.js$ | grep -v .tx$ | grep -v .go$ | grep -v agent/ \
| grep -v .md$ | grep -v ^vendor/ | grep -v ^build/ | grep -v .pb.go$ | grep -v .txt | grep -v .env | sort -u)

if [[ -z "$CHECK" ]]; then
CHECK=$(git diff-tree --no-commit-id --name-only -r $(git log -2 \
--pretty=format:"%h") | grep -v check_license.sh | grep -v .json$ | grep -v .jpg$ | grep -v .JPG$ | grep -v .png$ | grep -v .ico$ \
| grep -v .graffle$ | grep -v .svg$ | grep -v .pug$ | grep -v .rst$ | grep -v .git \
| grep -v .pem$ | grep -v .crt$ | grep -v .key$ | grep -v lib/ | grep -v fonts/ | grep -v .min.css$ \
| grep -v .block$ | grep -v .less$ | grep -v crypto-config/ | grep -v .min.js$ \
| grep -v .block$ | grep -v .less$ | grep -v crypto-config/ | grep -v .min.js$ | grep -v .tx$ | grep -v .go$ | grep -v agent/ \
| grep -v .md$ | grep -v ^vendor/ | grep -v ^build/ | grep -v .pb.go$ | grep -v .txt | grep -v .env | sort -u)
fi

Expand Down
8 changes: 6 additions & 2 deletions scripts/worker_node/download_images.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
#!/usr/bin/env bash

#
# Copyright O Corp. All Rights Reserved.
#
# SPDX-License-Identifier: Apache-2.0
#

# Detecting whether can import the header file to render colorful cli output
if [ -f ../header.sh ]; then
Expand Down Expand Up @@ -65,7 +69,7 @@ IMG_TAG=1.0.4
echo_b "Downloading and retag images for kafka/zookeeper separately, as they are still v1.0.4"
for IMG in kafka zookeeper; do
HLF_IMG=hyperledger/fabric-${IMG}
if [ -z "$(docker images -q ${HLF_IMG}:${ARCH}-${HLF_VERSION} 2> /dev/null)" ]; then # not exist
if [ -z "$(docker images -q ${HLF_IMG}:${HLF_VERSION} 2> /dev/null)" ]; then # not exist
docker pull ${HLF_IMG}:$ARCH-$IMG_TAG
docker tag ${HLF_IMG}:$ARCH-$IMG_TAG ${HLF_IMG}:${HLF_VERSION}
else
Expand Down
3 changes: 2 additions & 1 deletion scripts/worker_node/setup_docker_worker_node.sh
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,10 @@ echo_b "Checking local artifacts path ${ARTIFACTS_DIR}..."
[ ! -d ${ARTIFACTS_DIR} ] \
&& echo_r "Local artifacts path ${ARTIFACTS_DIR} not existed, creating one" \
&& sudo mkdir -p ${ARTIFACTS_DIR} \
&& sudo cp -r ../../src/agent/docker/_compose_files/fabric-1.0 ${ARTIFACTS_DIR} \
&& sudo chown -R ${USER}:${USERGROUP} ${ARTIFACTS_DIR}

cp -r ../../src/agent/docker/_compose_files/fabric-1.0 ${ARTIFACTS_DIR} \

echo_b "Setup ip forward rules"
sudo sysctl -w net.ipv4.ip_forward=1

Expand Down
67 changes: 0 additions & 67 deletions src/agent/docker/_compose_files/fabric-0.6/local/fabric-4.yml

This file was deleted.

89 changes: 0 additions & 89 deletions src/agent/docker/_compose_files/fabric-0.6/local/fabric-6.yml

This file was deleted.

60 changes: 0 additions & 60 deletions src/agent/docker/_compose_files/fabric-0.6/local/peer-pbft.yml

This file was deleted.

69 changes: 0 additions & 69 deletions src/agent/docker/_compose_files/fabric-0.6/syslog/fabric-4.yml

This file was deleted.

Loading

0 comments on commit 1a2c810

Please sign in to comment.