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

Bug 1864120: Clean Up OpenStack IPI AZ patch #4009

Merged
merged 1 commit into from Aug 7, 2020

Conversation

iamemilio
Copy link

@iamemilio iamemilio commented Aug 4, 2020

Fixes a number of issues in the AZ patch:

  • corrects number of replicas in machineset
  • fixes bad programming conventions
  • fixes handling of empty list of available zones on cloud provider

@openshift-ci-robot openshift-ci-robot added the bugzilla/severity-medium Referenced Bugzilla bug's severity is medium for the branch this PR is targeting. label Aug 4, 2020
@openshift-ci-robot
Copy link
Contributor

@iamemilio: This pull request references Bugzilla bug 1864120, which is valid. The bug has been moved to the POST state. The bug has been updated to refer to the pull request using the external bug tracker.

3 validation(s) were run on this bug
  • bug is open, matching expected state (open)
  • bug target release (4.6.0) matches configured target release for branch (4.6.0)
  • bug is in the state NEW, which is one of the valid states (NEW, ASSIGNED, ON_DEV, POST, POST)

In response to this:

Bug 1864120: Clean Up OpenStack IPI AZ patch

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.

@openshift-ci-robot openshift-ci-robot added the bugzilla/valid-bug Indicates that a referenced Bugzilla bug is valid for the branch this PR is targeting. label Aug 4, 2020
@iamemilio
Copy link
Author

/assign @abhinavdahiya @pierreprinetti @Fedosin

@iamemilio
Copy link
Author

/label platform/openstack

@@ -214,7 +214,7 @@ func (ci *CloudInfo) getZones() ([]string, error) {
}

if len(zones) == 0 {
return []string{""}, nil
return nil, errors.New("could not find any available compute availability zones")
Copy link
Member

Choose a reason for hiding this comment

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

s/zones/zone

azString = fmt.Sprintf("-%s", az)
}

name := fmt.Sprintf("%s-%s%s", clusterID, pool.Name, azString)
Copy link
Member

Choose a reason for hiding this comment

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

The naming issue was addressed separately in #4000. Can you update your patch leaving the naming issue aside?

azString = fmt.Sprintf("-%s", az)
}

name := fmt.Sprintf("%s-%s%s", clusterID, pool.Name, azString)
Copy link
Member

Choose a reason for hiding this comment

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

The naming issue was addressed separately in #4000. Can you update your patch leaving the naming issue aside?

@openshift-ci-robot
Copy link
Contributor

@iamemilio: This pull request references Bugzilla bug 1864120, which is valid.

3 validation(s) were run on this bug
  • bug is open, matching expected state (open)
  • bug target release (4.6.0) matches configured target release for branch (4.6.0)
  • bug is in the state POST, which is one of the valid states (NEW, ASSIGNED, ON_DEV, POST, POST)

In response to this:

Bug 1864120: Clean Up OpenStack IPI AZ patch

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.

@@ -49,10 +49,16 @@ func Machines(clusterID string, config *types.InstallConfig, pool *types.Machine
if pool.Replicas != nil {
total = *pool.Replicas
}

zones := []string{""}
if len(mpool.Zones) > 0 {
Copy link
Contributor

Choose a reason for hiding this comment

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

mpool.Zones always contains at least one element. If the user doesn't define zones in the config, we set the default anyway: https://github.com/openshift/installer/blob/master/pkg/asset/machines/worker.go#L111

Copy link
Author

Choose a reason for hiding this comment

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

Oh I didn't know we did that

Copy link
Member

Choose a reason for hiding this comment

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

well it doesn't hurt right? 😁

// TODO(flaper87): Add support for availability zones
zones := []string{""}
azString := ""
if len(mpool.Zones) > 0 {
Copy link
Contributor

Choose a reason for hiding this comment

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

ditto

// Zones contains a list of availabilty zones that instances can be deployed on
//
// Zones is the list of availability zones where the instances should be deployed.
// Uses Nova default availabilityZone by default
Copy link
Contributor

Choose a reason for hiding this comment

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

This sentence is confusing... Maybe something like:
"If no zones are provided, all instances will be deployed in OpenStack Nova default availability zone."

@iamemilio iamemilio force-pushed the az_corrections branch 3 times, most recently from 7bb8ce9 to 906a619 Compare August 5, 2020 17:38
@iamemilio
Copy link
Author

Fixed it up to be compatible with some of the other patches addressing similar issues and addressing feedback

…o updates code to handle empty zones more correctly.
@iamemilio
Copy link
Author

/retest

@Fedosin
Copy link
Contributor

Fedosin commented Aug 6, 2020

/lgtm

@openshift-ci-robot openshift-ci-robot added the lgtm Indicates that a PR is ready to be merged. label Aug 6, 2020
Comment on lines +62 to +64
// check if machinepool default
if len(input) == 1 && input[0] == "" {
return field.ErrorList{}
Copy link
Contributor

Choose a reason for hiding this comment

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

does the default machine pool in install-config still have "" element in zones?

Copy link
Author

Choose a reason for hiding this comment

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

Yes, an earlier version of this patch attempted to change it to empty list, but the teams preference was to set the default like this: #4009 (comment)

@abhinavdahiya
Copy link
Contributor

/approve

@openshift-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: abhinavdahiya, pierreprinetti

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

The pull request process is described here

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

@openshift-ci-robot openshift-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Aug 6, 2020
@openshift-bot
Copy link
Contributor

/retest

Please review the full test history for this PR and help us cut down flakes.

5 similar comments
@openshift-bot
Copy link
Contributor

/retest

Please review the full test history for this PR and help us cut down flakes.

@openshift-bot
Copy link
Contributor

/retest

Please review the full test history for this PR and help us cut down flakes.

@openshift-bot
Copy link
Contributor

/retest

Please review the full test history for this PR and help us cut down flakes.

@openshift-bot
Copy link
Contributor

/retest

Please review the full test history for this PR and help us cut down flakes.

@openshift-bot
Copy link
Contributor

/retest

Please review the full test history for this PR and help us cut down flakes.

@openshift-ci-robot
Copy link
Contributor

openshift-ci-robot commented Aug 7, 2020

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

Test name Commit Details Rerun command
ci/prow/e2e-crc 5f791b3 link /test e2e-crc
ci/prow/e2e-libvirt 5f791b3 link /test e2e-libvirt
ci/prow/e2e-aws-fips 5f791b3 link /test e2e-aws-fips
ci/prow/e2e-ovirt 5f791b3 link /test e2e-ovirt
ci/prow/e2e-metal-ipi 5f791b3 link /test e2e-metal-ipi

Full PR test history. Your PR dashboard.

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.

@openshift-merge-robot openshift-merge-robot merged commit d36a371 into openshift:master Aug 7, 2020
@openshift-ci-robot
Copy link
Contributor

@iamemilio: All pull requests linked via external trackers have merged: openshift/installer#4009. Bugzilla bug 1864120 has been moved to the MODIFIED state.

In response to this:

Bug 1864120: Clean Up OpenStack IPI AZ patch

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. bugzilla/severity-medium Referenced Bugzilla bug's severity is medium for the branch this PR is targeting. bugzilla/valid-bug Indicates that a referenced Bugzilla bug is valid for the branch this PR is targeting. lgtm Indicates that a PR is ready to be merged. platform/openstack
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

7 participants