Skip to content

The remote shell server is racing against Tails Greeter

The autotest_remote_shell.py is started after Tails Greeter (/etc/rc2.d/S05rc.local vs /etc/rc2.d/S03gdm3) which is fragile given how we wait for the remote shell to be ready (we “ask” if it’s up as soon as we see that Tails Greeter is running). In particular, in the test/7821-tor branch (for #7821 (closed)) a tiny change to the remote shell server (commit 1a55905e5d51d0f578b5ab3732a8ac0453ac6363 (“Create the environment for remote shell calls more realisitcally.”)) exposes this race.

To eliminate this race we should:

  • migrate the remote shell startup to a dedicated initscript, that acts as a no-op unless autotest_never_use_this_option is passed on the kernel command-line
  • set X-Start-Before: $x-display-manager gdm gdm3 in the remote shell initscript
  • in autotest_remote_shell.py, touch some file after port.open() has succeeded
  • patch the gdm3 initscript to wait for that file to appear, when autotest_never_use_this_option is passed on the kernel command-line, before it actually starts GDM.

(above adapted from #7821-note_42)

Feature Branch: bugfix/8941-start-remote-shell-before-greeter

Parent Task: #8539 (closed)

Related issues

Original created by @anonym on 8941 (Redmine)

Edited by intrigeri
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information