[rudder-dev] rules and directives gone after upgrade to nightly

Michael Gliwinski Michael.Gliwinski at henderson-group.com
Thu Sep 13 13:55:32 CEST 2012


On Wednesday 12 Sep 2012 16:36:53 Nicolas Perron wrote:
> Ok, then it could be due to LDAP which fail during migration. Do you
> have the output from the migration and if so could you send it to us ?

Sorry, don't have the output anymore.  I had to re-try upgrading a couple of 
times, some of the failures were:

 - rudder-agent 'Text file busy' error while updating cf-agent (that's #2792 I 
think), re-trying fixed it
 - rudder-server-root - the problem here was that there was an installed but 
unconfigured version from yesterday, couldn't configure today because newer 
version of rudder-webapp was already installed; fixed by running `sudo dpkg --
configure --force-depends rudder-server-root` and then `sudo apt-get install 
rudder-server-root`
 - rudder-webapp error from git commit (no changes to commit), this was due to 
deletion of techniques/system/distributePolicy/1.0/logrotate.st, fixed by doing 
git rm and git commit manually, then re-trying

> I've tried to reproduce your problem without success.
> Could it be possible to have a dump of your LDAP base with
> /opt/rudder/sbin/slapcat , please ?

Yeah, I imagine this would be non-reproducible :)  I may have done something 
wrong during upgrade, just trying to figure out if this can be fixed without 
starting over.

Regarding the LDAP dump, I'd rather not send the entire thing over email 
(security reasons), is there something specific I can check?

Looking through the LDAP dump I can actually see the rules and directives 
there, e.g. here's one rule:


dn: ruleId=441d550b-4a3a-4c99-
a710-14860667dfd0,ou=Rules,ou=Rudder,cn=rudder-c
 onfiguration
ruleId: 441d550b-4a3a-4c99-a710-14860667dfd0
objectClass: rule
objectClass: top
isEnabled: TRUE
isSystem: FALSE
structuralObjectClass: rule
entryUUID: f934115e-7bfb-1031-88cc-c913f245ae37
creatorsName: cn=manager,cn=rudder-configuration
createTimestamp: 20120816143948Z
ruleTarget: group:beb7373d-0a16-4f14-ae94-4655b9cfc944
description: Setup servers for CUPS server role.
longDescription: This installs CUPS server packages and configures CUPS to ena
 ble remote administration.
cn: cups-server
directiveId: 5538072f-e853-48e4-b163-160b5223fa9e
directiveId: a1924bbe-2cc9-49a0-9c81-396217f77e6e
directiveId: fcc8c069-777f-49a5-acb5-1fad13a8bf02
directiveId: e186f22d-b3da-414a-bcf9-fc88d073aac6
serial: 9
entryCSN: 20120831115436.454389Z#000000#000#000000
modifiersName: cn=manager,cn=rudder-configuration
modifyTimestamp: 20120831115436Z


I also checked the referenced group and directive IDs and they are all there.

I just noticed this problem also applies to groups, e.g. on 'Node Management -
> Groups' I see errors like "Can not find node db7463eb-
c5ac-432d-9749-39e9503ef7cb", yet the file /var/rudder/configuration-
repository/groups/db7463eb-c5ac-432d-9749-39e9503ef7cb.xml is there with 
contents:


<nodeGroup fileFormat="2">
  <id>db7463eb-c5ac-432d-9749-39e9503ef7cb</id>
  <displayName>linux</displayName>
  <description>All GNU/Linux hosts.</description>
  <query>
    {"select":"node","composition":"And","where":
[{"objectType":"node","attribute":"OS","comparator":"eq","value":"Linux"}]}
  </query>
  <isDynamic>true</isDynamic>
  <nodeIds>
    <id>456601f4-0a41-4d63-898e-51a965fd5f1f</id>
    <id>adc79f12-633e-4338-94ca-681bf09c066e</id>
    <id>546de2a2-9631-423b-b8d4-987318e9baf8</id>
    <id>e472f66e-9001-465e-a83e-82fb1101e8c0</id>
    <id>f958c6d2-1cad-45a8-9579-4ff397592880</id>
  </nodeIds>
  <isEnabled>true</isEnabled>
  <isSystem>false</isSystem>
</nodeGroup>


and also in LDAP:


dn: nodeGroupId=db7463eb-
c5ac-432d-9749-39e9503ef7cb,groupCategoryId=GroupRoot
 ,ou=Rudder,cn=rudder-configuration
nodeGroupId: db7463eb-c5ac-432d-9749-39e9503ef7cb
objectClass: nodeGroup
objectClass: top
cn: linux
description: All GNU/Linux hosts.
isEnabled: TRUE
isSystem: FALSE
isDynamic: TRUE
jsonNodeGroupQuery: {"select":"node","composition":"And","where":
[{"objectType
 ":"node","attribute":"OS","comparator":"eq","value":"Linux"}]}
structuralObjectClass: nodeGroup
entryUUID: ac7cf584-62f0-1031-9c67-1508ccbe5302
creatorsName: cn=manager,cn=rudder-configuration
createTimestamp: 20120715174555Z
nodeId: f958c6d2-1cad-45a8-9579-4ff397592880
nodeId: 456601f4-0a41-4d63-898e-51a965fd5f1f
nodeId: adc79f12-633e-4338-94ca-681bf09c066e
nodeId: 546de2a2-9631-423b-b8d4-987318e9baf8
nodeId: e472f66e-9001-465e-a83e-82fb1101e8c0
entryCSN: 20120816130628.925149Z#000000#000#000000
modifiersName: cn=manager,cn=rudder-configuration
modifyTimestamp: 20120816130628Z


Thanks again for your help,
Michael


**********************************************************************************************
The information in this email is confidential and may be legally privileged.  It is intended solely for the addressee and access to the email by anyone else is unauthorised.
If you are not the intended recipient, any disclosure, copying, distribution or any action taken or omitted to be taken in reliance on it, is prohibited and may be unlawful.
When addressed to our clients, any opinions or advice contained in this e-mail are subject to the terms and conditions expressed  in the governing client engagement leter or contract.
If you have received this email in error please notify support at henderson-group.com

John Henderson (Holdings) Ltd
Registered office: 9 Hightown Avenue, Mallusk, County Antrim, Northern Ireland, BT36 4RT.
Registered in Northern Ireland
Registration Number NI010588
Vat No.: 814 6399 12
*********************************************************************************



More information about the rudder-dev mailing list