Is there a time sync process on the Docker for AWS nodes?

Viewed 514

I haven't been able to determine if there is a time sync process (such as ntpd or chronyd) running on the docker swarm I've deployed to AWS using Docker Community Edition (CE) for AWS.

  • I've ssh'd to a swarm manager, but ps doesn't show much, and I don't see anything in /etc or /etc/conf.d that looks relevant.
  • I don't really have a good understanding of cloudformation, but I can see that the created instances running the docker nodes used AMI image Moby Linux 18.09.2-ce-aws1 stable (ami-0f4fb04ea796afb9a). I created a new instance w/ that AMI so I could ssh there. Still no time sync process indications w/ ps or in /etc

I suppose one of the swarm control containers that is running may deal with sync'ing time (maybe docker4x/l4controller-aws:18.09.2-ce-aws1)? Or maybe the cloudformation template installed one on the instances? But I don't know how to verify that.

So if anyone can tell me if there is a time sync process running (and where)?

And if not, I feel there should be so how might I start one up?

1 Answers

You can verify resources that are created by cloud formation Docker-no-vpc.tmpl from the link you provided.

Second thing, do you think ntpd have something do with docker-swarm? or it should be installed on the underlying EC2 instance?

Do ssh to your ec2 instance and very the status of the service, normally all AWS AMI has ntpd installed. or you can just type to check

ntpd

If you did not find, you can install it for your self or you can run docker swarm with custom AMI.

UCP requires that the system clocks on all the machines in a UCP cluster be in sync or else it can start having issues checking the status of the different nodes in the cluster. To ensure that the clocks in a cluster are synced, you can use NTP to set each machine's clock.

First, on each machine in the cluster, install NTP. For example, to install NTP on an Ubuntu distribution, run:

sudo apt-get update && apt-get install ntp

#On CentOS and RHEL, run:

sudo yum install ntp

what-does-clock-skew-detected-mean

Last thing, do you really need the stack that is created by cloudformation?

EC2 instances + Auto Scaling groups
IAM profiles
DynamoDB Tables
SQS Queue
VPC + subnets and security groups
ELB
CloudWatch Log Group

I know the cloudformation ease our life, but if you do not know the template (what resouces will be created) do not try to run the template, otherwise you will bear sweet cost at the of the month.

Also will suggest exploring AWS ECS and EKS, these are service that are sepcifly designed for docker container.

Related