Skip to content

Commit

Permalink
Merge pull request #2711 from Varying-Vagrant-Vagrants/docker_improve…
Browse files Browse the repository at this point in the history
…ments_june_2024

Docker Clock synchronisation fixes
  • Loading branch information
tomjn authored Jun 16, 2024
2 parents 4999a41 + 5b57729 commit b9acbc8
Show file tree
Hide file tree
Showing 4 changed files with 36 additions and 29 deletions.
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,15 @@ permalink: /docs/en-US/changelog/

### Maintenance

* Switch the Parallels Arm64 box from `mpasternak/focal64-arm` to `bento/ubuntu-22.04-arm64` to match x86 boxes ( #2695 )
* Switch the Parallels Arm64 box from `mpasternak/focal64-arm` to `bento/ubuntu-20.04-arm64` to match x86 boxes ( #2695 )

### Bug Fixes

* The host file inside the VM was only adding sites with `127.0.0.1` addresses, now it adds the IPVv6 `::1` too ( #2689 )
* Fixes for hosts file cleanup ( #2708 )
* Removed old MacOS PR workflows, no runners available ( #2698 )
* Replace an outdated Nginx signing key ( #2710 )
* Don't sync clocks when using the docker provider ( #2711 )

## 3.12 ( 2023 August 3rd )

Expand Down
20 changes: 11 additions & 9 deletions config/homebin/vagrant_provision
Original file line number Diff line number Diff line change
Expand Up @@ -27,15 +27,17 @@ sudo service nginx restart
vvv_info " * Restarting MariaDB service"
sudo service mariadb restart

if [ -x "$(command -v ntpdate)" ]; then
vvv_info " * Syncing clocks"
if sudo ntpdate -u ntp.ubuntu.com; then
vvv_info " * clocks synced"
else
vvv_warn " - clock synchronisation failed"
fi
else
vvv_info " - skipping ntpdate clock sync, not installed yet"
if [ ! -f /.dockerenv ]; then
if [ -x "$(command -v ntpdate)" ]; then
vvv_info " * Syncing clocks"
if sudo ntpdate -u ntp.ubuntu.com; then
vvv_info " * clocks synced"
else
vvv_warn " - clock synchronisation failed"
fi
else
vvv_info " - skipping ntpdate clock sync, not installed yet"
fi
fi

RED="\033[38;5;9m"
Expand Down
20 changes: 11 additions & 9 deletions config/homebin/vagrant_up
Original file line number Diff line number Diff line change
Expand Up @@ -46,15 +46,17 @@ sudo service memcached restart
vvv_info " * Restarting Mailhog"
/usr/bin/env /usr/local/bin/mailhog > /dev/null 2>&1 &

if [ -x "$(command -v ntpdate)" ]; then
vvv_info " * Syncing clocks"
if sudo ntpdate -u ntp.ubuntu.com; then
vvv_info " * clocks synced"
else
vvv_warn " - clock synchronisation failed"
fi
else
vvv_info " - skipping ntpdate clock sync, not installed yet"
if [ ! -f /.dockerenv ]; then
if [ -x "$(command -v ntpdate)" ]; then
vvv_info " * Syncing clocks"
if sudo ntpdate -u ntp.ubuntu.com; then
vvv_info " * clocks synced"
else
vvv_warn " - clock synchronisation failed"
fi
else
vvv_info " - skipping ntpdate clock sync, not installed yet"
fi
fi

mkdir -p /vagrant/failed_provisioners
Expand Down
22 changes: 12 additions & 10 deletions provision/provision.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,19 +18,21 @@ rm -f /vagrant/version
rm -f /vagrant/vvv-custom.yml
rm -f /vagrant/config.yml

if [ -x "$(command -v ntpdate)" ]; then
echo " * Syncing clocks"
if sudo ntpdate -u ntp.ubuntu.com; then
echo " * clocks synced"
else
vvv_warn " - clock synchronisation failed"
fi
else
echo " - skipping ntpdate clock sync, not installed yet"
if [ ! -f /.dockerenv ]; then
if [ -x "$(command -v ntpdate)" ]; then
echo " * Syncing clocks"
if sudo ntpdate -u ntp.ubuntu.com; then
echo " * clocks synced"
else
echo " - clock synchronisation failed"
fi
else
echo " - skipping ntpdate clock sync, not installed yet"
fi
fi

touch /vagrant/provisioned_at
echo $(date "+%Y.%m.%d_%H-%M-%S") > /vagrant/provisioned_at
date "+%Y.%m.%d_%H-%M-%S" > /vagrant/provisioned_at

# copy over version and config files
cp -f /home/vagrant/version /vagrant
Expand Down

0 comments on commit b9acbc8

Please sign in to comment.