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

[Flaky Test] pull-gardener-extension-shoot-rsyslog-relp-e2e-kind fails due to rsyslog not getting configured properly #197

Open
plkokanov opened this issue Nov 20, 2024 · 0 comments
Labels
area/testing Testing related kind/flake Tracking or fixing a flaky test priority/3 Priority (lower number equals higher priority)

Comments

@plkokanov
Copy link
Collaborator

How to categorize this issue?

/area testing
/kind flake

Which test(s)/suite(s) are flaking:
pull-gardener-extension-shoot-rsyslog-relp-e2e-kind

CI link:
https://prow.gardener.cloud/view/gs/gardener-prow/pr-logs/pull/gardener_gardener-extension-shoot-rsyslog-relp/193/pull-gardener-extension-shoot-rsyslog-relp-e2e-kind/1854625576917143552

Reason for failure:
Checking whether rsyslog is properly started and configured on the shoot's nodes failed with:

• [FAILED] [469.209 seconds]
Shoot Rsyslog Relp Extension Tests [It] Create Shoot with shoot-rsyslog-relp extension enabled and force delete Shoot [force-delete]
/home/prow/go/src/github.com/gardener/gardener-extension-shoot-rsyslog-relp/test/e2e/create_enable_force_delete.go:24
  ...
  ...
  ...
  [FAILED] Timed out after 60.001s.
  The function passed to Eventually failed at /home/prow/go/src/github.com/gardener/gardener-extension-shoot-rsyslog-relp/test/common/verifier.go:114 with:
  Expected the /etc/rsyslog.d/60-audit.conf file to exist and the rsyslog service to be active on node machine-shoot--local--e2e-rslog-fd-local-64477-sjbq7
  Expected
      <string>: not configured\n
  to equal
      <string>: configured\n
  In [It] at: /home/prow/go/src/github.com/gardener/gardener-extension-shoot-rsyslog-relp/test/e2e/create_enable_force_delete.go:50 @ 11/07/24 21:20:53.796

The tests check if the rsyslog service is properly configured by checking if the /etc/rsyslog.d/60-audit.conf file exists and the rsyslog service is started:

EventuallyWithOffset(2, func(g Gomega) {
response, _ := ExecCommand(ctx, v.log, v.rootPodExecutor, "sh -c 'test -f /etc/rsyslog.d/60-audit.conf && systemctl is-active rsyslog.service' &>/dev/null && echo 'configured' || echo 'not configured'")
g.Expect(string(response)).To(Equal("configured\n"), fmt.Sprintf("Expected the /etc/rsyslog.d/60-audit.conf file to exist and the rsyslog service to be active on node %s", v.nodeName))
}).WithTimeout(1 * time.Minute).WithPolling(10 * time.Second).WithContext(ctx).Should(Succeed())

This file is created by a the configure-rsyslog.tpl.sh script only if the rsyslog service is installed on the node.

This installation of the rsyslog service is done by the following code:

By("Install rsyslog-relp unit on Shoot nodes")
common.ForEachNode(ctx, f.ShootFramework.ShootClient, func(ctx context.Context, node *corev1.Node) {
installRsyslogRelp(ctx, f.Logger, f.ShootFramework.ShootClient, node.Name)
})

According to the node logs, rsyslog-relp was installed at 2024-11-07 21:19:42

Start-Date: 2024-11-07  21:19:42
Commandline: apt-get install -y rsyslog-relp
Install: libidn12:amd64 (1.41-1, automatic), libpopt0:amd64 (1.19+dfsg-1, automatic), liblockfile-bin:amd64 (1.17-1+b1, automatic), logrotate:amd64 (3.21.0-1, automatic), exim4-config:amd64 (4.96-15+deb12u5, automatic), libfastjson4:amd64 (1.2304.0-1, automatic), psmisc:amd64 (23.6-1, automatic), exim4-base:amd64 (4.96-15+deb12u5, automatic), librelp0:amd64 (1.11.0-1, automatic), rsyslog:amd64 (8.2302.0-1, automatic), libevent-2.1-7:amd64 (2.1.12-stable-8, automatic), libunbound8:amd64 (1.17.1-2+deb12u2, automatic), liblognorm5:amd64 (2.0.6-4, automatic), libestr0:amd64 (0.1.11-1, automatic), cron-daemon-common:amd64 (3.0pl1-162, automatic), exim4-daemon-light:amd64 (4.96-15+deb12u5, automatic), bsd-mailx:amd64 (8.1.2-0.20220412cvs-1, automatic), cron:amd64 (3.0pl1-162, automatic), rsyslog-relp:amd64 (8.2302.0-1), liblockfile1:amd64 (1.17-1+b1, automatic), libgnutls-dane0:amd64 (3.7.9-2+deb12u3, automatic)

However, the configure-rsyslog.tpl.sh was still detecting it as not installed for a very long time (more than 10 minutes)

Nov 07 21:32:30 machine-shoot--local--e2e-rslog-fd-local-64477-sjbq7 configure-rsyslog.sh[23550]: auditd.service is not installed, skipping configuration
Nov 07 21:32:30 machine-shoot--local--e2e-rslog-fd-local-64477-sjbq7 configure-rsyslog.sh[23550]: rsyslog.service and syslog.service are not installed, skipping configuration

Anything else we need to know:
N/A

@gardener-prow gardener-prow bot added area/testing Testing related kind/flake Tracking or fixing a flaky test labels Nov 20, 2024
@plkokanov plkokanov changed the title [Flaky Test] pull-gardener-extension-shoot-rsyslog-relp-e2e-kind [Flaky Test] pull-gardener-extension-shoot-rsyslog-relp-e2e-kind fails due to rsyslog not getting configured properly Nov 21, 2024
@plkokanov plkokanov added the priority/3 Priority (lower number equals higher priority) label Dec 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/testing Testing related kind/flake Tracking or fixing a flaky test priority/3 Priority (lower number equals higher priority)
Projects
None yet
Development

No branches or pull requests

1 participant