Skip to content
This repository has been archived by the owner on Jan 11, 2023. It is now read-only.

fixing agent pool upgrade logic #1858

Merged
merged 8 commits into from
Dec 1, 2017
Merged

fixing agent pool upgrade logic #1858

merged 8 commits into from
Dec 1, 2017

Conversation

dmitsh
Copy link

@dmitsh dmitsh commented Nov 30, 2017

fixing agent pool upgrade logic

  • checking provisioning state of existing VMs
  • do not create extra VM if all nodes have been already upgraded
  • adding more logs

@ghost ghost assigned dmitsh Nov 30, 2017
@ghost ghost added the in progress label Nov 30, 2017
@weinong
Copy link
Contributor

weinong commented Nov 30, 2017

can we add tests?

switch vmProvisioningState {
case "Creating":
fallthrough
case "Updating":
Copy link
Contributor

Choose a reason for hiding this comment

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

these can be written more compactly:
case "Creating", "Updating", "Succeeded":
Really a matter of choice though. @jackfrancis @amanohar any opinion on which style we want?

Copy link
Member

Choose a reason for hiding this comment

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

+1 for the succinct style. See the "Multiple Cases" here:

https://github.com/golang/go/wiki/Switch

Copy link
Author

Choose a reason for hiding this comment

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

sure, I will change that.

@dmitsh
Copy link
Author

dmitsh commented Nov 30, 2017

@weinong We would need to overhaul current ARM simulation framework. I will create a task and we will do that in a separate PR.

JackQuincy
JackQuincy previously approved these changes Dec 1, 2017
Copy link
Contributor

@JackQuincy JackQuincy left a comment

Choose a reason for hiding this comment

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

First pass LGTM. I'm assuming you tested the change in the bug scenario

case <-timeoutTimer.C:
retryTimer.Stop()
kan.logger.Errorf("Node was not ready within %v", timeout)
return fmt.Errorf("Node was not ready within %v", timeout)
Copy link
Contributor

Choose a reason for hiding this comment

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

[nit] err := fmt.Errorf("Node was not ready within %v", timeout")
kan.logger.Error(err.Error())
return err

Copy link
Contributor

@JackQuincy JackQuincy left a comment

Choose a reason for hiding this comment

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

LGTM reup

@dmitsh dmitsh merged commit a61916f into Azure:master Dec 1, 2017
@ghost ghost removed the in progress label Dec 1, 2017
@dmitsh dmitsh deleted the ds-upgrade-fix branch December 5, 2017 16:47
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants