Project

General

Profile

Actions

Bug #2853

closed

Upgrading techniques from Rudder 2.3 to Rudder 2.4.0~beta3 could result in error about duplicate techniqueID for filePermissions.st

Added by Nicolas PERRON over 11 years ago. Updated about 9 years ago.

Status:
Released
Priority:
1
Assignee:
Nicolas PERRON
Category:
Packaging
Target version:
Severity:
UX impact:
User visibility:
Effort required:
Priority:
Name check:
Fix check:
Regression:

Description

Indeed the technique filePermissions was initially located in fileConfiguration/security/filePermissions/ and was after moved to fileConfiguration/fileSecurity/filePermissions/ which result in error.

Actions #1

Updated by Nicolas PERRON over 11 years ago

Even if the folder fileConfiguration/security/filesPermissions/ is removed from git, Rudder continue to complain about a duplicate techniqueId.

In the Webapp: Configuration Management => Techniques the folder "Security configuration" is duplicated in the Reference Technique Library

Actions #2

Updated by Nicolas PERRON over 11 years ago

The error message is:

ERROR com.normation.cfclerk.services.imp.GitTechniqueReader - Ignoring package for policy with ID TechniqueId and not directory /fileCOnfiguration/securiy/filesPermissions/1.°0 because an other policy is already defined with that id and root path /fileConfiguration/fileSecurity

Actions #3

Updated by Nicolas PERRON over 11 years ago

It seems that the situation is unlocked if:
  • the old fileConfiguration/security/filePermissions/ is removed with git 'git rm fileConfiguration/security/filePermissions/ && git commit'
  • the techniqueLibraryVersion attribute is removed from LDAP
    dn: techniqueCategoryId=Active Techniques,ou=Rudder,cn=rudder-configuration
    changetype: modify
    delete: techniqueLibraryVersion
    
    
  • jetty restarted
Actions #4

Updated by Jonathan CLARKE over 11 years ago

  • Status changed from New to 2
  • Assignee set to Nicolas PERRON
  • Priority changed from 1 to 2
  • Target version changed from 2.4.0~beta5 to 2.4.0~rc1

This needs to be added into a migration script.

Actions #5

Updated by Jonathan CLARKE over 11 years ago

  • Priority changed from 2 to 1

This bug may already be present in 2.3 (upgrading from 2.3.x to 2.3.y). We should check, and fix the bug in 2.3 if that is the case (but the migration code will have to be in 2.4 also).

Actions #6

Updated by Jonathan CLARKE over 11 years ago

  • Category changed from Techniques to 11
Actions #7

Updated by Nicolas PERRON over 11 years ago

  • Status changed from 2 to In progress

I'm on it. I will test with our oldest releases of Rudder 2.3

Actions #8

Updated by Nicolas PERRON over 11 years ago

I can confirm this bug is present if we update Rudder 2.3.0 to 2.3.8 but this issue is still silent. The error doesn't prevent Rudder Webapp to be started and the only error message is in the /var/log/rudder/webapp/XXXX.log file.

Actions #9

Updated by Nicolas PERRON over 11 years ago

  • Target version changed from 2.4.0~rc1 to 2.3.9
Actions #10

Updated by Nicolas PERRON over 11 years ago

  • % Done changed from 0 to 90

I'm not sure about the fix, because of the test which determine if the migration should made or not. Besides, I wonder if on the 2.4 branch this code have to be moved in ruder-upgrade script or kept in rudder-webapp postinst.

Actions #11

Updated by Jonathan CLARKE over 11 years ago

Nicolas PERRON wrote:

I'm not sure about the fix, because of the test which determine if the migration should made or not. Besides, I wonder if on the 2.4 branch this code have to be moved in ruder-upgrade script or kept in rudder-webapp postinst.

Doesn't look too bad, just a few weird things:
  • You check if the directory fileConfiguration/security/filesPermissions/ exists, but then you mv fileConfiguration/security/. This is weird, and also will end up with the wrong result (an extra directory called security in the destination (fileConfiguration/fileSecurity/security/filesPermissions/ instead of fileConfiguration/fileSecurity/filesPermissions/).
  • Tempalte is misspelt --> Template
Actions #12

Updated by Nicolas PERRON over 11 years ago

The last commit "965151f7174a7480a919ddb9e115d140e5a0bf54" isn't complete since it doesn't handle this situation:
  • There is one or several folders not commited in fileConfiguration/secure/
Actions #13

Updated by Nicolas PERRON over 11 years ago

  • Status changed from In progress to Pending technical review
  • % Done changed from 90 to 100

Applied in changeset commit:ad299f0ff42e0a12fe344f29a796885534ce88ce.

Actions #14

Updated by Jonathan CLARKE over 11 years ago

  • Status changed from Pending technical review to Released

OK, looks better now, much simpler. Thanks Nicolas!

Actions #15

Updated by Nicolas PERRON about 11 years ago

  • Project changed from Rudder to 34
  • Category deleted (11)
Actions #16

Updated by Benoît PECCATTE about 9 years ago

  • Project changed from 34 to Rudder
  • Category set to Packaging
Actions

Also available in: Atom PDF