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
Bug 1864120: Clean Up OpenStack IPI AZ patch #4009
Conversation
@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
In response to this:
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. |
/assign @abhinavdahiya @pierreprinetti @Fedosin |
/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") |
There was a problem hiding this comment.
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) |
There was a problem hiding this comment.
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) |
There was a problem hiding this comment.
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?
df7f643
to
665730b
Compare
@iamemilio: This pull request references Bugzilla bug 1864120, which is valid. 3 validation(s) were run on this bug
In response to this:
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. |
665730b
to
dc057d7
Compare
@@ -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 { |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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 { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ditto
pkg/types/openstack/machinepool.go
Outdated
// 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 |
There was a problem hiding this comment.
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."
7bb8ce9
to
906a619
Compare
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.
906a619
to
5f791b3
Compare
/retest |
/lgtm |
// check if machinepool default | ||
if len(input) == 1 && input[0] == "" { | ||
return field.ErrorList{} |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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)
/approve |
[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 |
/retest Please review the full test history for this PR and help us cut down flakes. |
5 similar comments
/retest Please review the full test history for this PR and help us cut down flakes. |
/retest Please review the full test history for this PR and help us cut down flakes. |
/retest Please review the full test history for this PR and help us cut down flakes. |
/retest Please review the full test history for this PR and help us cut down flakes. |
/retest Please review the full test history for this PR and help us cut down flakes. |
@iamemilio: The following tests failed, say
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. |
@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:
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. |
Fixes a number of issues in the AZ patch: