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

Worker upgrading seems to cordon all the nodes at once #670

Closed
kke opened this issue Mar 25, 2024 · 1 comment · Fixed by #672
Closed

Worker upgrading seems to cordon all the nodes at once #670

kke opened this issue Mar 25, 2024 · 1 comment · Fixed by #672
Labels
bug Something isn't working

Comments

@kke
Copy link
Contributor

kke commented Mar 25, 2024

There should be batching and I'm almost sure there used to be, I think it may have been lost with the dry-run mechanism.

@kke kke added the bug Something isn't working label Mar 25, 2024
@kke
Copy link
Contributor Author

kke commented Mar 28, 2024

Actually it is still there:

func (p *UpgradeWorkers) Run() error {
	if err := p.hosts.Each(p.cordonWorker); err != nil {
		return err
	}

	// Upgrade worker hosts parallelly in 10% chunks
	concurrentUpgrades := int(math.Floor(float64(len(p.hosts)) * 0.10))
	if concurrentUpgrades == 0 {
		concurrentUpgrades = 1
	}

	log.Infof("Upgrading max %d workers in parallel", concurrentUpgrades)
	return p.hosts.BatchedParallelEach(concurrentUpgrades,
		p.start,
		p.cordonWorker,
		p.drainWorker,
		p.upgradeWorker,
		p.uncordonWorker,
		p.finish,
	)
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant