3

I'm using Rudder 2.3 (v.2.3.7~rc2~git201205021042 ) since some months now and I have added some VM which have been deleted now.

So I search a step by step howto to remove its from my rudder node list. I suppose it's in LDAP entries but may be some files/directories also and Postgres ?

P.S. : I know it's a new/future feature in 2.4 but I'm not in 2.4 ...

2 Answers 2

3

Thanks for the procedure, may be this post will help people who want to delete node from rudder.

ldapdelete -D cn=Manager,cn=rudder-configuration -x nodeId=${NODEID},ou=nodes,cn=rudder-configuration -W
ldapdelete -r -D cn=Manager,cn=rudder-configuration -x nodeId=${NODEID},ou="nodes configuration",ou=rudder,cn=rudder-configuration -W

the third step you should search each object which has your node:

ldapsearch -D cn=Manager,cn=rudder-configuration -b groupCategoryId=GroupRudder,ou=rudder,cn=rudder-configiration -W "(nodeId=${NODEID})"

retrieve each dn results and create a file (to_remove) as following:

dn: ${DN_RETRIEVED_BY_COMMAND}
changetype: modify
delete: nodeId
nodeId: ${NODEID}

Next lunch:

ldapmodify -D cn=Manager,cn=rudder-configuration -f to_remove.txt

Finally, remove all inventory informations:

ldapdelete -r -D cn=Manager,cn=rudder-configuration -x nodeId=${NODEID},ou="accepted inventories",ou=inventories,cn=rudder-configuration

P.S: Replace ${NODEID} by your nodeId.

2

The easiest way to remove a node is to upgrade to version 2.4

The hard way, on Rudder 2.3, requires to modify the content of the LDAP tree :

  1. Identify the Rudder ID of the node you wish to remove (this ID can be found on the Node Summary, section Rudder Information). For the sake of the example, let's say I want to remove node d2049764-bdd8-4aed-b116-167546ffa157
  2. You have to connect to the LDAP directory, and perform the following steps :

    • In the branch ou=Nodes, remove the entry with the RDN nodeId=d2049764-bdd8-4aed-b116-167546ffa157 (this deletes the entry point of this node)
    • In the branch ou=Nodes Configuration, remove the entry with the RDN nodeId=d2049764-bdd8-4aed-b116-167546ffa157 (this deletes the cache of promises deployed)
    • In every entry in the tree groupCategoryId=GroupRoot,ou=Rudder, remove from the multivalued attributes nodeId the value d2049764-bdd8-4aed-b116-167546ffa157 (if it is there) (this will remove the node from all groups)

    • Finally, in the ou=Nodes,ou=Accepted Inventories,ou=Inventories find the entry with the RDN nodeId=d2049764-bdd8-4aed-b116-167546ffa157

      • locate the container attribute (which should be something like machineId=55207ab4-a0bf-4772-8b72-cd10570a33fb,ou=Machines,ou=Accepted Inventories,ou=Inventories,cn=rudder-configuration ).
      • Remove the entry DN: nodeId=d2049764-bdd8-4aed-b116-167546ffa157,ou=Nodes,ou=Accepted Inventories,ou=Inventories,cn=rudder-configuration and all its sub-entries (this will remove its inventory)

      • If you have only one node linked to this machine (which is most often the case), you can delete the entry machineId=55207ab4-a0bf-4772-8b72-cd10570a33fb,ou=Machines,ou=Accepted Inventories,ou=Inventories,cn=rudder-configuration and all its sub-entries, else just leave it alone

To regenerate all promises, and correct expected reporting, you have to go to the web interface, Administration pane, in the sub-menu Policy Server, and hit Clear Caches. Every expected reports will be computed again, to ensure proper compliance computing.

1
  • thx a lot ! two little points : - ou=Nodes Configuration is in ou=Nodes Configuration,ou Rudder - during the LDAP delete steps Rudder can try to regenerate is configuration but in this case there are errors, you need to finish all steps and after all is clear
    – frbayart
    Jun 15, 2012 at 12:28

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .