Skip to content
  • intrigeri's avatar
    Test suite: give the VM some time to be reconfigured after plugging a disk. · c12b4030
    intrigeri authored
    I see "Drive 'pRUZWkrmDo' is not detected by Tails (Timeout::Error)" too often
    these days. In the debug log, I see "test -b /dev/sda" being called exactly once
    and the surrounding try_for(20) timing out. I think that the remote shell gets
    confused by update(domain_xml.to_s) which is called by plug_drive → plug_device,
    e.g. the serial port it uses may be very temporarily unavailable and we're
    unlucky enough that our remote shell client sends a request exactly at
    that time. To support this hypothesis, after the failure, when one of our After
    hooks runs this:
    
        if $vm && $vm.remote_shell_is_up?
          save_journal($config['TMPDIR'])
        end
    
    … the remote shell client is confused, complains the ID of the answer it
    receives is not the expected one, and the Journal is not saved
    (which incidentally makes it hard to debug the very problem I'm trying to solve
    here).
    c12b4030