Project

General

Profile

Actions

Bug #17523

closed

error when a technique with a directive attached change in 6.1 blocks all technique updates

Added by Nicolas CHARLES almost 4 years ago. Updated almost 4 years ago.

Status:
Released
Priority:
N/A
Category:
Web - Config management
Target version:
Severity:
UX impact:
User visibility:
Effort required:
Priority:
0
Name check:
To do
Fix check:
To do
Regression:

Description

If I change a technique (like motd), commit it, touch flag file /opt/rudder/etc/force_technique_reload and restart, I have the error

[2020-05-26 21:27:06] INFO  com.normation.cfclerk.services.impl.TechniqueRepositoryImpl - Reloading technique library, found modified technique(s): ['motdConfiguration': updated (3.3: VersionUpdated)]
[2020-05-26 21:27:06] DEBUG com.normation.rudder.services.policies.TechniqueAcceptationUpdater - Update acceptation datetime for: motdConfiguration
[2020-05-26 21:27:07] DEBUG git-policy-archive - Archived technique library template: /var/rudder/configuration-repository/directives/systemSettings/systemManagement/motdConfiguration/activeTechniqueSettings.xml
[2020-05-26 21:27:07] INFO  bootstrap.liftweb.Boot - classpath
[2020-05-26 21:27:07] DEBUG org.reflections.Reflections - going to scan these urls:
jar:file:/opt/rudder/share/plugins/scale-out-relay/scale-out-relay.jar!/
[2020-05-26 21:27:07] INFO  org.reflections.Reflections - Reflections took 46 ms to scan 1 urls, producing 2 keys and 2 values 
[2020-05-26 21:27:07] DEBUG com.normation.rudder.web.services.Section2FieldService - Is it a new directive ? false
[2020-05-26 21:27:07] INFO  application.plugin - Initializing plugin 'rudder-plugin-scale-out-relay': 6.1-1.4.0-SNAPSHOT
[2020-05-26 21:27:07] INFO  scale-out-relay - Checking for plugin status: enabled
[2020-05-26 21:27:07] DEBUG com.normation.rudder.web.services.SaveDirectivesOnTechniqueCallback - Technique motdConfiguration changed => saving directive 'MOTD and pre-login banner' [6e1ae8f7-179a-47d7-9307-4eee5796f4e2]
[2020-05-26 21:27:07] INFO  com.normation.rudder.services.policies.DeployOnTechniqueCallback - Reload Technique library at start up
[2020-05-26 21:27:07] DEBUG com.normation.rudder.services.policies.DeployOnTechniqueCallback - Ask for a policy update since technique library was reloaded (git revision tree: ce63ea5053dfee2f93804caa61571630c8b7b6bd
[2020-05-26 21:27:07] ERROR bootchecks - Flag file '/opt/rudder/etc/force_technique_reload' but Techniques library reload failed, cause is: An error occured while updating <- Error when saving Active Technique af3745b9-b4f0-4140-a9bc-18c801a3a6a8 for technque motdConfiguration <- Inconsistency: Can not find directive with id '6e1ae8f7-179a-47d7-9307-4eee5796f4e2' in repository but it is viewed as a child of 'af3745b9-b4f0-4140-a9bc-18c801a3a6a8'. This is likely a bug, please report it.


Related issues 2 (0 open2 closed)

Related to Rudder - Bug #17313: Upgrading Rudder from 5.0.18 to 6.1-nightly does not update techniquesReleasedNicolas CHARLESActions
Related to Rudder - Bug #17532: when upgrading to 6.1, ldap indexing should be normal and not quickReleasedAlexis MoussetActions
Actions #1

Updated by Nicolas CHARLES almost 4 years ago

  • Description updated (diff)
Actions #2

Updated by François ARMAND almost 4 years ago

  • Related to Bug #17313: Upgrading Rudder from 5.0.18 to 6.1-nightly does not update techniques added
Actions #3

Updated by François ARMAND almost 4 years ago

It is likely that that error also make all other changes which should happen after it not be done.
We should at least change TechniqueAcceptationUpdater line 226 to use an techniqueMods.accumulate in place of the ZIO.foreach

Actions #4

Updated by François ARMAND almost 4 years ago

  • Status changed from New to In progress
  • Assignee set to François ARMAND
Actions #5

Updated by Nicolas CHARLES almost 4 years ago

digging deeper in the issue, def getDirectiveEntry doesn't find the technique

 println(s"searching in ${rudderDit.ACTIVE_TECHNIQUES_LIB.dn} for ${A_DIRECTIVE_UUID} eq ${id.value}")
    //searching in techniqueCategoryId=Active Techniques,ou=Rudder,cn=rudder-configuration for directiveId eq 6e1ae8f7-179a-47d7-9307-4eee5796f4e2
    con.searchSub(rudderDit.ACTIVE_TECHNIQUES_LIB.dn,  EQ(A_DIRECTIVE_UUID, id.value), attributes:_*).flatMap { piEntries =>

returns an empty piEntries

LDAP entry is there though

dn: directiveId=6e1ae8f7-179a-47d7-9307-4eee5796f4e2,activeTechniqueId=af374
 5b9-b4f0-4140-a9bc-18c801a3a6a8,techniqueCategoryId=systemManagement,techni
 queCategoryId=systemSettings,techniqueCategoryId=Active Techniques,ou=Rudde
 r,cn=rudder-configuration
directiveId: 6e1ae8f7-179a-47d7-9307-4eee5796f4e2
techniqueVersion: 3.3
objectClass: directive
objectClass: top
directiveVariable: MOTD_EMPTY[0]:false
directiveVariable: MOTD[0]:dfqsdfsdq
directiveVariable: MOTD_BANNER[0]:false
directiveVariable: MOTD_LOCATION[0]:after
cn: MOTD and pre-login banner
directivePriority: 5
isEnabled: TRUE
isSystem: FALSE
serializedTags: []
structuralObjectClass: directive
entryUUID: e6483c36-33b9-103a-9bee-f14915de6907
creatorsName: cn=manager,cn=rudder-configuration
createTimestamp: 20200526163004Z
entryCSN: 20200526163004.967791Z#000000#000#000000
modifiersName: cn=manager,cn=rudder-configuration
modifyTimestamp: 20200526163004Z

Actions #6

Updated by Nicolas CHARLES almost 4 years ago

slapdindex -q doesn't solve the issue
slapdindex does though

it's an indexation issue

Actions #7

Updated by François ARMAND almost 4 years ago

  • Related to Bug #17532: when upgrading to 6.1, ldap indexing should be normal and not quick added
Actions #8

Updated by François ARMAND almost 4 years ago

  • Subject changed from error when a technique with a directive attached change in 6.1 to error when a technique with a directive attached change in 6.1 blocks all technique updates

The LDAP problem is dealt with in #17532. This one will only allows to update as many technique as possible in case of error on some.

Actions #9

Updated by François ARMAND almost 4 years ago

  • Status changed from In progress to Pending technical review
  • Assignee changed from François ARMAND to Nicolas CHARLES
  • Pull Request set to https://github.com/Normation/rudder/pull/3017
Actions #10

Updated by François ARMAND almost 4 years ago

  • Status changed from Pending technical review to Pending release
Actions #11

Updated by Vincent MEMBRÉ almost 4 years ago

  • Status changed from Pending release to Released

This bug has been fixed in Rudder 6.1.0~rc1 which was released today.

Actions

Also available in: Atom PDF