Bug #6531
closedInterface ncf builder can't read the created techniques
Description
On a RedHat 6.5, with an install that didn't work well but should have been repaired (user ncf-api-venv was created before installing the packages, but the home was not present, so some part of install were not done), we can save a technique once we restore the permission on /var/rudder/configuration-repository/techniques/ncf and 50_techniques, but we cannot read them
There is no error messages, and nothing to give a cue on what doesn't go as planed
There are JS error about null objects, so .size doesn't return anything, but I couldn't get all the error message.
Updated by Vincent MEMBRÉ over 9 years ago
I'm affraid i can't repoduce this, writing techniques works in latest version (2.11.10, 3.0.4), I will try again and again but i can't repoduce it!
Updated by Nicolas CHARLES over 9 years ago
ok, to reproduce it, i did:
create a virtual machine, and edited the /etc/passwd and /etc/group to add the line
ncf-api-venv:x:999:999:ncf API,,,:/var/lib/ncf-api-venv:/bin/sh
and
ncf-api-venv:x:999:
installed rudder 2.11
when to the ncf tehcnique editor, it failed
i thus executed
mkdir /var/lib/ncf-api-venv mkdir /var/lib/ncf-api-venv/.cfagent chown -R ncf-api-venv:ncf-api-venv //var/lib/ncf-api-venv
I could access the interface, but upon saving I got:
An Error occured! Unknown internal error during technique writing Details: Cause: sub() got an unexpected keyword argument 'flags' Traceback (most recent call last): File "/usr/share/ncf/api/ncf_api_flask_app/views.py", line 136, in create_technique ncf.write_technique(technique,path) File "/usr/share/ncf/tools/ncf.py", line 519, in write_technique content = generate_technique_content(technique_metadata) File "/usr/share/ncf/tools/ncf.py", line 427, in generate_technique_content args = ['"%s"'%re.sub(r'(?<!\\)"', r'\\"', arg, flags=re.UNICODE) for arg in method_call['args'] ] TypeError: sub() got an unexpected keyword argument 'flags'
which is not quite the error I had before, but much similar still
Updated by Vincent MEMBRÉ over 9 years ago
Do you have python 2.6 on your machine ? this is an error of compatibility in 2.6 (flags argument does not exists for re.sub in 2.6 )
This explains a compatibilty fix: https://code.google.com/p/pyfpdf/issues/detail?id=42
Updated by Nicolas CHARLES over 9 years ago
- Status changed from New to Pending technical review
- Assignee changed from Vincent MEMBRÉ to Benoît PECCATTE
- Pull Request set to https://github.com/Normation/ncf/pull/198
Updated by Nicolas CHARLES over 9 years ago
- Status changed from Pending technical review to Pending release
- % Done changed from 0 to 100
Applied in changeset 37c0772df86009424047b655dfaa7ea65c90129a.
Updated by Benoît PECCATTE over 9 years ago
Applied in changeset 4d0d5247b36bccc97f98f70492557bc27816a24c.
Updated by Benoît PECCATTE over 9 years ago
- Related to Bug #6615: ncf_rudder.py is not valid when using python 2.6 added
Updated by Vincent MEMBRÉ over 8 years ago
- Status changed from Pending release to Released
Updated by Alexis Mousset over 2 years ago
- Target version changed from 0.x to ncf-0.x
- Priority set to 0
Updated by Alexis Mousset over 2 years ago
- Project changed from 41 to Rudder
- Category set to Generic methods