openwhisk-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From vvras...@apache.org
Subject [incubator-openwhisk] branch master updated: Fix controller logs in docker-machine (#4079)
Date Tue, 06 Nov 2018 14:40:29 GMT
This is an automated email from the ASF dual-hosted git repository.

vvraskin pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-openwhisk.git


The following commit(s) were added to refs/heads/master by this push:
     new 708274c  Fix controller logs in docker-machine (#4079)
708274c is described below

commit 708274c9899afc915f42f500eebc328181e70194
Author: Himavanth <contacthima@yahoo.com>
AuthorDate: Tue Nov 6 20:10:22 2018 +0530

    Fix controller logs in docker-machine (#4079)
    
    * Fix controller logs in docker-machine
    
    With the change https://github.com/apache/incubator-openwhisk/pull/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
---
 ansible/roles/controller/tasks/deploy.yml | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/ansible/roles/controller/tasks/deploy.yml b/ansible/roles/controller/tasks/deploy.yml
index a4cc836..97ad776 100644
--- a/ansible/roles/controller/tasks/deploy.yml
+++ b/ansible/roles/controller/tasks/deploy.yml
@@ -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 }}"


Mime
View raw message