Skip to content

Commit

Permalink
stop nebd-server when clean nebd
Browse files Browse the repository at this point in the history
  • Loading branch information
bai-charisu authored and ilixiaocui committed Nov 4, 2020
1 parent 316b0f3 commit 4b6dca0
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 5 deletions.
3 changes: 3 additions & 0 deletions curve-ansible/clean_nebd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@
- always
import_playbook: check_ansible_version.yml

- name: stop nebd-server
import_playbook: stop_nebd_server.yml

- name: clean nebd
hosts: client
gather_facts: no
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@

- name: copy nebd-daemon
vars:
remote_dir_name: "{{ deploy_dir }}"
remote_dir_name: "{{ curve_bin_dir }}"
local_file_path: "/tmp/nebd-daemon"
file_mode: 0755
include_tasks: copy_file_to_remote.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,3 +27,4 @@
- name: stop nebd without daemon
ignore_errors: true
shell: killall {{ curve_bin_dir }}/nebd-server
when: not {{ start_by_daemon }}
2 changes: 1 addition & 1 deletion curve-ansible/server.ini
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ defined_copysets_status="Copysets are healthy"
chunkserver_base_port=8200
chunkserver_format_disk=false
auto_get_disk_list=false
get_disk_list_cmd="lsscsi |grep ATA|awk '{print $7}'|awk -F"/" '{print $3}'"
get_disk_list_cmd="lsscsi |grep ATA|awk '{print $7}'|awk -F/ '{print $3}'"
chunk_alloc_percent=90
wal_segment_alloc_percent=10
# 每台机器上的chunkserver的数量
Expand Down
2 changes: 1 addition & 1 deletion curve-ansible/stop_nebd_server.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
- always
import_playbook: check_ansible_version.yml

- name: start nebd server
- name: stop nebd server
hosts: client
gather_facts: no
any_errors_fatal: true
Expand Down
4 changes: 2 additions & 2 deletions nebd/nebd-package/usr/bin/nebd-daemon
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ function start() {
if [ $? -eq 0 ]
then
echo "Already started nebd-server by daemon"
exit 1
exit 0
fi

# 创建logPath
Expand Down Expand Up @@ -138,7 +138,7 @@ function stop() {
if [ $? -ne 0 ]
then
echo "Didn't start nebd-server by daemon"
exit 1
exit 0
fi

daemon --name nebd-server --pidfile ${pidFile} --stop
Expand Down

0 comments on commit 4b6dca0

Please sign in to comment.