Skip to content

Commit

Permalink
[CE-132][CE-133]Fixed clean up left overs
Browse files Browse the repository at this point in the history
The currently initcluster clean up does not clean up
everything, there are still some etcd entries and few
containers left untouched. This patch set will also
clean up these left overs and also make fabric 1.0.2
release as the default

Change-Id: Ib673067a7f79e32713a665ee272760a582bb3376
Signed-off-by: tongliofcary <litong01@us.ibm.com>
  • Loading branch information
tongliofcary committed Sep 7, 2017
1 parent da4f998 commit 3f578c0
Show file tree
Hide file tree
Showing 4 changed files with 35 additions and 11 deletions.
34 changes: 28 additions & 6 deletions src/agent/ansible/roles/env_flanneld/dnssetup/tasks/destroy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,33 @@
node_ip: "{{ hostvars[inventory_hostname].private_ip }}"
node_name: "{{ hostvars[inventory_hostname].inter_name }}"

- name: Stop skydns service
command: >-
docker rm -f skydns.{{ node_name }}
- name: Remove registrator service
command: docker rm -f registrator.{{ node_name }}

- name: Remove dns service
command: docker rm -f skydns.{{ node_name }}
when: node_ip == hostvars[groups['allnodes'][0]].private_ip

- name: Stop registrator service
command: >-
docker rm -f registrator.{{ node_name }}
- name: Stop the flanneld and docker service
service:
name: "{{ item }}"
state: stopped
with_items:
- flanneld
- docker

- name: Reset etcd
uri:
url: "http://{{ inventory_hostname }}:2379/v2/keys/{{ item }}?recursive=true"
method: DELETE
status_code: 200,202,204,404
with_items:
- coreos.com
- skydns
when: inventory_hostname == groups['etcdnodes'][0]

- name: Stop the etcd services
service:
name: etcd
state: stopped
when: inventory_hostname in groups['etcdnodes']
5 changes: 3 additions & 2 deletions src/agent/ansible/vars/bc1st.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ GIT_URL: "http://gerrit.hyperledger.org/r/fabric"

# The gerrit patch set reference, should be automatically set by gerrit
# GERRIT_REFSPEC: "refs/changes/23/11523/3" # 1.0.0
GERRIT_REFSPEC: "refs/changes/47/12047/3" # 1.0.1
# GERRIT_REFSPEC: "refs/changes/47/12047/3" # 1.0.1
GERRIT_REFSPEC: "refs/changes/13/13113/1"

# This variable defines fabric network attributes
fabric: {
Expand Down Expand Up @@ -47,5 +48,5 @@ fabric: {
}
},

baseimage_tag: "1.0.1"
baseimage_tag: "1.0.2"
}
2 changes: 1 addition & 1 deletion src/agent/ansible/vars/bc2nd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,5 +22,5 @@ fabric: {
}
},

baseimage_tag: "1.0.1"
baseimage_tag: "1.0.2"
}
5 changes: 3 additions & 2 deletions src/agent/ansible/vars/vb1st.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ GIT_URL: "http://gerrit.hyperledger.org/r/fabric"

# The gerrit patch set reference, should be automatically set by gerrit
# GERRIT_REFSPEC: "refs/changes/23/11523/3" # 1.0.0
GERRIT_REFSPEC: "refs/changes/47/12047/3" # 1.0.1
# GERRIT_REFSPEC: "refs/changes/47/12047/3" # 1.0.1
GERRIT_REFSPEC: "refs/changes/13/13113/1"

# This variable defines fabric network attributes
fabric: {
Expand Down Expand Up @@ -40,5 +41,5 @@ fabric: {
}
},

baseimage_tag: "1.0.1"
baseimage_tag: "1.0.2"
}

0 comments on commit 3f578c0

Please sign in to comment.