Bug 39410 - Docker and time synchronization
Docker and time synchronization
Status: CLOSED FIXED
Product: UCS
Classification: Unclassified
Component: Docker
UCS 4.1
Other Linux
: P5 normal (vote)
: UCS 4.1
Assigned To: Felix Botner
Stefan Gohmann
: interim-2
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2015-09-26 14:02 CEST by Stefan Gohmann
Modified: 2015-11-17 12:12 CET (History)
0 users

See Also:
What kind of report is it?: ---
What type of bug is this?: ---
Who will be affected by this bug?: ---
How will those affected feel about the bug?: ---
User Pain:
Enterprise Customer affected?:
School Customer affected?:
ISV affected?:
Waiting Support:
Flags outvoted (downgraded) after PO Review:
Ticket number:
Bug group (optional):
Max CVSS v3 score:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Stefan Gohmann univentionstaff 2015-09-26 14:02:16 CEST
From the docker container join:
  ...
  Sync time:                                                 fail
  ...

From the join.log
  rdate: Could not set time of day: Operation not permitted

We should skip all time sync stuff in a docker container.

Maybe we could also make the packages ntp and ntpdate recommended instead of required.
Comment 1 Felix Botner univentionstaff 2015-10-08 17:31:14 CEST
* univention-server-master
  removed ntp | ntp-server, from dependencies

* univention-server-backup
  removed ntp | ntp-server, from dependencies

* univention-server-slave
  removed ntp | ntp-server, from dependencies

* univention-server-member
  removed ntp | ntp-server, from dependencies

* univention-role-server-common
  added ntp | ntp-server, to dependencies

* univention-base-packages
  moved rdate, ntpdate to recommends

* univention-ssl
  moved rdate to recommends

* univention-system-setup
  moved rdate to recommends

* univention-dvd
  added rdate and ntpdate to tasks/ucs410/task-ucs410
  (there is no longer a hard dependency to these packages,
  so we have to add them manually)

lets see what this does,
 * check if rdate, ntp and ntpdate is on the new dvd
 * check if rdate/ntpdate is installed during installation 
   /var/log/installer/syslog
 * check new docker image
Comment 2 Felix Botner univentionstaff 2015-10-13 17:14:52 CEST
>   so we have to add them manually)
> 
> lets see what this does,
>  * check if rdate, ntp and ntpdate is on the new dvd
>  * check if rdate/ntpdate is installed during installation 
>    /var/log/installer/syslog
>  * check new docker image

univention-base-packages is installed with recommends, so i added rdate and ntpdate as recommends in univention-basesystem and univention-role-server-common
Comment 3 Felix Botner univentionstaff 2015-10-14 10:50:21 CEST
(In reply to Felix Botner from comment #2)
> >   so we have to add them manually)
> > 
> > lets see what this does,
> >  * check if rdate, ntp and ntpdate is on the new dvd
> >  * check if rdate/ntpdate is installed during installation 
> >    /var/log/installer/syslog
> >  * check new docker image
> 
> univention-base-packages is installed with recommends, so i added rdate and
> ntpdate as recommends in univention-basesystem and
> univention-role-server-common

univention-base-packages is installed with NO recommends
Comment 4 Felix Botner univentionstaff 2015-10-14 15:31:06 CEST
I moved ntpdate/rdate back to "Depends:" in univention-basesystem and univention-role-server-common. These packages are not installed in docker images.

But during the creation of the appbox docker image with 
/usr/share/univention-docker-dev/scripts/create-docker-ucs-appbox-image.sh 4.1-0
rdate was still installed (i don't know why, there is no hard dependency).
We now explicitly remove ntpdate, ntp and rdate in 
univention-docker-dev/build/appbox-minbase/install_ucs_appbox_packages.

Appbox image: (install dudle-docker from appcenter-test)

docker-test.software-univention.de/ucs-appbox-amd64:4.1-0
Executing interface setup for dudle-docker
Joining
univention-join: joins a computer to an ucs domain
copyright (c) 2001-2015 Univention GmbH, Germany

Search DC Master:  done
Check DC Master:  done
Search ldap/base done
Search LDAP binddn  done
Sync time:  fail
Join Computer Account:  done
Check TLS connection:  done
Download host certificate:  done
Create kerberos/adminserver
File: /etc/krb5.conf
Configure 03univention-directory-listener.inst  done

DVD: 
-> find /mnt -name "ntp*.deb" -o -name "rdate*.deb"
./amd64/ntpdate_4.2.6.p5+dfsg-2.43.201506051324_amd64.deb
./amd64/ntp_4.2.6.p5+dfsg-2.43.201506051324_amd64.deb
./amd64/rdate_1.2-5.17.201403152339_amd64.deb

UCS 4.1 Installation
-> dpkg -l ntp rdate ntpdate
ii  ntp     1:4.2.6.p5+dfsg-2.43. amd64 Network Time Protoc...
ii  ntpdate 1:4.2.6.p5+dfsg-2.43. amd64 client for setting sys...
ii  rdate   1:1.2-5.17.2014031523 amd64 sets the system's date f...

Changelog: r64484
Comment 5 Stefan Gohmann univentionstaff 2015-10-19 20:57:04 CEST
OK, it looks good. Changelog OK.
Comment 6 Stefan Gohmann univentionstaff 2015-11-17 12:12:17 CET
UCS 4.1 has been released:
 https://docs.software-univention.de/release-notes-4.1-0-en.html
 https://docs.software-univention.de/release-notes-4.1-0-de.html

If this error occurs again, please use "Clone This Bug".