From 7f8b40538f41757cd063e6bb6e2a4b2104d08426 Mon Sep 17 00:00:00 2001 From: Jeffrey Zhang Date: Thu, 1 Sep 2016 22:14:48 +0800 Subject: [PATCH] Use the standard start method for kolla-toolbox container TrivialFix Change-Id: Icb092e47713e0b89859747d6ed4c02b3950d7ced Signed-off-by: Jeffrey Zhang --- ansible/roles/common/tasks/config.yml | 2 ++ ansible/roles/common/tasks/start.yml | 1 + ansible/roles/common/templates/kolla-toolbox.json.j2 | 4 ++++ docker/kolla-toolbox/Dockerfile.j2 | 2 -- 4 files changed, 7 insertions(+), 2 deletions(-) create mode 100644 ansible/roles/common/templates/kolla-toolbox.json.j2 diff --git a/ansible/roles/common/tasks/config.yml b/ansible/roles/common/tasks/config.yml index 3739a49554..83c87652b3 100644 --- a/ansible/roles/common/tasks/config.yml +++ b/ansible/roles/common/tasks/config.yml @@ -6,6 +6,7 @@ recurse: yes with_items: - "heka" + - "kolla-toolbox" - "cron" - "cron/logrotate" @@ -15,6 +16,7 @@ dest: "{{ node_config_directory }}/{{ item }}/config.json" with_items: - "heka" + - "kolla-toolbox" - "cron" - name: Copying over heka config files diff --git a/ansible/roles/common/tasks/start.yml b/ansible/roles/common/tasks/start.yml index 11c0c9ff98..0ef379c4e8 100644 --- a/ansible/roles/common/tasks/start.yml +++ b/ansible/roles/common/tasks/start.yml @@ -26,6 +26,7 @@ name: "kolla_toolbox" privileged: True volumes: + - "{{ node_config_directory }}/kolla-toolbox/:{{ container_config_directory }}/:ro" - "/etc/localtime:/etc/localtime:ro" - "/dev/:/dev/" - "/run/:/run/" diff --git a/ansible/roles/common/templates/kolla-toolbox.json.j2 b/ansible/roles/common/templates/kolla-toolbox.json.j2 new file mode 100644 index 0000000000..220022a9da --- /dev/null +++ b/ansible/roles/common/templates/kolla-toolbox.json.j2 @@ -0,0 +1,4 @@ +{ + "command": "sleep infinity", + "config_files": [] +} diff --git a/docker/kolla-toolbox/Dockerfile.j2 b/docker/kolla-toolbox/Dockerfile.j2 index 9a6ce95cd9..25b8bcce81 100644 --- a/docker/kolla-toolbox/Dockerfile.j2 +++ b/docker/kolla-toolbox/Dockerfile.j2 @@ -68,8 +68,6 @@ COPY ansible.cfg /home/ansible/.ansible.cfg COPY ansible_sudoers /etc/sudoers.d/ansible_sudoers RUN chmod 440 /etc/sudoers.d/ansible_sudoers -CMD ["/usr/local/bin/dumb-init", "/bin/sleep", "infinity"] - {% block kolla_toolbox_footer %}{% endblock %} {% block footer %}{% endblock %} {{ include_footer }}