Bug 27483 - sysvol-sync inconsistent 5 minutes
sysvol-sync inconsistent 5 minutes
Status: RESOLVED WONTFIX
Product: UCS
Classification: Unclassified
Component: Samba4
UCS 4.2
Other Linux
: P5 normal (vote)
: ---
Assigned To: Samba maintainers
https://sambaxp.org/archive_data/Samb...
:
: 39521 (view as bug list)
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2012-06-07 09:08 CEST by Tim Petersen
Modified: 2020-07-03 20:52 CEST (History)
3 users (show)

See Also:
What kind of report is it?: Bug Report
What type of bug is this?: 2: Improvement: Would be a product improvement
Who will be affected by this bug?: 3: Will affect average number of installed domains
How will those affected feel about the bug?: 2: A Pain – users won’t like this once they notice it
User Pain: 0.069
Enterprise Customer affected?: Yes
School Customer affected?:
ISV affected?:
Waiting Support:
Flags outvoted (downgraded) after PO Review:
Ticket number: 2013011121000717
Bug group (optional):
Max CVSS v3 score:


Attachments
gpo_inotify.log (36.21 KB, text/x-log)
2017-04-20 17:47 CEST, Arvid Requate
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Tim Petersen univentionstaff 2012-06-07 09:08:19 CEST
Bei der Sysvol-Synchronisierung fiel noch folgendes auf:
Tätigt man Änderungen an einer GPO (oder erstellt eine neue GPO) und erstellt dann im Anschluss einen Report der Einstellungen, so führt dies zu einer Fehlermeldung, sofern hier zufällig ein Backupcontroller abgefragt wird.
"Unbekannter Fehler bei der Zusamenstellung von Informationen. [...] ein Teil des Pfades (Policy im Sysvol-Pfad) konnte nicht gefunden werden."
Ursache ist hier, dass die LDB-Einstellungen und die Grundstruktur der GPO im Dateisystem zwar per DRS annähernd in Echtzeit synchronsiert werden, die konkreten Einstellungen unterhalb der Policy in "/var/lib/samba/sysvol" aber erst nach 5 Minuten per Cron repliziert werden. In diesen 5 Minuten kann die geänderte GPO nicht vollständig  von einem DC Backup abgefragt werden.

Für das Generieren eines Reports ist das nicht kritisch. Es ist aber beispielsweise auch denkbar, dass während dieser 5 Minuten eine Anmeldung gegen einen der Backups durchgeführt wird - das wird dann vermutlich zu Problemen führen.
Comment 1 Arvid Requate univentionstaff 2012-06-07 09:53:30 CEST
Ja, das ist im Moment by Design so. Falls eine GPO nicht auf dem DC angelegt wird, der den S4 Connector bereitstellt, dann dauert es max. 5 min bis dieser die Policy-Dateien im Dateisystem per rsync zu sich gezogen hat und weitere 5 min. bis andere DCs die GPO erhalten. Die UCR Variable samba4/sysvol/sync/cron kann angepasst werden.


Mit der Synchronisation der GPO-Objekte nach OpenLDAP, die in UCS@School implementiert wurde, könnte ich mir spontan alternativ vorstellen, die Synchronisation per Listener zu triggern. Dafür müsste der Connector vermutlich an die Kopie des GPO-Objekts im OpenLDAP in einem separaten Attribut vermerken, welcher DC gerade eine aktualisierte Version des GPO-Objekts geschrieben hat. Übersehe ich dabei etwas?
Comment 2 Arvid Requate univentionstaff 2012-06-07 10:01:38 CEST
Direktere Alternative: Samba4 LDB-Modul statt Listener-Modul.
Comment 3 Sönke Schwardt-Krummrich univentionstaff 2012-06-07 10:04:00 CEST
Spricht was gegen incron? incron verbindet inotify und cron. Gibt es Änderungen in einem Verzeichnis, wird incron ähnlich wie cron aktiv.
http://packages.debian.org/search?keywords=incron
Comment 4 Arvid Requate univentionstaff 2012-06-07 10:10:33 CEST
Mit inotify hatte ich das Problem, die Triggerbedingung so zu definieren, dass der Sync nur einmal ausgeführt wird, wenn die GPO-Definition im Dateisystem "fertig" ist. Man müsste sich da das Schreibverhalten von Samba4 nochmal genauer anschauen.
Comment 5 Ingo Steuwer univentionstaff 2013-01-31 09:09:37 CET
Wurde mit Ticket#: 2013011121000717 von mehreren Kunden angefragt.
Comment 6 Stefan Gohmann univentionstaff 2016-10-11 08:02:23 CEST
This issue has been filed against UCS 3.0.

UCS 3.0 is out of maintenance and many UCS components have vastly changed in later releases. Thus, this issue is now being closed.

If this issue still occurs in newer UCS versions, please reopen.
Comment 7 Arvid Requate univentionstaff 2017-04-20 17:46:30 CEST
Still an issue of our current sysvol-replication design. Alternative approaches:

* Comment 3 (incron) + rsync
  * I'll attach an inotify event log example which I have gathered lately.

* smbclient "notify" (change notify) + rsync
  * https://msdn.microsoft.com/en-us/library/dn392331.aspx
  * showstopper: didn't listen on subdirs in my quick test
  * But there is a new "notifyd" in samba 4.3 (not shipped), maybe that works

* Optional: Make sysvol writable only on the master to avoid concurrency & locking issues and replication storms right from the start.


This bug is about the trigger part of the synchronization, not about the rsync part (note that we had to patch rsync to make dir facl modifications work)
Comment 8 Arvid Requate univentionstaff 2017-04-20 17:47:49 CEST
Created attachment 8784 [details]
gpo_inotify.log
Comment 9 Arvid Requate univentionstaff 2017-04-24 13:56:46 CEST
*** Bug 39521 has been marked as a duplicate of this bug. ***
Comment 10 Florian Best univentionstaff 2017-06-28 14:52:53 CEST
There is a Customer ID set so I set the flag "Enterprise Customer affected".
Comment 11 Ingo Steuwer univentionstaff 2020-07-03 20:52:44 CEST
This issue has been filed against UCS 4.2.

UCS 4.2 is out of maintenance and many UCS components have changed in later releases. Thus, this issue is now being closed.

If this issue still occurs in newer UCS versions, please use "Clone this bug" or reopen it and update the UCS version. In this case please provide detailed information on how this issue is affecting you.