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:
- macOS Sierra (10.12.6), has
ntpdate
: https://gitlab.com/kutelev/parallels-executor/-/jobs/1630653907 - macOS BigSur (11.2.1), has
sntp
, has nontpdate
: https://gitlab.com/kutelev/parallels-executor/-/jobs/1630653904 - Ubuntu 20.04.2, has neither
ntpdate
norsntp
: https://gitlab.com/kutelev/parallels-executor/-/jobs/1630653910