Skip to content

Conversation

@olzzon
Copy link
Contributor

@olzzon olzzon commented Mar 21, 2024

About the Contributor

This PR is made on behalf of BBC

Type of Contribution

This is a Feature

Current Behavior

Currently the Primary and Secondary MOS connection are expected to be online at the same time.

New Behavior

OpenMedia treats the Secondary server as a Hot Standby, so it's not connected while Primary server is connected.
To handle this, a "Hot Spare" option is added in settings to the Secondary server.

When hot spare is activated, status messages are:

  • GOOD - When running on Primary, the status of Secondary is ignored.
  • GOOD - When running on Secondary the status of Primary is is ignored.
  • BAD - If neither Primary or Secondary is connected.

Testing Instructions

Connect MOS gateway to a 2 server OpenMedia setup.

Time Frame

We intend to finish the development on this feature in two weeks time.

Other Information

Status

  • PR is ready to be reviewed.
  • The functionality has been tested by the author.
  • Relevant unit tests has been added / updated.
  • Relevant documentation (code comments, system documentation) has been added / updated.

@jstarpl jstarpl changed the title Feat/mos openmedia hot standby feat(MOS): support OpenMedia's hot standby Mar 22, 2024
@jstarpl jstarpl added the Contribution from BBC Contributions sponsored by BBC (bbc.co.uk) label Jun 13, 2024
@nytamin nytamin added the Contribution External contribution label Jun 25, 2024
@codecov
Copy link

codecov bot commented Aug 13, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 61.29%. Comparing base (11ddc3a) to head (685862b).
Report is 46 commits behind head on release52.

Additional details and impacted files
@@              Coverage Diff              @@
##           release52    #1169      +/-   ##
=============================================
- Coverage      61.31%   61.29%   -0.02%     
=============================================
  Files            468      468              
  Lines          82107    82107              
  Branches        4684     5352     +668     
=============================================
- Hits           50340    50327      -13     
+ Misses         31674    31636      -38     
- Partials          93      144      +51     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Member

@Julusian Julusian left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not keen on the name 'hot standby', I find that confusing.
I would expect the 'hot standby' mode to be the one where there is a 'hot spare' connection maintained the whole time, not when the connection is 'cold' except when the primary is down.
I would prefer that the field was renamed to be more descriptive to how the connection will behave, and the description could include something like For OpenMedia Hot Standby to make it clear it should be used with this

@olzzon olzzon requested a review from Julusian September 24, 2024 11:40
@olzzon olzzon marked this pull request as ready for review October 8, 2024 10:50
@olzzon olzzon requested a review from a team as a code owner October 8, 2024 10:50
Copy link
Contributor

@jstarpl jstarpl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it would be nice if we grouped these out-of-spec behavior flags into some sort of an options object.


if (deviceOptions.secondary?.id && this._openMediaHotStandby[deviceOptions.secondary.id]) {
//@ts-expect-error this is not yet added to the official mos-connection
deviceOptions.secondary.openMediaHotStandby = true
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this mean that this PR is not mergable yet? Because there needs to be an update to mos-connection before?

Copy link
Member

@Julusian Julusian Dec 10, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, it appears so.
The PR Sofie-Automation/sofie-mos-connection#105 has been merged in that repository, but v4.2.0 has only been half created, so cannot be referenced here yet.
It sounds like there are some more changes waiting in mos-connection

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That was the PR, but there are some additional fixes without a PR yet

@jstarpl jstarpl changed the base branch from release51 to release52 October 23, 2024 15:39
@jstarpl jstarpl merged commit b69478f into Sofie-Automation:release52 Dec 11, 2024
45 of 46 checks passed
@Julusian Julusian deleted the feat/mos-openmedia-hot-standby branch February 4, 2025 12:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Contribution from BBC Contributions sponsored by BBC (bbc.co.uk) Contribution External contribution

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants