Skip to content

Add test for scaling machineSets#22544

Closed
enxebre wants to merge 1 commit intoopenshift:masterfrom
enxebre:scaling
Closed

Add test for scaling machineSets#22544
enxebre wants to merge 1 commit intoopenshift:masterfrom
enxebre:scaling

Conversation

@enxebre
Copy link
Copy Markdown
Member

@enxebre enxebre commented Apr 11, 2019

Scaling machines/nodes is a feature we support. From modifying a replica number to having a new running node there are multiple components involved: machine api, networking, container runtime, mco, etc. This is a gate to prevent any component to break this feature, e.g https://bugzilla.redhat.com/show_bug.cgi?id=1698253, https://bugzilla.redhat.com/show_bug.cgi?id=1698624

  • Get two machineSets
  • Scale current replicas of each machineSet to 3
  • Verify new nodes are created and go ready for each machineSet
  • Scale down to the original replica number
  • Verify the final number of worker nodes in the cluster match the original one

@openshift-ci-robot openshift-ci-robot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Apr 11, 2019
@enxebre
Copy link
Copy Markdown
Member Author

enxebre commented Apr 11, 2019

}

// getNodesFromMachineSet returns an array of nodes backed by machines owned by a given machineSet
func getNodesFromMachineSet(c *kubernetes.Clientset, dc dynamic.Interface, machineSetName string) ([]*corev1.Node, error) {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I don't think we should define this type of behavior here. This really belongs in one of our projects, we should consume it as a library.

@ingvagabund
Copy link
Copy Markdown
Member

What exactly is this PR supposed to avoid/support?

@enxebre
Copy link
Copy Markdown
Member Author

enxebre commented Apr 11, 2019

#22544 (comment) As the title says it "Adds test coverage for scaling machineSets" which is a feature we support in our product. From modifying a replica number to having a new running node there are multiple components involved: machine api, networking, container runtime, mco, etc. This is a gate to prevent any component to break this feature, e.g https://bugzilla.redhat.com/show_bug.cgi?id=1698624

@openshift-ci-robot
Copy link
Copy Markdown

@enxebre: The following tests failed, say /retest to rerun them all:

Test name Commit Details Rerun command
ci/prow/integration 76467a4 link /test integration
ci/prow/cmd 76467a4 link /test cmd
ci/prow/e2e-aws 76467a4 link /test e2e-aws
ci/prow/e2e-aws-serial 76467a4 link /test e2e-aws-serial

Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR.

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.

@vikaschoudhary16
Copy link
Copy Markdown
Contributor

We are already testing this in e2e-aws-operator job, https://github.com/openshift/cluster-api-actuator-pkg/blob/master/pkg/e2e/infra/infra.go#L261, but this job runs only on MAO related repos. Because e2e-aws runs over different repos that are required by installer, adding these changes here will make sure that a change in any of those repos will not break machinseset functionality.

/lgtm

@openshift-ci-robot openshift-ci-robot added the lgtm Indicates that a PR is ready to be merged. label Apr 12, 2019
}, scalingTime, 5*time.Second).Should(o.BeTrue())

// expect new nodes to come up for machineSet1
o.Eventually(func() bool {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

may be a for loop will help code reuse.

@vikaschoudhary16
Copy link
Copy Markdown
Contributor

vikaschoudhary16 commented Apr 12, 2019

tested it locally and there is an issue related to reading replica count from machinset.
/lgtm cancel

@vikaschoudhary16
Copy link
Copy Markdown
Contributor

/lgtm cancel

@openshift-ci-robot openshift-ci-robot removed the lgtm Indicates that a PR is ready to be merged. label Apr 12, 2019
@openshift-ci-robot
Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: enxebre
To fully approve this pull request, please assign additional approvers.
We suggest the following additional approver: smarterclayton

If they are not already assigned, you can assign the PR to them by writing /assign @smarterclayton in a comment when ready.

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@enxebre
Copy link
Copy Markdown
Member Author

enxebre commented Apr 15, 2019

closed by #22564

@enxebre enxebre closed this Apr 15, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size/L Denotes a PR that changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants