vvraskin commented on issue #3853: Set erlang magic cookie for couchdb
URL: 
https://github.com/apache/incubator-openwhisk/pull/3853#issuecomment-406653353
 
 
   I've just tested it on macOS, unfortunately it breaks up on the step when 
the cookie is generated. 
   
   ```
   TASK [couchdb : create the erlang cookie file on remote] 
*******************************************************************
   Friday 20 July 2018  18:20:28 +0200 (0:00:00.451)       0:00:03.203 
***********
   fatal: [172.17.0.1]: FAILED! => {"changed": true, "cmd": ["docker", "run", 
"--rm", "-v", "/tmp:/tmp", "-u", "couchdb", "apache/couchdb:2.1", "sh", "-c", 
"echo rBA/m2eUwv7FML/UhasE2KdPoUkr6iahNx7x6UQt+6c= >> /tmp/erlang.cookie"], 
"delta": "0:00:01.200721", "end": "2018-07-20 18:20:30.445213", "msg": 
"non-zero return code", "rc": 2, "start": "2018-07-20 18:20:29.244492", 
"stderr": "sh: 1: cannot create /tmp/erlang.cookie: Permission denied", 
"stderr_lines": ["sh: 1: cannot create /tmp/erlang.cookie: Permission denied"], 
"stdout": "", "stdout_lines": []}
   ```
   
   I think that the problem relates to the fact that `/tmp` is owned by root on 
macOS and the way how it is mounted in docker (not sure how it is exactly done 
there). I've tried to escalate the permissions with `become:true` for that 
task, but it failed as well prompting for sudo password. 
   
   Is there a way to generate the cookie as a local action and then change the 
owner to couchdb?
   
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to