Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

KinD providers: Mount the host audit logs dir to cluster nodes #716

Merged
merged 1 commit into from
Dec 16, 2021

Conversation

ormergi
Copy link
Contributor

@ormergi ormergi commented Dec 2, 2021

On Kubevirt test suite we dump various cluster object
stats, guest VM and cluster nodes logs, including auditd logs.
Currently we can't dump the audit log for KinD providers
since the cluster nodes are containers (no auditd).

In order to have audit log on KinD providers as well it
is necessary to mount the host /var/log/audit to the
cluster nodes.

Then on a test failure we will get the audit log for
the time the test were running.

Hopefully this PR will help resolving kubevirt/kubevirt#6771 and kubevirt/kubevirt#6776 as well

Signed-off-by: Or Mergi ormergi@redhat.com

On Kubevirt test suite we dump various cluster object
stats, guest VM and cluster nodes logs, including auditd logs.
Currently we can't dump the audit log for KinD providers
since the cluster nodes are containers (no auditd).

In order to have audit log on KinD providers as well it
is necessary to mount the host /var/log/audit to the
cluster nodes.

Then on a test failure we will get the audit log for
the time the test were running.

Signed-off-by: Or Mergi <ormergi@redhat.com>
@kubevirt-bot kubevirt-bot added the dco-signoff: yes Indicates the PR's author has DCO signed all their commits. label Dec 2, 2021
@ormergi
Copy link
Contributor Author

ormergi commented Dec 2, 2021

/cc @qinqon

@ormergi
Copy link
Contributor Author

ormergi commented Dec 5, 2021

/cc @enp0s3

@usrbinkat
Copy link

/cc @vladikr

@vladikr
Copy link
Member

vladikr commented Dec 15, 2021

Looks good to me, thanks @ormergi
/approve
/lgtm

@kubevirt-bot kubevirt-bot added the lgtm Indicates that a PR is ready to be merged. label Dec 15, 2021
@kubevirt-bot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: vladikr

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@kubevirt-bot kubevirt-bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Dec 15, 2021
@kubevirt-commenter-bot
Copy link

/retest
This bot automatically retries jobs that failed/flaked on approved PRs.
Silence the bot with an /lgtm cancel or /hold comment for consistent failures.

@kubevirt-bot kubevirt-bot merged commit a307ad0 into kubevirt:main Dec 16, 2021
@ormergi
Copy link
Contributor Author

ormergi commented Dec 16, 2021

Thank you 🙂

cat <<EOF >> ${KUBEVIRTCI_CONFIG_PATH}/$KUBEVIRT_PROVIDER/kind.yaml
extraMounts:
- containerPath: /var/log/audit
hostPath: /var/log/audit
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we verify that this is a read-only mount? Let's play safe.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My bad, I thought read only was the default
I fixed it here #724

kubevirt-bot added a commit to kubevirt-bot/kubevirt that referenced this pull request Dec 16, 2021
[a307ad0 KinD providers: Mount /var/log/audit to cluster nodes](kubevirt/kubevirtci#716)
[85dc9d9 CI-cluster swap support](kubevirt/kubevirtci#723)
[aa8c20b k8s-1.22-ipv6, Create single stack ipv6 k8s-1.22 provider](kubevirt/kubevirtci#721)

```release-note
NONE
```

Signed-off-by: kubevirt-bot <kubevirtbot@redhat.com>
kubevirt-bot added a commit to kubevirt-bot/kubevirt that referenced this pull request Dec 17, 2021
[d2edfe6 KinD providers: Mount audit logs as read-only](kubevirt/kubevirtci#724)
[a307ad0 KinD providers: Mount /var/log/audit to cluster nodes](kubevirt/kubevirtci#716)
[85dc9d9 CI-cluster swap support](kubevirt/kubevirtci#723)
[aa8c20b k8s-1.22-ipv6, Create single stack ipv6 k8s-1.22 provider](kubevirt/kubevirtci#721)

```release-note
NONE
```

Signed-off-by: kubevirt-bot <kubevirtbot@redhat.com>
kubevirt-bot added a commit to kubevirt-bot/kubevirt that referenced this pull request Dec 17, 2021
[d2edfe6 KinD providers: Mount audit logs as read-only](kubevirt/kubevirtci#724)
[a307ad0 KinD providers: Mount /var/log/audit to cluster nodes](kubevirt/kubevirtci#716)
[85dc9d9 CI-cluster swap support](kubevirt/kubevirtci#723)
[aa8c20b k8s-1.22-ipv6, Create single stack ipv6 k8s-1.22 provider](kubevirt/kubevirtci#721)

```release-note
NONE
```

Signed-off-by: kubevirt-bot <kubevirtbot@redhat.com>
kubevirt-bot added a commit to kubevirt-bot/kubevirt that referenced this pull request Dec 18, 2021
[d2edfe6 KinD providers: Mount audit logs as read-only](kubevirt/kubevirtci#724)
[a307ad0 KinD providers: Mount /var/log/audit to cluster nodes](kubevirt/kubevirtci#716)
[85dc9d9 CI-cluster swap support](kubevirt/kubevirtci#723)
[aa8c20b k8s-1.22-ipv6, Create single stack ipv6 k8s-1.22 provider](kubevirt/kubevirtci#721)

```release-note
NONE
```

Signed-off-by: kubevirt-bot <kubevirtbot@redhat.com>
kubevirt-bot added a commit to kubevirt-bot/kubevirt that referenced this pull request Dec 18, 2021
[d2edfe6 KinD providers: Mount audit logs as read-only](kubevirt/kubevirtci#724)
[a307ad0 KinD providers: Mount /var/log/audit to cluster nodes](kubevirt/kubevirtci#716)
[85dc9d9 CI-cluster swap support](kubevirt/kubevirtci#723)
[aa8c20b k8s-1.22-ipv6, Create single stack ipv6 k8s-1.22 provider](kubevirt/kubevirtci#721)

```release-note
NONE
```

Signed-off-by: kubevirt-bot <kubevirtbot@redhat.com>
kubevirt-bot added a commit to kubevirt-bot/kubevirt that referenced this pull request Dec 19, 2021
[d2edfe6 KinD providers: Mount audit logs as read-only](kubevirt/kubevirtci#724)
[a307ad0 KinD providers: Mount /var/log/audit to cluster nodes](kubevirt/kubevirtci#716)
[85dc9d9 CI-cluster swap support](kubevirt/kubevirtci#723)
[aa8c20b k8s-1.22-ipv6, Create single stack ipv6 k8s-1.22 provider](kubevirt/kubevirtci#721)

```release-note
NONE
```

Signed-off-by: kubevirt-bot <kubevirtbot@redhat.com>
kubevirt-bot added a commit to kubevirt-bot/kubevirt that referenced this pull request Dec 19, 2021
[d2edfe6 KinD providers: Mount audit logs as read-only](kubevirt/kubevirtci#724)
[a307ad0 KinD providers: Mount /var/log/audit to cluster nodes](kubevirt/kubevirtci#716)
[85dc9d9 CI-cluster swap support](kubevirt/kubevirtci#723)
[aa8c20b k8s-1.22-ipv6, Create single stack ipv6 k8s-1.22 provider](kubevirt/kubevirtci#721)

```release-note
NONE
```

Signed-off-by: kubevirt-bot <kubevirtbot@redhat.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. dco-signoff: yes Indicates the PR's author has DCO signed all their commits. lgtm Indicates that a PR is ready to be merged. size/XS
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants