Skip to content

Commit

Permalink
cilium-cli/connectivity: only check container restarts on v1.17+
Browse files Browse the repository at this point in the history
f900d93 ("cilium-cli/connectivity: additionally check for container
restarts") introduced a new check to the connectivity suite to validate
that no Cilium-related pods have a container restart count greater than
zero. However, this check is getting triggered way more than expected
on older stable branches. Let's temporarily enable it only for Cilium
v1.17 and later, while the discovered failures get investigated.

Signed-off-by: Marco Iorio <marco.iorio@isovalent.com>
  • Loading branch information
giorio94 committed Feb 25, 2025
1 parent dad48e4 commit a03df46
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion cilium-cli/connectivity/tests/errors.go
Original file line number Diff line number Diff line change
Expand Up @@ -93,13 +93,15 @@ func NoErrorsInLogs(ciliumVersion semver.Version, checkLevels []string, external
return &noErrorsInLogs{
errorMsgsWithExceptions: errorMsgsWithExceptions,
ScenarioBase: check.NewScenarioBase(),
ciliumVersion: ciliumVersion,
}
}

type noErrorsInLogs struct {
check.ScenarioBase

errorMsgsWithExceptions map[string][]logMatcher
ciliumVersion semver.Version
}

func (n *noErrorsInLogs) Name() string {
Expand All @@ -125,10 +127,13 @@ func (n *noErrorsInLogs) Run(ctx context.Context, t *check.Test) {
for container, restarts := range info.containers {
id := fmt.Sprintf("%s/%s/%s (%s)", pod.Cluster, pod.Namespace, pod.Name, container)
t.NewGenericAction(n, id).Run(func(a *check.Action) {
// Do not check for container restarts for Cilium v1.16 and earlier.
ignore := n.ciliumVersion.LT(semver.MustParse("1.17.0"))

// Ignore Cilium operator restarts for the moment, as they can
// legitimately happen in case it loses the leader election due
// to temporary control plane blips.
ignore := container == "cilium-operator"
ignore = ignore || container == "cilium-operator"

// The hubble relay container can currently be restarted by the
// startup probe if it fails to connect to Cilium. However, this
Expand Down

0 comments on commit a03df46

Please sign in to comment.