teltek / Galicaster

The Galicaster Project is an open initiative to provide flexible, state-of-the-art solutions for recording educational multimedia contents like lectures and conferences
galicaster.teltek.es
Other
35 stars 31 forks source link

CA config is sent to MH every short heartbeat #114

Closed JamesUoM closed 7 years ago

JamesUoM commented 10 years ago

Currently the CA configuration is sent to MH at the same time as the state ie on the short heartbeat (see scheduler.set_state. The reference MH CA setup has the CA config set to MH every 600s (10mins), from org.opencastproject.capture.impl.ConfigurationManager.properties:

capture.config.remote.polling.interval=600

this implies that the CA config should be sent on the long heartbeat not the short.

The only thing that changes in the CA config is the mindiskspace but I don't think there is any need to but unnecessary strain on the MH admin node by sending this every 10s by default.

smarquard commented 9 years ago

Agreed, it would be good to get this fixed.

hcaloto commented 9 years ago

The polling interval has been set to the long heartbeat, so you can change its value in the config file. Thanks for reporting this.

smarquard commented 9 years ago

The change in https://github.com/teltek/Galicaster/commit/958a89f076b28ea002b113649bd7bc4643f0c698 is not sufficient to set this - it also needs a change in galicaster/scheduler/scheduler.py to remove setconfiguration from set_state and call it separately from do_timers_long

   def set_state(self):
        if self.state.is_error:
            self.ca_status = 'unknown' #See AgentState.java
        elif self.state.is_recording:
            self.ca_status = 'capturing'
        else:
            self.ca_status = 'idle'
        self.logger.info('Set status %s to server', self.ca_status)
        try:
            self.client.setstate(self.ca_status)
            self.client.setconfiguration(self.conf.get_tracks_in_mh_dict())
            self.net = True
            self.emit('net-up')
        except:
            self.logger.warning('Problems to connect to matterhorn server ')
            self.net = False
            self.emit('net-down')
            return
smarquard commented 9 years ago
diff --git a/galicaster/scheduler/scheduler.py b/galicaster/scheduler/scheduler.py
index 39af45b..b7d3a7d 100644
--- a/galicaster/scheduler/scheduler.py
+++ b/galicaster/scheduler/scheduler.py
@@ -69,6 +69,7 @@ class Scheduler(object):

     def do_timers_long(self, sender):
         if self.net:
+            self.client.setconfiguration(self.conf.get_tracks_in_mh_dict())
             self.proccess_ical()
             self.emit('after-process-ical')
         for mp in self.repo.get_next_mediapackages():
@@ -100,7 +101,6 @@ class Scheduler(object):
         self.logger.info('Set status %s to server', self.ca_status)
         try:
             self.client.setstate(self.ca_status)
-            self.client.setconfiguration(self.conf.get_tracks_in_mh_dict())
             self.net = True
             self.emit('net-up')
         except:
JamesUoM commented 9 years ago

+1

On 25/05/15 12:03, Stephen Marquard wrote:

|diff --git a/galicaster/scheduler/scheduler.py b/galicaster/scheduler/scheduler.py index 39af45b..b7d3a7d 100644 --- a/galicaster/scheduler/scheduler.py +++ b/galicaster/scheduler/scheduler.py @@ -69,6 +69,7 @@ class Scheduler(object):

  def do_timers_long(self, sender):
      if self.net:
  • self.client.setconfiguration(self.conf.get_tracks_in_mh_dict()) self.proccess_ical() self.emit('after-process-ical') for mp in self.repo.get_next_mediapackages(): @@ -100,7 +101,6 @@ class Scheduler(object): self.logger.info('Set status %s to server', self.ca_status) try: self.client.setstate(self.ca_status)
  • self.client.setconfiguration(self.conf.get_tracks_in_mh_dict()) self.net = True self.emit('net-up') except: |

— Reply to this email directly or view it on GitHub https://github.com/teltek/Galicaster/issues/114#issuecomment-105207427.


James S. Perrin

Media Technologies Team J20, Sackville Building The University of Manchester Oxford Road, Manchester, M13 9PL

t: +44 (0) 161 275 6945 e: james.perrin@manchester.ac.uk

w: www.manchester.ac.uk/researchcomputing

"The test of intellect is the refusal to belabour the obvious"

- Alfred Bester

smarquard commented 7 years ago

Still an issue in 2.0.x although this code is now in galicaster/opencast/service.py