Skip to content

Commit 121af7b

Browse files
zhangjing2zhangjing57
zhangjing2
authored andcommitted
[fix][cluster] modify code for app setup when cp dir
1 parent 590877d commit 121af7b

File tree

2 files changed

+13
-4
lines changed

2 files changed

+13
-4
lines changed

dingo_command/celery_api/__init__.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@
7272
CONF.register_opts(redis_opts, redis_group)
7373

7474
#复制ansible-deploy目录到WORK_DIR目录下
75-
ansible_dir = os.path.join(os.getcwd(), "dingo_command","templates","ansible-deploy")
76-
WORK_DIR = CONF.DEFAULT.cluster_work_dir
77-
aaa = subprocess.run(["cp", "-LRpf", ansible_dir, WORK_DIR], capture_output=True)
75+
# ansible_dir = os.path.join(os.getcwd(), "dingo_command","templates","ansible-deploy")
76+
# WORK_DIR = CONF.DEFAULT.cluster_work_dir
77+
# aaa = subprocess.run(["cp", "-LRpf", ansible_dir, WORK_DIR], capture_output=True)
7878
# print(aaa.stdout)

docker/start_service.sh

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,16 @@
1-
21
#!/usr/bin/bash
32
set -ex
43

4+
# copy dir
5+
TARGET_DIR="/var/lib/dingo-command/ansible-deploy"
6+
if [ ! -d "$TARGET_DIR" ]; then
7+
echo "the taget dir is not exist, copying dir"
8+
mkdir -p /var/lib/dingo-command
9+
cp -LRpf /opt/dingo-aurora/dingo_command/templates/ansible-deploy /var/lib/dingo-command
10+
else
11+
echo "the taget dir is exist"
12+
fi
13+
514
# kolla_set_configs
615
echo "/usr/bin/supervisord -c /etc/dingo-command/supervisord.conf" >/run_command
716

0 commit comments

Comments
 (0)