[rudder-users] LDAP issue

Prestasit01 prestasit01 at ouest-france.fr
Fri Mar 7 12:11:23 CET 2014


Hello,

Please find my answers in green on the previous mail.

BR

Cedric

De : Francois Armand [mailto:francois.armand at normation.com]
Envoyé : jeudi 6 mars 2014 17:58
À : Prestasit01; 'Nicolas Charles'
Cc : 'Matthieu CERDA'; 'rudder-users at lists.rudder-project.org'
Objet : Re: [rudder-users] LDAP issue

On 06/03/2014 16:33, Prestasit01 wrote:
Nicolas,

SERVERPROD : 2.6.10 server installed from scratch, all rules/directives/groups/catogies mannualy created.

SERVERTEST : 2.6.10 server installed from scratch, « configuration-repository » similar to SERVERPROD (we used the migration process)

After the « restore », we have an error on SERVERTEST :

[cid:part3.00070702.00070406 at normation.com]

This group exist on SERVERPROD (which is on the same OS, with same updates, and same rudder-server –root version)


You mean that if you go to the group page, you can go to the given group and see it by going to: http://yourserver/rudder/secure/nodeManager/groups#<http://yourserver/rudder/secure/nodeManager/groups>{"groupId":"here-the-uuid"}

Yes


I only found 2 things :

-          category.xml is not present on SERVERPROD (and i don’t know why and if it’s normal)

That should not be the case. category.xml is a file saying that the directory is a category with the name contained in the file. Without that, the directory is ignored when you are restoring.

So, there is something strange.
Are you sure there is the category.xml files present in the SERVERTEST configuration-repository/groups ? If so, are you sure they are still in the tar ?
And if so, I don't understand where they disapeared.

[root at SERVERTEST groups]# pwd
/var/rudder/configuration-repository/groups
[root at SERVERTEST groups]# ls -haltr
total 20K
drwxr-x--- 2 root root 4,0K  4 mars  16:59 6c3843bb-92e6-4fd0-b50f-dcb26798b495
drwxr-xr-x 8 root root 4,0K  4 mars  16:59 ..
drwxr-x--- 3 root root 4,0K  4 mars  18:04 163d6d00-7f6d-4511-aadf-440421cd8bf1
drwxr-x--- 4 root root 4,0K  4 mars  18:04 .
-rw-r----- 1 root root  289  5 mars  16:21 category.xml


This category.xml file is not on the tar. I think it has been created during the restore process !



-          The contained of the « groups » folder is the same (for me it seems light, because we have a lot of group/categories in our web interface and there is not a lot of folders and files on this « groups » folder).

*IF* an archive was made, your groups and groups category (what you see in the groups screen) and the content of configuration-repository/groups should be the same. You should even find exactly the same directory structure (for exemple with the "tree --dirsfirst" command).

[root at SERVERPROD groups]# tree --dirsfirst

.

âââ 163d6d00-7f6d-4511-aadf-440421cd8bf1

â   âââ 62967e4b-d67f-4c8b-a13f-e9833309b392

â   â   âââ bdcedc96-ff67-413b-ae1d-97d67a5312f0.xml

â   â   âââ category.xml => HERE SINCE I DRAG AND DROP THE GROUP ON ANOTHER CATEGORY

â   âââ a8d7eb7b-9e56-4ccf-9f45-67b75850dda6

âââ 6c3843bb-92e6-4fd0-b50f-dcb26798b495

    âââ 9d01ebc1-f6f7-4c5b-9742-fd42bd89fc38.xml



4 directories, 3 files



-------------------------------------------------------------------------------------------



[root at SERVERTEST groups]# tree --dirsfirst

.

âââ 163d6d00-7f6d-4511-aadf-440421cd8bf1

â   âââ a8d7eb7b-9e56-4ccf-9f45-67b75850dda6

â       âââ bdcedc96-ff67-413b-ae1d-97d67a5312f0.xml

âââ 6c3843bb-92e6-4fd0-b50f-dcb26798b495

â   âââ 9d01ebc1-f6f7-4c5b-9742-fd42bd89fc38.xml

âââ category.xml => NOT PRESENT IN SERVERPROD



3 directories, 3 files

-------------------------------------------------------------------------------------------

As you can see, Folders & xml aren’t correctly created in /var/rudder/configuration-repository/groups
Perhaps Categories & groups are seens on the web page…

The worst part on all of that is that we are not succeding in reproducing that bug, so we are just guesssing... And it seems we are not that good at guessing.


So, could do that procedure please:

  *   on SERVERTEST, go to (cd) /var/rudder/configuration-repository
  *   rm -rf groups
  *   git add -u
  *   git commit -m "Manually removing groups to see if the export is ok"
  *   then, on the archives UI of SERVERTEST, click on the "Archive groups" button
  *   look in configuration-repository/groups and check that each existing categories in the groups screen has a "category.xml" counterpart in the filesystem

