Bug 49198 - Mutliple entries in the transaction file
Mutliple entries in the transaction file
Status: CLOSED FIXED
Product: UCS
Classification: Unclassified
Component: Notifier (univention-directory-notifier)
UCS 4.4
Other Linux
: P5 normal (vote)
: UCS 4.4-0-errata
Assigned To: Philipp Hahn
Stefan Gohmann
:
Depends on:
Blocks: 48466 49194 49199
  Show dependency treegraph
 
Reported: 2019-03-29 14:27 CET by Stefan Gohmann
Modified: 2019-04-01 10:09 CEST (History)
1 user (show)

See Also:
What kind of report is it?: Bug Report
What type of bug is this?: 7: Crash: Bug causes crash or data loss
Who will be affected by this bug?: 1: Will affect a very few installed domains
How will those affected feel about the bug?: 5: Blocking further progress on the daily work
User Pain: 0.200
Enterprise Customer affected?:
School Customer affected?:
ISV affected?:
Waiting Support:
Flags outvoted (downgraded) after PO Review:
Ticket number: 2019032821000494, 2019031921001509
Bug group (optional):
Max CVSS v3 score:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Stefan Gohmann univentionstaff 2019-03-29 14:27:11 CET
It can happen that the notifier transfers the changes from the listener/listener file multiple times to the transaction file.

This happens if the LDAP (cn=translog) transaction is aborted for example due to MDB_MAP_FULL.

Suggestion: We reverse the order, first LDAP, then transaction.
Comment 1 Philipp Hahn univentionstaff 2019-03-29 17:59:27 CET
[4.4-0] b4965d017d Bug #49198 udn: Write to LDAP first, to file later
 management/univention-directory-notifier/debian/changelog | 6 ++++++
 management/univention-directory-notifier/src/notify.c     | 2 +-
 2 files changed, 7 insertions(+), 1 deletion(-)

Package: univention-directory-notifier
Version: 13.0.1-9A~4.4.0.201903291625
Branch: ucs_4.4-0
Scope: errata4.4-0


Due to a conflict with Bug #48466 I forked "phahn/49198-udn" from "release-4.4-0" to only cherr-pick "b4965d017d" on to as "4aa0210d18". After that I imported and built from from there:

  git checkout -b phahn/49198-udn release-4.4-0
  git cherry-pick b4965d017d
  git mergetool # fix merge conflict due to the different base version in debian/changelog
  git commit
  git push origin
  ssh -t -A -K omar repo_admin.py # "rm sr" "univention-directory-notifier" "13.0.1-9A~4.4.0.201903291625" 
  ssh -t -A -K omar repo_admin.py -G git@git.knut.univention.de:univention/ucs.git -b phahn/49198-udn -P management/univention-directory-notifier -p univention-directory-notifier -r 4.4-0-0 -s errata4.4-0
  ssh -t -A -K dimma build-package-ng -r 4.4-0-0 -P ucs -s errata4.4-0 --no-pbuilder-update -p univention-directory-notifier
  ssh -t -A -K ladda build-package-architecture-ng -r 4.4-0-0 -P ucs -s errata4.4-0 --no-pbuilder-update -p univention-directory-notifier


[phahn/49198-udn] 4aa0210d18 Bug #49198 udn: Write to LDAP first, to file later
 management/univention-directory-notifier/debian/changelog | 6 ++++++
 management/univention-directory-notifier/src/notify.c     | 2 +-
 2 files changed, 7 insertions(+), 1 deletion(-)

Package: univention-directory-notifier
Version: 13.0.1-9A~4.4.0.201903291753
Branch: ucs_4.4-0
Scope: errata4.4-0

OK: Bug #49199 comment 1
OK: apt install univention-directory-notifier=13.0.1-9A~4.4.0.201903291753
Comment 2 Philipp Hahn univentionstaff 2019-03-29 18:06:19 CET
[4.4-0] b1f67dbe15 Bug #49198: univention-directory-notifier 13.0.1-9A~4.4.0.201903291753
 doc/errata/staging/univention-directory-notifier.yaml | 18 +++++++++++-------
 1 file changed, 11 insertions(+), 7 deletions(-)
Comment 3 Stefan Gohmann univentionstaff 2019-04-01 08:02:40 CEST
Jenkins tests: OK

Manual tests: OK, it works. I was able to reproduce the original issue. I simply reduced the database size of the translog database and I got a MDB_MAP_FULL. As long as one don't try to rebuild the transaction file with a wrong howto everything works fine even with a duplicated id in the translog file.

Code review: OK

YAML: I would suggest to remove the part "and also can fill up all space of the file system".
Comment 4 Philipp Hahn univentionstaff 2019-04-01 08:52:56 CEST
(In reply to Stefan Gohmann from comment #3)
> YAML: I would suggest to remove the part "and also can fill up all space of
> the file system".

[4.4-0] 155cf23575 Bug #49198: univention-directory-notifier 13.0.1-9A~4.4.0.201903291753
 doc/errata/staging/univention-directory-notifier.yaml | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
Comment 5 Stefan Gohmann univentionstaff 2019-04-01 09:11:13 CEST
(In reply to Philipp Hahn from comment #4)
> (In reply to Stefan Gohmann from comment #3)
> > YAML: I would suggest to remove the part "and also can fill up all space of
> > the file system".
> 
> [4.4-0] 155cf23575 Bug #49198: univention-directory-notifier
> 13.0.1-9A~4.4.0.201903291753
>  doc/errata/staging/univention-directory-notifier.yaml | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)

OK, thanks.
Comment 6 Arvid Requate univentionstaff 2019-04-01 10:09:34 CEST
<http://errata.software-univention.de/ucs/4.4/30.html>