Actions
Bug #10489
closedCannot save technique with ncf technique editor on Ubuntu16
Pull Request:
Severity:
Major - prevents use of part of Rudder | no simple workaround
UX impact:
User visibility:
Operational - other Techniques | Technique editor | Rudder settings
Effort required:
Priority:
36
Name check:
Fix check:
Regression:
Description
When clicking save on technique editor, it doesn't do anything on ubuntu 16.04, with rudder 4.1 (may exist on earlier version of rudder as well)
(note that there are even an error message displayed)
[Thu Mar 23 10:45:06.479878 2017] [wsgi:error] [pid 2524:tid 139647299086080] InsecureRequestWarning) [Thu Mar 23 10:45:07.770212 2017] [wsgi:error] [pid 2524:tid 139647265515264] /usr/share/ncf-api-virtualenv/lib/python2.7/site-packages/requests/packages/urllib3/connectionpool.py:852: InsecureRequestWarning: Unverified HTTPS request is being made. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/latest/advanced-usage.html#ssl-warnings [Thu Mar 23 10:45:07.770236 2017] [wsgi:error] [pid 2524:tid 139647265515264] InsecureRequestWarning) [Thu Mar 23 10:45:07.844008 2017] [wsgi:error] [pid 2524:tid 139647265515264] ERROR: Could not write technique 'test' from path /var/rudder/configuration-repository/ncf, cause is: Error while running post-hook command /var/rudder/configuration-repository/ncf/ncf-hooks.d/post.write_technique.rudderify.sh /var/rudder/configuration-repository/ncf test [Thu Mar 23 10:45:07.844030 2017] [wsgi:error] [pid 2524:tid 139647265515264] INFO: Alternative source path added: /var/rudder/configuration-repository/ncf [Thu Mar 23 10:45:07.844033 2017] [wsgi:error] [pid 2524:tid 139647265515264] Error: Unable to create Rudder Technique files related to ncf Technique test ([Errno 13] Permission denied: '/var/rudder/configuration-repository/techniques/ncf_techniques/test') [Thu Mar 23 10:45:07.844035 2017] [wsgi:error] [pid 2524:tid 139647265515264] Traceback (most recent call last): [Thu Mar 23 10:45:07.844036 2017] [wsgi:error] [pid 2524:tid 139647265515264] File "/usr/share/ncf/tools/ncf_rudder.py", line 47, in write_one_technique_for_rudder [Thu Mar 23 10:45:07.844038 2017] [wsgi:error] [pid 2524:tid 139647265515264] write_technique_for_rudder(destination_path, metadata) [Thu Mar 23 10:45:07.844039 2017] [wsgi:error] [pid 2524:tid 139647265515264] File "/usr/share/ncf/tools/ncf_rudder.py", line 129, in write_technique_for_rudder [Thu Mar 23 10:45:07.844041 2017] [wsgi:error] [pid 2524:tid 139647265515264] os.makedirs(path) [Thu Mar 23 10:45:07.844042 2017] [wsgi:error] [pid 2524:tid 139647265515264] File "/usr/lib/python2.7/os.py", line 150, in makedirs [Thu Mar 23 10:45:07.844044 2017] [wsgi:error] [pid 2524:tid 139647265515264] makedirs(head, mode) [Thu Mar 23 10:45:07.844045 2017] [wsgi:error] [pid 2524:tid 139647265515264] File "/usr/lib/python2.7/os.py", line 157, in makedirs [Thu Mar 23 10:45:07.844053 2017] [wsgi:error] [pid 2524:tid 139647265515264] mkdir(name, mode) [Thu Mar 23 10:45:07.844055 2017] [wsgi:error] [pid 2524:tid 139647265515264] OSError: [Errno 13] Permission denied: '/var/rudder/configuration-repository/techniques/ncf_techniques/test'
# ls -al /var/rudder/configuration-repository/techniques/ncf_techniques total 12 drwxr-sr-x 2 root rudder 4096 Mar 23 09:20 . drwxrwsr-x 9 root rudder 4096 Mar 23 09:20 .. -rw-r--r-- 1 root rudder 128 Mar 23 09:20 category.xml
Updated by Vincent MEMBRÉ almost 8 years ago
perms seems ok, but maybe ncf-user is not in rudder group ?
Updated by Nicolas CHARLES almost 8 years ago
www-data:x:33: ncf-api-venv:x:998: rudder:x:997:ncf-api-venv
ncf-api-venv:x:998:998:ncf API,,,:/var/lib/ncf-api-venv:/bin/false rudder:x:997:997:Rudder,,,:/var/rudder:/bin/false
root 20581 0.0 0.4 109640 10336 ? Ss 09:13 0:00 /usr/sbin/apache2 -k start ncf-api+ 2524 0.0 1.0 384764 26720 ? Sl 09:35 0:00 \_ /usr/sbin/apache2 -k start rudder 2525 0.0 0.3 234796 8992 ? Sl 09:35 0:00 \_ /usr/sbin/apache2 -k start www-data 2526 0.0 0.7 866024 19144 ? Sl 09:35 0:01 \_ /usr/sbin/apache2 -k start www-data 2527 0.0 0.7 866320 18332 ? Sl 09:35 0:01 \_ /usr/sbin/apache2 -k start
Updated by Nicolas CHARLES almost 8 years ago
group cannot write in forlder ncf_technique
drwxr-sr-x 2 root rudder 4096 Mar 23 11:02 ncf_techniques
Updated by Nicolas CHARLES almost 8 years ago
it may or may not be related, but on Centos7 I get
Traceback (most recent call last): File "/usr/share/ncf/tools/ncf_rudder.py", line 379, in write_one_technique_for_rudder(sys.argv[2],sys.argv[3]) File "/usr/share/ncf/tools/ncf_rudder.py", line 42, in write_one_technique_for_rudder write_category_xml(destination_path) File "/usr/share/ncf/tools/ncf_rudder.py", line 111, in write_category_xml os.makedirs(path) File "/usr/lib64/python2.7/os.py", line 157, in makedirs mkdir(name, mode) OSError: [Errno 13] Permission denied: '/var/rudder/configuration-repository/techniques/ncf_techniques'
folder /var/rudder/configuration-repository/techniques/ncf_techniques does not exist
Updated by Nicolas CHARLES over 7 years ago
On Ubuntu, we do have package ncf-api-virtualenv set up before rudder-webapp
rudder-webapp runs
chmod -R u+rwX,g+rwX /var/rudder/configuration-repository/techniques
so permission for parent folder are ok
but when we create a technique, folder ncf_techniques has invalid perms
drwxr-sr-x 2 root rudder 4096 Mar 24 09:28 ncf_techniques
Updated by Nicolas CHARLES over 7 years ago
restarting apache2 or rebooting the serveur solves the issue
Updated by Nicolas CHARLES over 7 years ago
- Status changed from New to Rejected
This was fixed as a side effect of #10514
Updated by Nicolas CHARLES over 7 years ago
- Related to Bug #10514: Rudder 4.1 fails to install Ubuntu/Debian because of rudder-slapd service restart added
Actions