blindsidenetworks / scalelite

Scalable load balancer for BigBlueButton.
GNU Affero General Public License v3.0
470 stars 247 forks source link

`scalelite_post_publish.rb` ignores `-f` parameter and transfers formats multiple times #1047

Open defnull opened 7 months ago

defnull commented 7 months ago

Describe the bug Recording post-publish scripts are called once for each format generated by BBB, but the scalelite_post_publish.rb script ignores the -f parameter and transfers all available formats for a given recording every time it is called. If BBB is configured to produce more than one formats (e.g. presentation, video and podcast), the script will be called multiple times and transfer the early formats repeatedly, resulting in multiple imports of the same format by the Scalelite importer. The importer just replaces existing imports, so this issue only produces unnecessary work but may go unnoticed otherwise.

To Reproduce Just look at https://github.com/blindsidenetworks/scalelite/blob/7f0cbde4d934c983a2e5c3175a2a7b376bd1b540/bigbluebutton/scalelite_post_publish.rb#L32-L33

Expected behavior The scalelite_post_publish.rb script should only pack and transfer the format specified by the -f parameter.

defnull commented 7 months ago

Oh, according to #888 this is more serious than I thought and causes data loss if delete_recording: true is enabled. The script is not prepared to handle multiple recording formats.