Project

General

Profile

Actions

Bug #2817

closed

On Rudder 2.4.0~beta3 server, distributePolicy promises are not generated if modification on <SECTIONS> tag are applied in metadata.xml

Added by Nicolas PERRON over 12 years ago. Updated almost 10 years ago.

Status:
Rejected
Priority:
1 (highest)
Category:
Web - Config management
Target version:
Severity:
UX impact:
User visibility:
Effort required:
Priority:
Name check:
Fix check:
Regression:

Description

On a Rudder 2.4.0~beta3 server, if I add a new component section in distributePolicy/1.0/metadata.xml Rudder will not be able to generate distributePolicy promises.

Actions #1

Updated by Nicolas PERRON over 12 years ago

Normal var/rudder/configuration-repository/techniques/system/distributePolicy/1.0/metadata.xml file:

[...]
  <SECTIONS>
    <SECTION name="distribute">
    </SECTION>
  </SECTIONS>
</TECHNIQUE>

# ls -lh /var/rudder/cfengine-community/inputs
total 44K
drwx------ 2 root root 4,0K août 16 17:40 clientlist
drwx------ 3 root root 4,0K août 16 17:40 common
drwx------ 5 root root 4,0K août 16 17:40 distributePolicy
-rw------- 1 root root 3,6K août 16 17:40 failsafe.cf
drwx------ 3 root root 4,0K août 16 17:40 inventory
drwx------ 3 root root 4,0K août 16 17:40 motdConfiguration
-rw------- 1 root root  19K août 16 17:40 promises.cf
rudder=# SELECT * FROM expectedreports WHERE ruleid='root-DP' AND nodejoinkey >= 196;
 pkid | nodejoinkey | ruleid  | serial |      directiveid      |    component     | cardinality | componentsvalues |         begindate          | enddate 
------+-------------+---------+--------+-----------------------+------------------+-------------+------------------+----------------------------+---------
  331 |         196 | root-DP |     13 | root-distributePolicy | distributePolicy |           0 | []               | 2012-08-16 17:48:50.648+02 | 
(1 ligne)

New component added in var/rudder/configuration-repository/techniques/system/distributePolicy/1.0/metadata.xml file:

[...]
  <SECTIONS>
    <SECTION name="distribute">
    <SECTION name="DP-initCheck" component="true">
    </SECTION>
  </SECTIONS>
</TECHNIQUE>

After a commit and reload Technique Library AND a clear cache:

# ls -lh /var/rudder/cfengine-community/inputs
total 36K
drwxr-x--- 3 root root 4,0K août 16 17:55 common
-rw-r----- 1 root root 3,6K août 16 17:55 failsafe.cf
drwxr-x--- 3 root root 4,0K août 16 17:55 inventory
drwxr-x--- 3 root root 4,0K août 16 17:55 motdConfiguration
-rw-r----- 1 root root  19K août 16 17:55 promises.cf
rudder=# SELECT * FROM expectedreports WHERE ruleid='root-DP' AND nodejoinkey >= 196;
 pkid | nodejoinkey | ruleid  | serial |      directiveid      |    component     | cardinality | componentsvalues |         begindate          | enddate 
------+-------------+---------+--------+-----------------------+------------------+-------------+------------------+----------------------------+---------
  331 |         196 | root-DP |     13 | root-distributePolicy | distributePolicy |           0 | []               | 2012-08-16 17:48:50.648+02 | 
(1 ligne)

To return to a normal state, just remove the added component, commit and reload Technique Library.

Actions #2

Updated by Nicolas PERRON over 12 years ago

This is a blocking bug for #2755

Could the Webapp have a condition to generate distributePolicy only if there is one and only one section defined ?

Actions #3

Updated by Nicolas PERRON over 12 years ago

If the only one section is modified, it will be take into account:

  <SECTIONS>
    <SECTION name="DP-initCheck" component="true">
    </SECTION>
  </SECTIONS>

After a commit and a reload of Technique Library:

# ls -lh /var/rudder/cfengine-community/inputs
total 44K
drwxr-x--- 2 root root 4,0K août 16 18:13 clientlist
drwxr-x--- 3 root root 4,0K août 16 18:13 common
drwxr-x--- 5 root root 4,0K août 16 18:13 distributePolicy
-rw-r----- 1 root root 3,6K août 16 18:13 failsafe.cf
drwxr-x--- 3 root root 4,0K août 16 18:13 inventory
drwxr-x--- 3 root root 4,0K août 16 18:13 motdConfiguration
-rw-r----- 1 root root  19K août 16 18:13 promises.cf

rudder=# SELECT * FROM expectedreports WHERE ruleid='root-DP' AND nodejoinkey >= 196;
 pkid | nodejoinkey | ruleid  | serial |      directiveid      |    component     | cardinality | componentsvalues |         begindate          |          enddate           
------+-------------+---------+--------+-----------------------+------------------+-------------+------------------+----------------------------+----------------------------
  331 |         196 | root-DP |     13 | root-distributePolicy | distributePolicy |           0 | []               | 2012-08-16 17:48:50.648+02 | 2012-08-16 18:13:12.838+02
  382 |         227 | root-DP |     14 | root-distributePolicy | DP-initCheck     |           1 | ["None"]         | 2012-08-16 18:13:12.86+02  | 
(2 lignes)
Actions #4

Updated by François ARMAND over 12 years ago

I can't reproduce that bug when I use a correctly formed metadata.xml file: the one given in example is not well-formed (the added <SECTION> is not closed), and it logged an error saying so.

Please, could you add more information ?

Actions #5

Updated by François ARMAND over 12 years ago

  • Status changed from New to Discussion
Actions #6

Updated by Nicolas PERRON over 12 years ago

  • Status changed from Discussion to New

You were right, the XML was not correctly formed. I didn't see any log about it but was existent:

[2012-08-16 17:59:43] ERROR com.normation.cfclerk.services.impl.GitTechniqueReader - Ignoring technique '/system/distributePolicy/1.0/metadata.xml' because the descriptor file is malformed
com.normation.cfclerk.exceptions.ParsingException: Unexpected issue with the descriptor file /system/distributePolicy/1.0/metadata.xml: The end-tag for element type "SECTION" must end with a '>' delimiter.

We can consider this bug as rejected.

Actions #7

Updated by Nicolas PERRON over 12 years ago

  • Status changed from New to Rejected
Actions #8

Updated by Benoît PECCATTE almost 10 years ago

  • Category changed from 14 to Web - Config management
Actions

Also available in: Atom PDF