-
Notifications
You must be signed in to change notification settings - Fork 6.5k
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
[Openstack] master foreach and fixes #8709
[Openstack] master foreach and fixes #8709
Conversation
Hi @robinAwallace. Thanks for your PR. I'm waiting for a kubernetes-sigs member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. 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. |
f8e03c0
to
167c26e
Compare
Nice work @robinAwallace ! /ok-to-test |
@robinAwallace I see the elastix CI job is still failing: https://gitlab.com/kargo-ci/kubernetes-sigs-kubespray/-/jobs/2329389057 ; am I wrong in assuming that this change should have addressed that openstack failure as well ? |
@cristicalin Yes it should fix it. By setting |
@@ -68,6 +68,14 @@ variable "network_id" { | |||
default = "" | |||
} | |||
|
|||
variable "use_existing_network" { | |||
type = bool |
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.
I'm guessing this should have a default to false
.
In this case I think this should be the default, no? I'm not sure how terraform initialises boolean variables without a default, maybe that explains the CI failure. |
variable "use_existing_network" { | ||
description = "Use a existing network" | ||
type = bool | ||
default = "true" |
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.
@cristicalin default to true here (regarding your question about use_existing_network, as terraform don't init var, but fail if no defaults)
I can switch it so default false. If that will solve the pipeline issue. |
I'm not sure, default to true seems fine, but setting it to false for the elastx job maybe 😄 |
Okay, will update it 🙂 |
61cc623
to
ddff56b
Compare
In public clouds I think the safest approach is |
@cristicalin Im open to have it |
ddff56b
to
e25f438
Compare
@cristicalin @floryut |
e25f438
to
4af318e
Compare
Thanks for fixing this @robinAwallace ! /approve |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: cristicalin, robinAwallace 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 |
/lgtm |
1 similar comment
/lgtm |
With a default of false it seems this has caused a change in behaviour. Previously you could just set |
Also doesn't use_existing_network have effectively the same function as use_neutron already had? |
Hi @rptaylor, that was unfortunate that neutron and network name was missed. As you said it was not documented 😞 |
This seems to change the mapping of ports to nodes, which causes Terraform to destroy and rebuild all nodes of an existing cluster after upgrading to Kubespray 2.19. This is very disruptive. I won't be able to manage my clusters with Terraform anymore (e.g. scale up/down nodes, modify security groups etc.) unless I destroy and rebuild them all from scratch. If I do
As for use_neutron, it looks like that is used to determine whether to create a router and subnet etc (contrib/terraform/openstack/modules/network/main.tf) whereas use_existing_network mainly handles setting up the ports for the nodes, so I guess both are still needed - or the new use_existing_network variable could be expanded to replace the remaining functionality of use_neutron. |
Right, this version was really distributive for openstack. We really maintain our own wrapper around kubespray, with some migration scripts. You can find how we migrated our openstack terraform state to the new version here Note that our migration script expects two clusters. But you could extract the bash script to work for one cluster. |
* [openstack] fix for new network modules * [openstack] for-each master nodes
* [openstack] fix for new network modules * [openstack] for-each master nodes
What type of PR is this?
/kind feature
What this PR does / why we need it:
use_existing_network
.port_security
to null withforce_null_port_security
. Some clouds do not allow to set this variable.depends_on
for port when attaching floating ip. For some clouds the port needs afixed_ip
before attaching afloating_ip
.for_each
. Easier to switch out a master.Which issue(s) this PR fixes:
Fixes #8696
Special notes for your reviewer:
It started of with just adding
for_each
for master nodes but ended yup fixing some other issues.Does this PR introduce a user-facing change?: