Univention Bugzilla – Attachment 10010 Details for
Bug 49430
Improve log messages of univention-translog prune command
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
suggestion.diff
suggestion.diff (text/plain), 2.11 KB, created by
Arvid Requate
on 2019-05-08 12:37:15 CEST
(
hide
)
Description:
suggestion.diff
Filename:
MIME Type:
Creator:
Arvid Requate
Created:
2019-05-08 12:37:15 CEST
Size:
2.11 KB
patch
obsolete
>diff --git a/management/univention-directory-notifier/univention-translog b/management/univention-directory-notifier/univention-translog >index ac096fed98..99e479a636 100755 >--- a/management/univention-directory-notifier/univention-translog >+++ b/management/univention-directory-notifier/univention-translog >@@ -142,7 +142,7 @@ class Index(object): > self.size = size = len(data) > > count, reminder = divmod(size - sizeof(IndexHeader), sizeof(IndexEntry)) >- self.log.info("Index of size %d contains %d entries", size, count) >+ self.log.info("Index of size %d, last entry: %d", size, count - 1) > self.count = count - 1 if count else 0 # transaction 0 is never used > assert reminder == 0, reminder > >@@ -302,6 +302,8 @@ class Translog(object): > > self.translog.seek(0, SEEK_SET) > >+ self.log.info("Translog of size %d contains %d entries", size, self.last - self.first) >+ > return self > > def __exit__(self, exc_type, exc_value, traceback): >@@ -1197,10 +1199,10 @@ def prune_file(opt): > > log.info('Purging/keeping %d..%d..%d', translog.first, opt.trans, translog.last) > if opt.trans <= translog.first: >- log.fatal('Already purged.') >+ log.info('Already purged, nothing to do.') > raise Abort() > if opt.trans >= translog.last: >- log.fatal('Nothing to purge.') >+ log.info('Nothing to purge.') > raise Abort() > assert translog.first < opt.trans < translog.last > >@@ -1330,7 +1332,7 @@ def parse_args(args=None): > parser_check.set_defaults(func=check) > > parser_prune = subparsers.add_parser("prune", help="Prune transaction files") >- parser_prune.add_argument("trans", metavar="tid", type=int, help="Oldest transaction number to keep") >+ parser_prune.add_argument("trans", metavar="tid", type=int, help="Oldest transaction number to keep (negative numbers: the number of transactions to keep)") > parser_prune.add_argument("--role", "-r", metavar="ROLE", help="Server role [%(default)s]", default=ucr['server/role']) > parser_prune.set_defaults(func=prune, fix=True) >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 49430
: 10010