[root at SERVERTEST groups]# ls

0013b5f3-e57f-4d21-804e-999931f59a93  4db3e21e-3c14-4416-8cad-4a3a8fa056bf  b74e9a5f-bf6a-4f49-80fb-4ad6daba11b5

0559c85d-5336-428c-8ecb-0c87387d4aec  540ef972-0090-4053-b6cb-ba0c32a6ce2f  c80fe11b-dcd8-4f79-9616-1728ebecb12f

09b9d38b-9b95-4b4d-b793-863251431aa3  6c3843bb-92e6-4fd0-b50f-dcb26798b495  category.xml

0c3a44a0-cb3e-45de-8920-d3343b7879ce  7a1ccb7f-87eb-4dd2-9299-7d58d3b4618c  d8d93403-3733-4632-a476-a5dd73666d87

163d6d00-7f6d-4511-aadf-440421cd8bf1  7b790700-d4d1-4a89-bf0d-5df0b1c94746  f08c1759-98b5-4a81-a601-e31ebe04d0c1

1f3e6975-f666-4f22-8da9-d06db12c5111  8e9a3fc3-45e1-46fc-bfc2-b327b437b5aa  f48993ec-ca6e-42f1-ad95-049fe17d4d23

377e5f6f-7591-4f70-82a3-c72e5af6a0a9  a5c78988-de42-442c-863c-78adafa2dc23  f67a2571-8b56-4a8b-ba1c-f1bcd255ebe6

412c9b31-3f7f-4f66-8ad6-d83bb0e929d4  ac99de00-1bfd-49c7-9cb1-ab514030d4d3

427ab019-230b-46b6-8ef7-bb9e81829d5d  ada69f94-38c7-4809-ac8c-3ed928319e4d



Now I have 25 Folders, like on the web interface.

There is one category.xml on each folder/subfolder

And one xml for each group.

It has restored groups that i have deleted on PRODSERVER (and that are not seen on the PRODSERVER web interface)

It has not restored 4 subcategories and their groups which is present on PRODSERVER (and that can be seen on the PRODSERVER web interface)



May it’s better to realize this operation on the PRODSERVER, as folders/xml are not ALL present on /var/rudder/configuration-repository/groups ???

On one hand it will permit to re-create folders/xmls and on the other hand it will sadly recreate deleted groups…



I can try to realize this operation (i can create a snapshot before).



The main question is : why folders/xml aren’t present on SERVPROD (the server on which i have manually created groups / categories) ????



  *   if ok, make the archive: tar –cvf xxx.tar.gz groups
  *   on SERVERPROD, go to configuration-repository
  *   rm -rf groups
  *   git add -u
  *   git commit -m "manually cleaning groups"
  *   untar xxxx.tar.gz (it should create a new groups directory)
  *   git add groups
  *   git commit -m "Importing groups"
  *   now, you should have in both the FS and git last commit the exact mirror content than what you have on the fs of SERVERTEST, which is itself the same content of what you have on you "groups" screen
  *   now, in SERVERPROD, go to "archives", and select "latest git commit" -> Restore groups
  *   try to regenerate promises


Does that procedure works ?

Thanks,

--
________________________________

[cid:image003.png at 01CF3967.5506AFB0]François ARMAND
Directeur de la R&D
Normation<http://www.normation.com>

________________________________

87 rue de Turbigo, 75003 Paris, France

Telephone:

+33 (0)1 83 62 99 23

Mobile:

+33 (0)6 63 37 60 55

________________________________



-------------------------------------------------------------------------<br>
Les informations ou pieces jointes contenues dans ce message sont
confidentielles. Seul le destinataire expressement vise peut en prendre
connaissance. Toute autre personne qui en divulguera, diffusera ou prendra des copies sera passible de poursuites. La societe Ouest-France decline en outre, toute responsabilite de quelque nature que ce soit au titre de ce message s'il a ete altere, deforme ou falsifie.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.rudder-project.org/pipermail/rudder-users/attachments/20140307/0c6aa31f/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image001.jpg
Type: image/jpeg
Size: 16014 bytes
Desc: image001.jpg
URL: <http://www.rudder-project.org/pipermail/rudder-users/attachments/20140307/0c6aa31f/attachment-0001.jpg>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image002.png
Type: image/png
Size: 3503 bytes
Desc: image002.png
URL: <http://www.rudder-project.org/pipermail/rudder-users/attachments/20140307/0c6aa31f/attachment-0002.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image003.png
Type: image/png
Size: 4098 bytes
Desc: image003.png
URL: <http://www.rudder-project.org/pipermail/rudder-users/attachments/20140307/0c6aa31f/attachment-0003.png>


More information about the rudder-users mailing list