Skip to content

Draft: Remote shell: Try to fix fragile file operations

segfault requested to merge remote-shell-fragile-file-operation into stable

I've seen scenario "I can use a network with captive portal" fail with:

OSError: [Errno 26] Text file busy: '/etc/NetworkManager/dispatcher.d/00-firewall.sh' (RemoteShell::ServerFailure)
./features/support/helpers/remote_shell.rb:69:in `block (2 levels) in communicate'
./features/support/helpers/remote_shell.rb:40:in `loop'
./features/support/helpers/remote_shell.rb:40:in `block in communicate'
./features/support/helpers/remote_shell.rb:37:in `communicate'
./features/support/helpers/remote_shell.rb:208:in `open'
./features/support/helpers/remote_shell.rb:235:in `append'
./features/support/helpers/vm_helper.rb:624:in `block in file_append'
./features/support/helpers/vm_helper.rb:559:in `file_open'
./features/support/helpers/vm_helper.rb:624:in `file_append'
./features/step_definitions/tor.rb:951:in `block (2 levels) in <top (required)>'
./features/step_definitions/tor.rb:945:in `each'
./features/step_definitions/tor.rb:945:in `/^the Tor network( and default bridges)? (?:is|are) (un)?blocked$/'
features/tor_connection.feature:48:in `And the Tor network and default bridges are blocked'

This looks like a race condition to me, which might be fixed by retrying the file operation.

Closes #19736 (closed)

Edited by anonym

Merge request reports