Skip to content

Commit

Permalink
Fix controller logs in docker-machine (apache#4079)
Browse files Browse the repository at this point in the history
* Fix controller logs in docker-machine

With the change apache#3579, controller logs file was not being created due to lack of permissions when OW is deployed on docker-machine. This is because ansible is not able to create a folder with full permissions within a mounted folder in docker-machine. However creating a file with full permissions through ansible does work.

* Adding condition to check for docker-machine

This change is needed only for docker-machine
  • Loading branch information
Himavanth authored and vvraskin committed Nov 6, 2018
1 parent ab11dc0 commit cc07120
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions ansible/roles/controller/tasks/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,15 @@
mode: 0777
become: "{{ logs.dir.become }}"

# We need to create the file with proper permissions because the dir creation above
# does not result in a dir with full permissions in docker machine especially with macos mounts
- name: ensure controller log file is created with permissions
file:
path: "{{ whisk_logs_dir }}/{{ controller_name }}/{{ controller_name }}_logs.log"
state: touch
mode: 0777
when: environment_type is defined and environment_type == "docker-machine"

- name: ensure controller config directory is created with permissions
file:
path: "{{ controller.confdir }}/{{ controller_name }}"
Expand Down

0 comments on commit cc07120

Please sign in to comment.