Conversation
db7298d
to
7ecf821
Compare
thanks @wainersm - but I think |
# By using it in an openshift daemonset it should spin forever until an | ||
# orchestrator kills it. | ||
# | ||
while true; do sleep 600; done |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We tend to prefer tail -f /dev/null
to a loop like this.
# | ||
# Synchronize the kata-containers installation with in the host filesystem. | ||
# | ||
set -x |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
set -e
(too)?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This script is going to execute in a k8s DaemonSet. If set -e
and the script fails then the pod will end up on a "unpredictable state". The mechanism I employ to verify the installation succeeded (or not) is to write the return code of kata-runtime kata-check
to /tmp/kata_install_status
then put the pod to "sleep" (tail -f /dev/null
). One control script will check the value of /tmp/kata_install_status
on each pod, if all of them was done then the daemonSet is retired.
Let me know if I am missing something here, or if you think there is a better way to implement it.
.ci/openshift-ci/README.md
Outdated
@@ -0,0 +1,3 @@ | |||
# OpenShift CI files | |||
|
|||
This directory contain scripts and files used by the openshift-ci operator to test kata. For further details read this [README](https://github.com/kata-containers/tests/tree/master/.ci/openshift-ci/README.md) file. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: very long line.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I deleted the README.md
so not need to this. :)
fi | ||
|
||
# Copy the installation over the host filesystem. | ||
rsync -a * $HOST_MOUNT |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should that be .
rather than *
in case of hidden files?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Probably better, although installing hidden files on the host is a bad idea.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah, I am not expecting hidden files but I changed as suggested in the v4 of this PR.
@wainersm thanks, but I still see the same word in your commit message |
7ecf821
to
594da37
Compare
Changes v1 -> v2:
|
please add a reference to
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks @wainersm
mount -o remount,rw $HOST_MOUNT/usr | ||
|
||
# The host's '/opt' and '/usr/local' are symlinks to, respectively, '/var/opt' | ||
# and '/var/usrlocal'. Adjust the installation files accordingly. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
typo: usrlocal -> usr/local
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually not.
[core@worker-0-0 /]$ ls -lha var/
...
drwxr-xr-x. 12 root root 126 Aug 10 20:23 usrlocal
...
That's the structure used by Red Hat CoreOS, which is used by OpenShift.
|
||
if [ -d "usr/local" ]; then | ||
mkdir -p var | ||
mv usr/local var/usrlocal |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
usrlocal -> usr/local
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
... and the same here.
# get copied. | ||
mount -o remount,rw $HOST_MOUNT/usr | ||
|
||
# The host's '/opt' and '/usr/local' are symlinks to, respectively, '/var/opt' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what about here '/usr/local' ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So, the whole idea about Red Hat CoreOS is to provide the user an immutable system, quite similar to Fedora Silverblue (https://silverblue.fedoraproject.org/) or Fedora CoreOS (https://github.com/coreos/fedora-coreos-tracker).
Those systems do have /usr
being mounted as read-only. Apart from a few "workarounds" where wouldn't be to problematic for users to override, such as /opt
or /usr/local
... those workarounds consist in having those directories being symlinks to directories under /var
, which is not read-only.
@devimc , I think I will remove the
|
594da37
to
9bc3343
Compare
v2 -> v3:
|
pushd "${tests_repo_dir}" | ||
# Resolve the kata-container repositories. It relies on branch and | ||
# kata_repo variables. | ||
export branch=master |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I still don't understand the tests scripts very well, with this you will be testing master and not the pr, is that correct ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes @devimc . For kata-1.x I will run these scripts in a nightly job, so not dealing with PRs. I will need to adapt this to kata-2.x because in this case I plan to leverage the openshift CI to test PRs as well.
# | ||
FROM centos:8 | ||
|
||
RUN yum install -y rsync |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: dnf
😄
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not on centos
image.
[root@f5018106fe91 /]# yum
Loaded plugins: fastestmirror, ovl
You need to give some command
Usage: yum [options] COMMAND
[root@f5018106fe91 /]# dnf
bash: dnf: command not found
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me. Maybe wait for @jodh-intel to ack the replies we gave. I think that @devimc is not available this week.
Thanks @c3d ! I am about to send another version with two small changes as suggested by @jodh-intel . Then we will be ready to go :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah - you get it by default, but clearly not with your image ;)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not on
centos
image.[root@f5018106fe91 /]# yum Loaded plugins: fastestmirror, ovl You need to give some command Usage: yum [options] COMMAND [root@f5018106fe91 /]# dnf bash: dnf: command not found
hmm... interesting.
On v4 of this PR I changed to centos:7 and the reason is: this image will be built in a OpenShift Build process which usually replaces the FROM
to whatever the user choose. In the case of this CI, it will use RHEL-7 so the closest we got (for the sake of debugging/development in your workstation) is centos-7.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah - right. I'd missed the downgrade to centos 7 ;)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks @wainersm
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me. Maybe wait for @jodh-intel to ack the replies we gave. I think that @devimc is not available this week.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @wainersm.
lgtm
/test |
Enable openshift-ci on runtime repository. Fixes: github.com/kata-containers/tests#2527 Depends-on: github.com/kata-containers/tests#2802 Signed-off-by: Wainer dos Santos Moschetta <wainersm@redhat.com>
9bc3343
to
598b4fe
Compare
v3 -> v4:
|
/test |
Codecov Report
@@ Coverage Diff @@
## master #2891 +/- ##
==========================================
+ Coverage 51.44% 51.67% +0.22%
==========================================
Files 118 118
Lines 17428 17438 +10
==========================================
+ Hits 8966 9011 +45
+ Misses 7379 7342 -37
- Partials 1083 1085 +2 |
The failure on the jobs aren't related with my changes. |
/test jenkins-metrics-ubuntu-18-04 |
Hi @GabyCT - it looks like Jenkins has "stalled" - could you tal please? |
/test-ubuntu |
/test |
/retest-ubuntu |
/retest-qemu-metrics |
Hi @jodh-intel , this metrics job failing seems not related with this PR. What should I do to get this merged? |
/test-ubuntu-qemu-metrics |
@wainersm Rerunning the metrics CI, since we have fixed that now. |
Enable openshift-ci on runtime repository.
Fixes: github.com/kata-containers/tests#2527
Depends-on: github.com/kata-containers/tests#2802
Signed-off-by: Wainer dos Santos Moschetta wainersm@redhat.com