Skip to content

Conversation

@russellb
Copy link
Contributor

@russellb russellb commented Dec 5, 2018

openstack: Support setting network UUID via terraform variable.

Technically, network names in OpenStack are not unique.  We would
expect almost every deployment to be using a unique name for its
external network, though.

In the rare case where you must disambiguate networks, it's possible
to specify the UUID via a terraform variable.

$ env TF_VAR_openstack_external_network_id="6a32627e-d98d-40d8-9324-5da7cf1452fc" \
> bin/openshift-install create cluster

@openshift-ci-robot openshift-ci-robot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Dec 5, 2018
@openshift-ci-robot openshift-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Dec 5, 2018
@staebler
Copy link
Contributor

staebler commented Dec 8, 2018

We would expect almost every deployment to be using a unique name for its external network, though.

If this is truly the case, then we should not be adding this as an option in install-config.yml. The barrier for entry into that file should be high. The rare customer that needs to use the network UUID will need to bear the burden of manually modifying the assets generated in later stages. In the near future, there will be an installer target that creates the tfvars (JIRA 917), which the end user can modify to accomplish this.

@russellb
Copy link
Contributor Author

russellb commented Dec 8, 2018 via email

@hardys
Copy link

hardys commented Dec 17, 2018

I tested this today and it looks good - kinda unfortunate that we can't hide the name/id interface in the terraform provider or gophercloud but this seems reasonable assuming we want to enable some cases where an ID is preferred over the name.

Happy to approve but wasn't sure if we're waiting on a re-review from @staebler ?

@russellb
Copy link
Contributor Author

I was going to rework this once the "tfvars" installer target was added. Then I'd drop this from install config, and we'd just have a terraform variable you can hack in the rare case it's needed. I should probably mark this as WIP or something.

@russellb
Copy link
Contributor Author

/hold

@openshift-ci-robot openshift-ci-robot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Dec 17, 2018
@openshift-ci-robot openshift-ci-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Dec 24, 2018
@russellb russellb force-pushed the openstack-network-uuid branch from ae087dc to f9a665c Compare January 2, 2019 15:49
@openshift-ci-robot openshift-ci-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Jan 2, 2019
@wking
Copy link
Member

wking commented Jan 2, 2019

The PR and commit-message subjects seem stale since the shift to Terraform variables.

@russellb
Copy link
Contributor Author

russellb commented Jan 3, 2019

Thanks, I'll fix the PR and commit message.

I rebased just to keep the code current, but have the PR marked as blocked until the tfvars target is available which would make this usable in the way we discussed earlier in the PR.

@russellb russellb changed the title openstack: Support setting network UUID in install-config. openstack: Add a way to specify a network UUID. Jan 3, 2019
@russellb russellb force-pushed the openstack-network-uuid branch from f9a665c to 04189cf Compare January 3, 2019 16:41
@openshift-ci-robot openshift-ci-robot added size/S Denotes a PR that changes 10-29 lines, ignoring generated files. and removed size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Jan 3, 2019
Copy link
Contributor

@flaper87 flaper87 left a comment

Choose a reason for hiding this comment

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

looks good, one question inline.

Copy link
Contributor

Choose a reason for hiding this comment

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

What happens if someone "accidentally" sets both, name and id, and these 2 don't correspond to the same network? Will neutron fail or will it give precedence to the id?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I don't know for sure since I haven't tested it, but I think terraform will fail because it won't be able to find a network that matches that name + UUID. I do know that setting both works, if you set them properly.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I did test this. Terraform will fail because it can't find a matching network with that name + UUID.

@openshift-ci-robot openshift-ci-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Jan 11, 2019
@russellb russellb force-pushed the openstack-network-uuid branch from 04189cf to f6ad9ac Compare January 11, 2019 17:21
@openshift-ci-robot openshift-ci-robot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed size/S Denotes a PR that changes 10-29 lines, ignoring generated files. needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. labels Jan 11, 2019
@flaper87
Copy link
Contributor

flaper87 commented Feb 5, 2019

@russellb you planning to update this?

@russellb
Copy link
Contributor Author

russellb commented Feb 5, 2019 via email

@openshift-ci-robot openshift-ci-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Feb 9, 2019
@russellb russellb force-pushed the openstack-network-uuid branch from f6ad9ac to 3749707 Compare February 11, 2019 20:09
@openshift-ci-robot openshift-ci-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Feb 11, 2019
@russellb
Copy link
Contributor Author

/hold cancel

I think this is ready to go now. @flaper87

@openshift-ci-robot openshift-ci-robot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Feb 11, 2019
@russellb russellb force-pushed the openstack-network-uuid branch from 3749707 to ce2c18d Compare February 11, 2019 20:12
@openshift-ci-robot openshift-ci-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Feb 18, 2019
@flaper87
Copy link
Contributor

@russellb sorry it took me long to get back to this. If you do another rebase, I'll send it through. it looks good

@russellb russellb force-pushed the openstack-network-uuid branch from ce2c18d to 6f9355d Compare February 18, 2019 13:17
@openshift-ci-robot openshift-ci-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Feb 18, 2019
@russellb
Copy link
Contributor Author

@flaper87 rebase done

@flaper87
Copy link
Contributor

/lgtm

@openshift-ci-robot openshift-ci-robot added lgtm Indicates that a PR is ready to be merged. needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. labels Feb 18, 2019
Technically, network names in OpenStack are not unique.  We would
expect almost every deployment to be using a unique name for its
external network, though.

In the rare case where you must disambiguate networks, it's possible
to specify the UUID via a terraform variable.

$ env TF_VAR_openstack_external_network_id="6a32627e-d98d-40d8-9324-5da7cf1452fc" \
> bin/openshift-install create cluster
@russellb russellb force-pushed the openstack-network-uuid branch from 6f9355d to 8d0847c Compare February 25, 2019 14:02
@openshift-ci-robot openshift-ci-robot removed lgtm Indicates that a PR is ready to be merged. needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. labels Feb 25, 2019
@russellb russellb changed the title openstack: Add a way to specify a network UUID. openstack: Support setting network UUID via terraform variable. Feb 25, 2019
@flaper87
Copy link
Contributor

/lgtm

@openshift-ci-robot openshift-ci-robot added the lgtm Indicates that a PR is ready to be merged. label Feb 27, 2019
@openshift-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: flaper87, russellb

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

@flaper87
Copy link
Contributor

/test e2e-aws

@openshift-merge-robot openshift-merge-robot merged commit bf3263b into openshift:master Feb 28, 2019
wking added a commit to wking/openshift-installer that referenced this pull request Mar 5, 2019
Through c8b3b55 (Merge pull request openshift#1338 from
flaper87/sec-groups-update, 2019-05-01).

I've left 8d0847c (openstack: Support setting network UUID via
terraform variable, 2018-12-05, openshift#794) undocumented, since it seems
like an unstable-enough user-facing API approach that I don't think we
want to noise it about and deal with the fall-out when we change the
API ;).  That commit also made it into this history via 44a9cd3
(openshift#1294).

I've also left off eecf496 (openstack: remove neutron dns,
2019-02-19, openshift#1294), because I have no idea what that's about ;).  I'll
fill in an entry for it later once one of the OpenStack devs explains
it to me :p.
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. lgtm Indicates that a PR is ready to be merged. platform/openstack size/M Denotes a PR that changes 30-99 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants