Skip to content

Conversation

@hjiawei
Copy link
Contributor

@hjiawei hjiawei commented Jan 7, 2026

Description

This change adds a wait for fake nodes to be populated in the shared index informer cache before start Typha autoscaler.

Speculative fix for a Typha autoscaler flake:

2026-01-06T14:40:31Z	ERROR	typha_autoscaler	Failed to autoscale typha	{"error": "not enough linux nodes to schedule typha pods on, require 1 and have 0"}
github.com/tigera/operator/pkg/controller/installation.(*typhaAutoscaler).start.func1
	/go/src/github.com/tigera/operator/pkg/controller/installation/typha_autoscaler.go:143
panic: 
	assert: mock: I don't know what to return because the method call was unexpected.
		Either do Mock.On("SetDegraded").Return(...) first, or remove the SetDegraded() call.
		This method was unexpected:
			SetDegraded(v1.TigeraStatusReason,string,<nil>,logr.Logger)
			0: "ResourceScalingError"
			1: "Failed to autoscale typha - not enough linux nodes to schedule typha pods on, require 1 and have 0"
			2: <nil>
			3: logr.Logger{sink:(*log.delegatingLogSink)(0xc0002f9c40), level:0}

Release Note

TBD

For PR author

  • Tests for change.
  • If changing pkg/apis/, run make gen-files
  • If changing versions, run make gen-versions

For PR reviewers

A note for code reviewers - all pull requests must have the following:

  • Milestone set according to targeted release.
  • Appropriate labels:
    • kind/bug if this is a bugfix.
    • kind/enhancement if this is a a new feature.
    • enterprise if this PR applies to Calico Enterprise only.

@hjiawei hjiawei marked this pull request as ready for review January 7, 2026 20:36
@hjiawei hjiawei requested a review from a team as a code owner January 7, 2026 20:36
@hjiawei
Copy link
Contributor Author

hjiawei commented Jan 7, 2026

The golang and k8s version update changes are moved to #4348. I will rebase this PR after it is merged into the main branch.

@hjiawei hjiawei force-pushed the test-util-wait-for-node-schedulable branch 2 times, most recently from 6db989d to c00ae4a Compare January 7, 2026 21:52
@hjiawei hjiawei marked this pull request as draft January 7, 2026 22:06
@hjiawei hjiawei force-pushed the test-util-wait-for-node-schedulable branch from c00ae4a to aae95d0 Compare January 7, 2026 22:50
@hjiawei hjiawei changed the title Wait for fake node to be schedulable in test utils Mark fake nodes as schedulable before starting Typha autoscaler in UT Jan 7, 2026
@hjiawei hjiawei force-pushed the test-util-wait-for-node-schedulable branch 2 times, most recently from aae95d0 to 95629e2 Compare January 8, 2026 00:25
@hjiawei hjiawei changed the title Mark fake nodes as schedulable before starting Typha autoscaler in UT Wait for informer cache to be populated before starting Typha autoscaler in UT Jan 8, 2026
@hjiawei hjiawei force-pushed the test-util-wait-for-node-schedulable branch from 95629e2 to 83ee2e4 Compare January 8, 2026 00:35
@hjiawei hjiawei marked this pull request as ready for review January 8, 2026 02:38
@hjiawei hjiawei requested a review from caseydavenport January 9, 2026 20:00
@caseydavenport
Copy link
Member

Thanks @hjiawei !

@caseydavenport caseydavenport merged commit 0495825 into tigera:master Jan 9, 2026
8 checks passed
@hjiawei hjiawei deleted the test-util-wait-for-node-schedulable branch January 9, 2026 21:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants