Project

General

Profile

Actions

Bug #28764

closed

Policy generation could fail with runtime reflection error

Bug #28764: Policy generation could fail with runtime reflection error

Added by Clark ANDRIANASOLO 7 months ago. Updated 7 months ago.

Status:
Released
Priority:
N/A
Category:
Web - Maintenance
Target version:
Severity:
UX impact:
User visibility:
Effort required:
Very Small
Priority:
0
Name check:
To do
Fix check:
Checked
Regression:
No

Description

For a logging operation, we are using lift-json which does some Java runtime reflection, but it could fail :

  • in 9.0 with a runtime MatchError by lift-json
    ERROR policy.generation - Error while computing Node Configuration for nodes: ; cause was: scala.MatchError: (ComponentId(B93EEC04-0AC2-4A6B-850A-A1A45FF665BF,List(Technique parameters, SECTIONS),None),B93EEC04-0AC2-4A6B-850A-A1A45FF665BF: [http://repository.ru...]) (of class scala.Tuple2) 
     -> com.normation.rudder.services.policies.MergePolicyService$.$anonfun$5(MergePolicyService.scala:264)
     -> com.normation.rudder.services.policies.MergePolicyService$.buildPolicy(MergePolicyService.scala:248)
    
  • in 9.1, likely because we have migrated some JSON field to an Instant in #28272 : java.lang.reflec.InaccessibleObjectException: Unable to make field private final int java.time.Instant.nanos accessible: module java.base does not "opens java.time" to unnamed module 2a2843ec

Workaround may be to regenerate policies, anyway it appears related to something really old (Rudder 4.X).
We may just remove lift-json from the error logs


Related issues 1 (0 open — 1 closed)

Related to Rudder - Architecture #28760: Migrate MergePolicyService to zio-jsonRejectedClark ANDRIANASOLOActions

Updated by Clark ANDRIANASOLO 7 months ago Actions #1

  • Status changed from New to In progress

Updated by Clark ANDRIANASOLO 7 months ago Actions #2

  • Status changed from In progress to Pending technical review
  • Assignee changed from Clark ANDRIANASOLO to François ARMAND
  • Pull Request set to https://github.com/Normation/rudder/pull/7089

Updated by Clark ANDRIANASOLO 7 months ago Actions #3

  • Description updated (diff)
  • Status changed from Pending technical review to New
  • Assignee changed from François ARMAND to Clark ANDRIANASOLO
  • Pull Request deleted (https://github.com/Normation/rudder/pull/7089)

Updated by Clark ANDRIANASOLO 7 months ago Actions #4

  • Status changed from New to Pending technical review
  • Assignee changed from Clark ANDRIANASOLO to François ARMAND
  • Pull Request set to https://github.com/Normation/rudder/pull/7089

Updated by Clark ANDRIANASOLO 7 months ago Actions #5

  • Description updated (diff)

Updated by Clark ANDRIANASOLO 7 months ago Actions #6

Updated by Clark ANDRIANASOLO 7 months ago Actions #7

  • Status changed from Pending technical review to Pending release

Updated by Clark ANDRIANASOLO 7 months ago Actions #8

  • Fix check changed from To do to Checked

Updated by Vincent MEMBRÉ 7 months ago Actions #9

  • Status changed from Pending release to Released

This bug has been fixed in Rudder 9.0.6 and 9.1.1 which were released today.

Actions

Also available in: PDF Atom