chrony: Configure chrony to start only when /dev/ptp0 exists.#265
Conversation
rootfs-builder/rootfs.sh
Outdated
| chrony_systemd_service="${ROOTFS_DIR}/lib/systemd/system/chrony.service" | ||
| fi | ||
|
|
||
| sed -i 's/^Unit/&ConditionPathExists=/dev/ptp0/' ${chrony_systemd_service} |
There was a problem hiding this comment.
Is this going to work as you have slashes in the replacement text? Maybe:
sed -i 's!^Unit!&ConditionPathExists=/dev/ptp0!' ${chrony_systemd_service}There was a problem hiding this comment.
@jodh-intel Looks like I missed pushing my latest changes. I have addressed this. PTAL.
0e1b0eb to
7727f3b
Compare
|
/test |
rootfs-builder/rootfs.sh
Outdated
| chrony_systemd_service="${ROOTFS_DIR}/lib/systemd/system/chrony.service" | ||
| fi | ||
|
|
||
| sed -i '/^\[Unit\]/a ConditionPathExists=\/dev\/ptp0' ${chrony_systemd_service} |
There was a problem hiding this comment.
Responding to @jcvenegas's thought about creating our own unit, I think the way systemd expects use to handle this is by using a snippet. Something like:
$ sudo mkdir -p /etc/systemd/system/chronyd.service.d/
$ cat <<EOT | sudo tee /etc/systemd/system/chronyd.service.d/condition-path-exists.conf
[Unit]
ConditionPathExists=/dev/ptp0
EOTThere was a problem hiding this comment.
Nice alternative, just wonder if this could be distro agnostic better! :)
|
Hi~ all @jodh-intel @amshinde Since |
|
@grahamwhaley I'm not sure that I have the authority to do this job and is there any tutorial?? 😢 sooooorry, I'm a really rookie in this field. |
|
Hi @Pennyzct - ah, indeed, you have to be in the github kata 'jenkins-admin' team to have jenkins master superpowers.... If you would like to join the admin team, let's discuss with @chavafg
There are a few special corner cases, such as all jobs probably mention the test repo at some point in their configuration, and when configuring a job for the test repo you need to stare harder to make sure they are all correct :-) But mostly it is a copy/paste/edit of an existing job. Let me go make an ARM osbuilder job for you... |
|
OK @Pennyzct - job created: http://jenkins.katacontainers.io/job/kata-containers-osbuilder-ARM-18.04-PR/ |
|
and then one triggered anyway - let's see how this goes @Pennyzct http://jenkins.katacontainers.io/job/kata-containers-osbuilder-ARM-18.04-PR/2/console |
|
@amshinde can you add a |
7727f3b to
4fce094
Compare
|
/test |
|
@grahamwhaley thanks for the detailed instruction and the created ARM osbuilder job. ;). happy to have the super power, 嘿嘿🤩. |
|
CI appears to hate your PR, @amshinde |
|
@egernst Yes, all of them seem to be failing for different reasons. |
4fce094 to
9c97548
Compare
|
/test |
|
Hi~ @amshinde Does it need to be re-based? @grahamwhaley @chavafg |
|
@Pennyzct hmm, not sure. Only thing I can think of maybe is if the ARM jenkins slave is not clearing out its workspace, or is using a GOPATH/git repo that is outside of the jenkins WORKSPACE path, so maybe it is trying to pull on an old tree or something?? Any chance you can try to reproduce by hand @Pennyzct ? |
|
@jcvenegas @chavafg I need your help here. I am seeing this error in the CI: When I run the ci locally as The failure being: |
|
@amshinde trying to reproduce... will get back when I have something. The CI failure means that the |
9c97548 to
a42c651
Compare
|
/test |
7e6912c to
e31e4f9
Compare
|
/test |
|
I think the Travis job is failing here (but don't know why): |
|
Buried in the proxy log artifact in Jenkins, I found this: /cc @amshinde |
|
@amshinde - any progress on debugging this issue? |
|
@jodh-intel Thanks for your pointer. I havent had the chance to look a great deal at this yesterday. I'll try to debug this today. So, it looks like this is failing on the master as well. |
@amshinde in case you missed, #319 should be the fix for this. |
e31e4f9 to
7d615f1
Compare
|
/test |
Hypercall to implement virtual PTP was introduced in kernel 4.10 Have chrony run only if the device created by kvm-ptp exists. Add this as a ConditionExists in the systemd service file. This service if named as chrony.service in deb based distributions rather than chronyd.service, although a systemd alias exists. However it is not possible to come up with a generic `PATH` systemd unit relying on the alias. Fixes kata-containers#308 Signed-off-by: Archana Shinde <archana.m.shinde@intel.com>
7d615f1 to
d2e80f5
Compare
|
/test |
commit 39370c2(https://github.com/kata-containers/osbuilder/commit/ 39370c2) has accidentally deleted the content in PR#265(kata-containers#265). Here, I just re-patch PR#265 on the latest master code. Fixes: kata-containers#338 Signed-off-by: Archana Shinde <archana.m.shinde@intel.com> Signed-off-by: Penny Zheng <penny.zheng@arm.com>
Hypercall to implement virtual PTP was introduced in kernel 4.10
Have chrony run only if the device created by kvm-ptp exists.
Add this as a ConditionExists in the systemd service file.
This service if named as chrony.service in deb based distributions
rather than chronyd.service, although a systemd alias exists.
However it is not possible to come up with a generic
PATHsystemdunit relying on the alias.
Signed-off-by: Archana Shinde archana.m.shinde@intel.com