Skip to content

Handle situations when neither `ntpdate` nor `sntp` is available

What does this MR do?

Makes possible usage of Parallels Executor with guest VMs which have neither ntpdate nor sntp.

Worth mentioning that VirtualBox Executor does not have time synchronization logic at all.

Why was this MR needed?

Without these changes it is not possible to use guests which are lacking ntpdate and sntp.

For instance, minimalistic Ubuntu installation has neither ntpdate nor sntp, as result any attempt to use it fails:

ERROR: Preparation failed: calling prlctl: sudo: sntp: command not found
Running with gitlab-runner development version (HEAD)
  on parallels uxsHEBcF
Resolving secrets
Preparing the "parallels" executor
Using Parallels 17.0.1 executor...
Creating new VM...
Creating default snapshot...
Waiting for VM to become responsive...
Could not sync with timeserver!
ERROR: Preparation failed: calling prlctl: sudo: sntp: command not found
Will be retried in 3s ...
Using Parallels 17.0.1 executor...
Restoring VM from snapshot...
Waiting for VM to become responsive...
Could not sync with timeserver!
ERROR: Preparation failed: calling prlctl: sudo: sntp: command not found
Will be retried in 3s ...
Using Parallels 17.0.1 executor...
Restoring VM from snapshot...
Waiting for VM to become responsive...
Could not sync with timeserver!
ERROR: Preparation failed: calling prlctl: sudo: sntp: command not found
Will be retried in 3s ...
ERROR: Job failed (system failure): calling prlctl: sudo: sntp: command not found

What's the best way to test this MR?

Try to use Parallels Executor with different non-macOS guests.

The changes proposed by this MR have been checked with 3 different guest OSes:

What are the relevant issue numbers?

Merge request reports