Repository navigation
Ensure that files are handled safely in recording scripts - #9857
Merged
Merged
Conversation
added 2 commits
June 17, 2020 11:09
This commit fixes an issue with reading and writing files. File.open is used which means that a file will remain open unless explicilty closed or the program exit. This doesn't work for an NFS mount as the scripts try to "rm -rf" when the file is still open. This commit fixes that by replacing all .opens with .reads
Contributor
|
I think this fix was incomplete. The |
defnull
added a commit
to defnull/bigbluebutton
that referenced
this pull request
Aug 12, 2020
PR bigbluebutton#9857 was incomplete and did not completely fix the issues described in bigbluebutton#9062 and bigbluebutton#9110 (dublicate).
defnull
added a commit
to defnull/bigbluebutton
that referenced
this pull request
Dec 7, 2020
PR bigbluebutton#9857 was incomplete and did not completely fix the issues described in bigbluebutton#9062 and bigbluebutton#9110 (dublicate).
This was referenced May 20, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this PR do?
This PR fixes an issue with reading and writing files.
File.open is used which means that a file will remain open
unless explicilty closed or the program exit. This doesn't work
for an NFS mount as the scripts try to "rm -rf" when the file
is still open. This commit fixes that by replacing all .opens
with .reads in 3 locations.
Closes Issue(s)
Fixes #9062 and #9110 (duplicates)
Motivation
Our BBB hosts only have a maximum disk size of 25GB so we could not store recordings locally. An external NFS mount was used for the Kurento, FreeSWITCH and other directories to ensure that the entire process still worked. However, we ran into this issue and the existing fixes in the issues were quick hacks that did not solve the issue at large. It is also good practice to close files after using them. It may be necessary to apply this to all scripts in record-and-playback but for us, only these were necessary as we archive and perform sanity on the BBB hosts but process and publish on another machine.
More
Use the following regexp:
regexp: '^(.(Nokogiri::XML|Hash.from_xml))(File.open((.)$'
replace: '\1(File.read(\3'