Bug #3523
closedNo valid UUID was generated for a node, breaking several things
Description
Deployment process was stopped due to an error:
=> Deployment error for process '109' at 2013/04/24 16:26:57
=> Exception caught during deployment process: PreparedStatementCallback; SQL [insert into expectedreportsnodes ( nodejoinkey, nodeid) values (?,?)]; ERROR: value too long for type character varying(50); nested exception is org.postgresql.util.PSQLException: ERROR: value too long for type character varying(50)
Files
Updated by Matthieu CERDA over 11 years ago
- Project changed from Rudder to 34
- Status changed from New to 8
- Assignee set to Matthieu CERDA
- Priority changed from N/A to 1 (highest)
- Target version set to 2.5.3
OK, after investigation (on IRC) it seems that because of a failed post install script run during rudder-agent installation, the /opt/rudder/etc/uuid.hive file contained a placeholder text instead of a good uuid, which has been accepted by Rudder.
Enclosed to this ticket is a script which extracts all the node names in the Rudder LDAP tree, so we can remove the offending one.
The offending node looks like this (LDIF extract):
# \23 The content of this file should be replaced with a valid U, Nodes, Acce pted Inventories, Inventories, rudder-configuration dn: nodeId=\23 The content of this file should be replaced with a valid U,ou=N odes,ou=Accepted Inventories,ou=Inventories,cn=rudder-configuration nodeId: # The content of this file should be replaced with a valid U
I'm creating a script to fix this, but we will have to find why this happened.
It seems at the first glance that it is due to a multiarch glitch in RHEL 6.
Updated by Matthieu CERDA over 11 years ago
- File node-correct.sh node-correct.sh added
- File node-extract.sh node-extract.sh added
- Status changed from 8 to In progress
- % Done changed from 0 to 50
- One to extract all the nodes in Rudder
- One to correct this problem
The script to correct the problem should be run as root on the broken Rudder server, and then the user should click on "Clear Caches" in the Administration -> Policy Server tab.
Updated by François ARMAND over 11 years ago
OK, so there is two bugs here:
- we should not accept node with ID longer than 50 chars
- a "#" in a node id cause the javascript responsible to display node details to fails (and so we can't delete it anymore).
So, I propose to normalize accepted node ID to [a-zA-Z0-9\-]{1,50}, what will resolve the two problems.
(we can't simply check for a valid UUID, because some special nodes have special ids, like "root". And I'm not sur we want to forbid arbitrary names for node IDs)
Updated by François ARMAND over 11 years ago
For preventeng nodes with by ID to be accepted again, we added some guards with #3529
Updated by Matthieu CERDA over 11 years ago
I'm bumping the UUID creation at the top of the rudder-init script to prevent a broken UUID from beeing used even if cf-agent fails.
Updated by Matthieu CERDA over 11 years ago
- Status changed from In progress to Pending technical review
- % Done changed from 50 to 100
- Pull Request set to https://github.com/Normation/rudder-packages/pull/51
PR available
Updated by Jonathan CLARKE over 11 years ago
It looks like the original reason for this happening may well be dependency problems on the rudder-agent RPM used by Dennis, see #3546.
Updated by Matthieu CERDA over 11 years ago
- Status changed from Pending technical review to Pending release
Applied in changeset commit:c644c188dbedcab1404eee1b36464bba30d24b68.
Updated by Jonathan CLARKE over 11 years ago
Applied in changeset commit:5e34a4d5cc02ef4cfdac04b54dce2ff3047fd8b4.
Updated by Jonathan CLARKE over 11 years ago
- Subject changed from PSQLException: ERROR: value too long for type character varying(50) to No valid UUID was generated for a node, breaking several things
Updated by Nicolas PERRON over 11 years ago
- Status changed from Pending release to Released
Updated by Benoît PECCATTE over 9 years ago
- Project changed from 34 to Rudder
- Category set to Packaging