Project

General

Profile

Actions

Bug #3523

closed

No valid UUID was generated for a node, breaking several things

Added by Dennis Cabooter almost 10 years ago. Updated almost 8 years ago.

Status:
Released
Priority:
1
Assignee:
Matthieu CERDA
Category:
Packaging
Target version:
Severity:
UX impact:
User visibility:
Effort required:
Priority:
Regression:

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

node-correct.sh (898 Bytes) node-correct.sh Matthieu CERDA, 2013-04-24 19:16
node-extract.sh (321 Bytes) node-extract.sh Matthieu CERDA, 2013-04-24 19:16

Related issues 2 (0 open2 closed)

Related to Rudder - User story #3529: We should only accept node with "valid" UUIDReleasedFrançois ARMAND2013-04-24Actions
Related to Rudder - Bug #3546: rudder-agent RPM packages don't require the right 32/64 bit dependenciesReleasedJonathan CLARKE2013-04-26Actions
Actions #1

Updated by Matthieu CERDA almost 10 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
  • 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 almost 10 years ago

Enclosed to this ticket are two scripts:
  • 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.

Actions #3

Updated by François ARMAND almost 10 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)

Actions #4

Updated by Dennis Cabooter almost 10 years ago

Matthieu, We use RHEL/CentOS 5.x

Actions #5

Updated by François ARMAND almost 10 years ago

For preventeng nodes with by ID to be accepted again, we added some guards with #3529

Actions #6

Updated by Matthieu CERDA almost 10 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.

Actions #7

Updated by Matthieu CERDA almost 10 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

Actions #8

Updated by Jonathan CLARKE almost 10 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.

Actions #9

Updated by Matthieu CERDA almost 10 years ago

  • Status changed from Pending technical review to Pending release

Applied in changeset commit:c644c188dbedcab1404eee1b36464bba30d24b68.

Actions #10

Updated by Jonathan CLARKE almost 10 years ago

Applied in changeset commit:5e34a4d5cc02ef4cfdac04b54dce2ff3047fd8b4.

Actions #11

Updated by Jonathan CLARKE almost 10 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
Actions #12

Updated by Nicolas PERRON over 9 years ago

  • Status changed from Pending release to Released
Actions #13

Updated by Benoît PECCATTE almost 8 years ago

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

Also available in: Atom PDF