Project

General

Profile

Actions

Bug #6615

closed

ncf_rudder.py is not valid when using python 2.6

Added by Nicolas CHARLES over 7 years ago. Updated 4 months ago.

Status:
Released
Priority:
1
Category:
Generic methods
Target version:
Severity:
UX impact:
User visibility:
Effort required:
Priority:
0
Regression:

Description

When saving a technique, I get the following error

An Error occured! Could not write technique 'dsqfqsf' from path /var/rudder/configuration-repository/ncf, cause is: Error while running post-hook command [u'/var/rudder/configuration-repository/ncf/ncf-hooks.d/post.write_technique.rudderify.sh', u'/var/rudder/configuration-repository/ncf', u'dsqfqsf']
Details: INFO: Alternative source path added: /var/rudder/configuration-repository/ncf Error: Unable to create Rudder Technique files related to ncf Technique dsqfqsf (sub() got an unexpected keyword argument 'flags') Traceback (most recent call last): File "/usr/share/ncf/tools/ncf_rudder.py", line 46, in write_one_technique_for_rudder write_technique_for_rudder(destination_path, metadata) File "/usr/share/ncf/tools/ncf_rudder.py", line 125, in write_technique_for_rudder write_rudder_reporting_file(path,technique) File "/usr/share/ncf/tools/ncf_rudder.py", line 147, in write_rudder_reporting_file content = generate_rudder_reporting(technique) File "/usr/share/ncf/tools/ncf_rudder.py", line 302, in generate_rudder_reporting key_value_canonified = re.sub("[^\$\{\}\w](?![^{}]+})|\$(?!{)", "_", key_value, flags=re.UNICODE) TypeError: sub() got an unexpected keyword argument 'flags' 


Related issues 1 (0 open1 closed)

Related to Rudder - Bug #6531: Interface ncf builder can't read the created techniquesReleasedBenoît PECCATTEActions
Actions #1

Updated by Vincent MEMBRÉ over 7 years ago

  • Project changed from Rudder to 41
  • Category deleted (Web - Technique editor)
  • Target version changed from 2.11.12 to 0.x

Support for python 2.6 was not added on ncf_rudder.py

Actions #2

Updated by Vincent MEMBRÉ over 7 years ago

  • Status changed from New to In progress
Actions #3

Updated by Vincent MEMBRÉ over 7 years ago

  • Status changed from In progress to Pending technical review
  • Assignee changed from Vincent MEMBRÉ to Nicolas CHARLES
  • Pull Request set to https://github.com/Normation/ncf/pull/199
Actions #4

Updated by Nicolas CHARLES over 7 years ago

  • Status changed from Pending technical review to In progress
  • Assignee changed from Nicolas CHARLES to Vincent MEMBRÉ

this fix is not enough:

An Error occured! Could not write technique 'fdsgfdsgdsfg' from path /var/rudder/configuration-repository/ncf, cause is: Error while running post-hook command [u'/var/rudder/configuration-repository/ncf/ncf-hooks.d/post.write_technique.commit.sh', u'/var/rudder/configuration-repository/ncf', u'fdsgfdsgdsfg']
Details: 

and
An Error occured! Could not write technique 'fdsgfdsgdsfg' from path /var/rudder/configuration-repository/ncf, cause is: Error while running post-hook command [u'/var/rudder/configuration-repository/ncf/ncf-hooks.d/post.write_technique.rudderify.sh', u'/var/rudder/configuration-repository/ncf', u'fdsgfdsgdsfg']
Details: INFO: Alternative source path added: /var/rudder/configuration-repository/ncf 

each time, because there is othing to commit in one of the part of the technique

Actions #5

Updated by Vincent MEMBRÉ over 7 years ago

  • Project changed from 41 to Rudder
  • Subject changed from Cannot save technique with ncf builder to ncf post-hooks failes when there is nothing to commit
  • Category set to Web - Technique editor
  • Target version changed from 0.x to 2.11.11
Actions #6

Updated by Vincent MEMBRÉ over 7 years ago

  • Subject changed from ncf post-hooks failes when there is nothing to commit to ncf_rudder.py is not valid when using python 2.6
  • Status changed from In progress to Pending technical review
  • Assignee changed from Vincent MEMBRÉ to Benoît PECCATTE
Actions #7

Updated by Vincent MEMBRÉ over 7 years ago

  • Status changed from Pending technical review to Pending release
  • % Done changed from 0 to 100

Applied in changeset ncf:commit:08053c559962098bd4260974df44bf0d42684064.

Actions #8

Updated by Benoît PECCATTE over 7 years ago

Applied in changeset ncf:commit:9874af8b455da8eccae6fa266ea07cf4b1d2a06b.

Actions #10

Updated by Vincent MEMBRÉ over 7 years ago

  • Project changed from Rudder to 41
  • Category deleted (Web - Technique editor)
  • Target version changed from 2.11.11 to 0.x
Actions #11

Updated by Benoît PECCATTE over 7 years ago

  • Related to Bug #6531: Interface ncf builder can't read the created techniques added
Actions #12

Updated by Vincent MEMBRÉ about 6 years ago

  • Status changed from Pending release to Released
Actions #13

Updated by Alexis Mousset 4 months ago

  • Target version changed from 0.x to ncf-0.x
  • Priority set to 0
Actions #14

Updated by Alexis Mousset 4 months ago

  • Project changed from 41 to Rudder
  • Category set to Generic methods
Actions

Also available in: Atom PDF