Skip to content

Commit a91d51c

Browse files
authored
Merge pull request #452 from ablecloud-team/revert-450-ablestack-diplo
Revert "ovs일 경우 sysctl 적용 해제 및 Cube 호스트 제거 할 시 json 초기화 오류 수정"
2 parents 0890e19 + 62d0751 commit a91d51c

File tree

2 files changed

+2
-6
lines changed

2 files changed

+2
-6
lines changed

python/cluster/cluster_config.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,6 @@ def openClusterJson():
7676
# 파라미터로 받은 json 값으로 cluster_config.py 무조건 바꾸는 함수 (동일한 값이 있으면 변경, 없으면 추가)
7777
def insert(args):
7878
try:
79-
openvswitch_service_check = os.system("systemctl is-active openvswitch > /dev/null")
8079
# Network Filter 적용
8180
subprocess.run(["virsh", "nwfilter-define", "--file", "/usr/local/sbin/nwfilter-allow-all.xml"], stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL)
8281
subprocess.run(["modprobe", "br_netfilter"], stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL)
@@ -85,8 +84,7 @@ def insert(args):
8584
sysctl_file.write("\nnet.bridge.bridge-nf-call-iptables=1")
8685
sysctl_file.write("\nnet.bridge.bridge-nf-call-ip6tables=1")
8786

88-
if openvswitch_service_check != 0:
89-
subprocess.run(["sysctl", "-p"], stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL)
87+
subprocess.run(["sysctl", "-p"], stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL)
9088

9189
# 수정할 cluster.json 파일 읽어오
9290
# 기존 file json 데이터를 param 데이터로 교체

python/cluster/remove_cube_host.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ def remove(args):
8787
outfile.write('{\n')
8888
outfile.write(' "bootstrap": {\n')
8989
outfile.write(' "scvm": "false",\n')
90-
outfile.write(' "ccvm": "false",\n')
90+
outfile.write(' "ccvm": "false"\n')
9191
outfile.write(' "pfmp": "false"\n')
9292
outfile.write(' },\n')
9393
outfile.write(' "monitoring": {\n')
@@ -98,7 +98,6 @@ def remove(args):
9898
with open(cluster_file_path, 'w') as outfile:
9999
outfile.write('{\n')
100100
outfile.write(' "clusterConfig": {\n')
101-
outfile.write(' "type": "",\n')
102101
outfile.write(' "ccvm": {\n')
103102
outfile.write(' "ip": ""\n')
104103
outfile.write(' "pn": ""\n')
@@ -130,7 +129,6 @@ def remove(args):
130129
with open(cluster_file_path, 'w') as outfile:
131130
outfile.write('{\n')
132131
outfile.write(' "clusterConfig": {\n')
133-
outfile.write(' "type": "",\n')
134132
outfile.write(' "ccvm": {\n')
135133
outfile.write(' "ip": ""\n')
136134
outfile.write(' },\n')

0 commit comments

Comments
 (0)