This is an automated email from the git hooks/post-receive script. x2go pushed a change to branch master in repository x2gobroker. from c3067f0 bin/x2gobroker: If binding the http server fails, a non-zero exit code should be returned. (Fixes: #1013). new de207a0 x2gobroker/loadchecker.py: Don't re-read the x2gobroker.conf during each cycle of the load checking loop. Rather read it on service startup and require a service restart when x2gobroker.conf has been changed. new 533a37b x2gobroker/loadchecker.py: Avoid rare cases where at the end of a load checking cycle a negative sleep time would have been calculated. (Fixes: #1315). Thanks to Walid Moghrabi for catching this. The 2 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "adds" were already present in the repository and have only been added to this reference. Summary of changes: debian/changelog | 6 ++++++ x2gobroker/loadchecker.py | 15 ++++++--------- 2 files changed, 12 insertions(+), 9 deletions(-) -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/x2gobroker.git
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch master in repository x2gobroker. commit de207a07dba3b74a4ed7c7dcec599bbfd118ccf3 Author: Mike Gabriel <mike.gabriel@das-netzwerkteam.de> Date: Thu Sep 13 15:47:51 2018 +0200 x2gobroker/loadchecker.py: Don't re-read the x2gobroker.conf during each cycle of the load checking loop. Rather read it on service startup and require a service restart when x2gobroker.conf has been changed. --- debian/changelog | 3 +++ x2gobroker/loadchecker.py | 11 ++++------- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/debian/changelog b/debian/changelog index 7217c4f..cbe2446 100644 --- a/debian/changelog +++ b/debian/changelog @@ -77,6 +77,9 @@ x2gobroker (0.0.4.0-0x2go1) UNRELEASED; urgency=medium - docs/source: Initialize Sphinx API documentation's .rst files. - bin/x2gobroker: If binding the http server fails, a non-zero exit code should be returned. (Fixes: #1013). + - x2gobroker/loadchecker.py: Don't re-read the x2gobroker.conf during + each cycle of the load checking loop. Rather read it on service startup + and require a service restart when x2gobroker.conf has been changed. * debian/*: + Trigger Makefile's install target and install those files. Drop debhelper from-source-installation magic. diff --git a/x2gobroker/loadchecker.py b/x2gobroker/loadchecker.py index 5683555..bc01bf3 100644 --- a/x2gobroker/loadchecker.py +++ b/x2gobroker/loadchecker.py @@ -242,15 +242,12 @@ class LoadChecker(threading.Thread): """ time_to_sleep = 0 - while self.keep_alive: - - # in every loop we re-read the main configuration file(s) - # this allows changes to the config files to take effect immediately... - self.config = x2gobroker.config.X2GoBrokerConfigFile(config_files=self.config_file, defaults=self.config_defaults) - self.load_checker_intervals = self.config.get_value('global', 'load-checker-intervals') + self.config = x2gobroker.config.X2GoBrokerConfigFile(config_files=self.config_file, defaults=self.config_defaults) + self.load_checker_intervals = self.config.get_value('global', 'load-checker-intervals') + self.broker_backends = [ "_".join(bs.split('_')[1:]) for bs in self.config.list_sections() if bs.startswith('broker_') and self.config.get_value(bs, 'enable') ] - self.broker_backends = [ "_".join(bs.split('_')[1:]) for bs in self.config.list_sections() if bs.startswith('broker_') and self.config.get_value(bs, 'enable') ] + while self.keep_alive: # potentially, the X2Go Session Broker can manage different broker backends at the same time, so we initialize # all configured/enabled broker backends -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/x2gobroker.git
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch master in repository x2gobroker. commit 533a37bc1650b1caf48e03a101df18e2c89b6f79 Author: Mike Gabriel <mike.gabriel@das-netzwerkteam.de> Date: Thu Sep 13 15:49:44 2018 +0200 x2gobroker/loadchecker.py: Avoid rare cases where at the end of a load checking cycle a negative sleep time would have been calculated. (Fixes: #1315). Thanks to Walid Moghrabi for catching this. --- debian/changelog | 3 +++ x2gobroker/loadchecker.py | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/debian/changelog b/debian/changelog index cbe2446..6c8f0df 100644 --- a/debian/changelog +++ b/debian/changelog @@ -80,6 +80,9 @@ x2gobroker (0.0.4.0-0x2go1) UNRELEASED; urgency=medium - x2gobroker/loadchecker.py: Don't re-read the x2gobroker.conf during each cycle of the load checking loop. Rather read it on service startup and require a service restart when x2gobroker.conf has been changed. + - x2gobroker/loadchecker.py: Avoid rare cases where at the end of a load + checking cycle a negative sleep time would have been calculated. + (Fixes: #1315). Thanks to Walid Moghrabi for catching this. * debian/*: + Trigger Makefile's install target and install those files. Drop debhelper from-source-installation magic. diff --git a/x2gobroker/loadchecker.py b/x2gobroker/loadchecker.py index bc01bf3..b672e80 100644 --- a/x2gobroker/loadchecker.py +++ b/x2gobroker/loadchecker.py @@ -316,8 +316,8 @@ class LoadChecker(threading.Thread): time.sleep(self.load_checker_intervals) if num_queries > 0: if time_to_sleep > 0: - if self.logger: self.logger.debug('LoadChecker.loadchecker(): performed {num} queries (failures: {num_failures}), sleeping for {secs}secs before starting next query cycle'.format(num=num_queries, num_failures=num_failed_queries, secs=self.load_checker_intervals - time_to_sleep * num_queries)) - time.sleep(self.load_checker_intervals - time_to_sleep * num_queries) + if self.logger: self.logger.debug('LoadChecker.loadchecker(): performed {num} queries (failures: {num_failures}), sleeping for {secs}secs before starting next query cycle'.format(num=num_queries, num_failures=num_failed_queries, secs=time_to_sleep)) + time.sleep(time_to_sleep) time_to_sleep = self.load_checker_intervals / (num_queries +1) else: if self.logger: self.logger.warning('LoadChecker.loadchecker(): performed {num} queries (failures: {num_failures}) in this cycle, if this message keeps repeating itself, consider disabling the X2Go Broker Load Checker daemon'.format(num=num_queries, num_failures=num_failed_queries, secs=self.load_checker_intervals - time_to_sleep * num_queries)) -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/x2gobroker.git