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

LBaaS v2 Support for Openstack Cloud Provider Plugin #25987

Merged
merged 2 commits into from
Jun 10, 2016

Conversation

dagnello
Copy link
Contributor

Resolves #19774.

This work is based on Gophercloud support for LBaaS v2 currently in review (this will have to merge first):
rackspace/gophercloud#575

These changes includes the addition of a new loadbalancer configuration option: LBVersion. If this configuration attribute is missing or anything other than "v2", lbaas v1 implementation will be used.

@k8s-bot
Copy link

k8s-bot commented May 20, 2016

Can one of the admins verify that this patch is reasonable to test? If so, please reply "ok to test".
(Note: "add to whitelist" is no longer supported. Please update configurations in kubernetes/test-infra/jenkins/job-configs/kubernetes-jenkins-pull instead.)

This message may repeat a few times in short succession due to jenkinsci/ghprb-plugin#292. Sorry.

Otherwise, if this message is too spammy, please complain to ixdy.

2 similar comments
@k8s-bot
Copy link

k8s-bot commented May 20, 2016

Can one of the admins verify that this patch is reasonable to test? If so, please reply "ok to test".
(Note: "add to whitelist" is no longer supported. Please update configurations in kubernetes/test-infra/jenkins/job-configs/kubernetes-jenkins-pull instead.)

This message may repeat a few times in short succession due to jenkinsci/ghprb-plugin#292. Sorry.

Otherwise, if this message is too spammy, please complain to ixdy.

@k8s-bot
Copy link

k8s-bot commented May 20, 2016

Can one of the admins verify that this patch is reasonable to test? If so, please reply "ok to test".
(Note: "add to whitelist" is no longer supported. Please update configurations in kubernetes/test-infra/jenkins/job-configs/kubernetes-jenkins-pull instead.)

This message may repeat a few times in short succession due to jenkinsci/ghprb-plugin#292. Sorry.

Otherwise, if this message is too spammy, please complain to ixdy.

@k8s-github-robot k8s-github-robot added size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. release-note-label-needed labels May 20, 2016
return nil, err
}

waitLoadbalancerActiveProvisioningStatus(lbaas.network, loadbalancer.ID)
Copy link
Member

Choose a reason for hiding this comment

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

Are all these waitLoadbalancerActiveProvisioningStatus calls required before proceeding to each next step? If so, that's a shame :(

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yeah, unfortunately anytime a change is made to a component, the respective load balancer changes state to "... pending". During this time, any changes made will return with failure bc the load balancer state is not ACTIVE

Choose a reason for hiding this comment

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

Does the underlying library have a equivalent of --wait that does this under the covers?

Copy link
Member

Choose a reason for hiding this comment

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

There is https://godoc.org/github.com/rackspace/gophercloud#WaitFor, but it doesn't do anything more magic than repeatedly polling until a provided predicate returns true (so very similar to waitLoadbalancerActiveProvisioningStatus)

@anguslees
Copy link
Member

lgtm, nice work.

My only high-level comment is that it'd be nice to automatically determine v1 vs v2 by querying available neutron extensions (use v2 if available, fallback to v1) - rather than force deployers to have to specify.

@dagnello
Copy link
Contributor Author

Thanks @anguslees. Ok, that would be nice, let me look into that. If it's small enough I can include it as part of this PR, otherwise I can address in a separate PR.

@dagnello dagnello force-pushed the openstack-lbaas-v2 branch from 0c1a9a9 to cc915fa Compare May 24, 2016 22:57
@k8s-github-robot k8s-github-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label May 28, 2016
@@ -1,5 +1,5 @@
/*
Copyright 2014 The Kubernetes Authors All rights reserved.
Copyright 2016 The Kubernetes Authors All rights reserved.
Copy link
Member

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 want to change this.

@mikedanese
Copy link
Member

@k8s-bot ok to test

@mikedanese
Copy link
Member

mikedanese commented May 31, 2016

I'm happy to merge once nits are addressed assuming CI passes, sorry for the delay @dagnello

@sputnik13 sputnik13 force-pushed the openstack-lbaas-v2 branch from cc915fa to 14025be Compare June 1, 2016 23:41
@googlebot
Copy link

We found a Contributor License Agreement for you (the sender of this pull request) and all commit authors, but as best as we can tell these commits were authored by someone else. If that's the case, please add them to this pull request and have them confirm that they're okay with these commits being contributed to Google. If we're mistaken and you did author these commits, just reply here to confirm.

@googlebot googlebot added cla: no and removed cla: yes labels Jun 1, 2016
@k8s-github-robot k8s-github-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Jun 1, 2016
@sputnik13 sputnik13 force-pushed the openstack-lbaas-v2 branch from acf9d82 to ddf3b46 Compare June 1, 2016 23:50
@sputnik13
Copy link

sputnik13 commented Jun 1, 2016

@googlebot We did author this pull request

yeah this doesn't seem to do anything, how do we get rid of that cla:no, I signed both corporate and individual CLAs... I have all the CLAs

@sputnik13 sputnik13 force-pushed the openstack-lbaas-v2 branch from ddf3b46 to bc5c3ac Compare June 2, 2016 00:36
@mikedanese
Copy link
Member

@sputnik13 we can human verify. It's not a problem.

@sputnik13
Copy link

sputnik13 commented Jun 2, 2016

@mikedanese that sounds good, thanks. I just realized we didn't address your comment about changing the copyright date. Should it be 2014-2016 instead of just 2016, or do you want it to stay 2014? It's been standard practice on our team to update copyright notices to include the year that it was last updated. I think that's why @dagnello updated that, but we'd be fine with following the standard practice of the k8s community.

@sputnik13 sputnik13 force-pushed the openstack-lbaas-v2 branch from f1c3e35 to 3348b3b Compare June 3, 2016 04:23
@k8s-github-robot k8s-github-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Jun 3, 2016
@googlebot
Copy link

CLAs look good, thanks!

@dagnello
Copy link
Contributor Author

dagnello commented Jun 8, 2016

@lavalamp @mikedanese updated

@feiskyer
Copy link
Member

feiskyer commented Jun 8, 2016

LGTM.

@dagnello
Copy link
Contributor Author

dagnello commented Jun 8, 2016

@lavalamp @mikedanese any other updates required?

@mikedanese
Copy link
Member

LGTM still

@mikedanese mikedanese added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Jun 8, 2016
@k8s-github-robot k8s-github-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Jun 9, 2016
@dagnello dagnello force-pushed the openstack-lbaas-v2 branch from fc256c4 to bb1ae12 Compare June 9, 2016 01:17
@k8s-github-robot k8s-github-robot removed lgtm "Looks good to me", 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 Jun 9, 2016
@k8s-bot
Copy link

k8s-bot commented Jun 9, 2016

GCE e2e build/test passed for commit bb1ae12.

@mikedanese mikedanese added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Jun 9, 2016
@mikedanese
Copy link
Member

@k8s-bot node e2e test this please, issue: #IGNORE

@dagnello
Copy link
Contributor Author

dagnello commented Jun 9, 2016

@mikedanese build test failed with error: failed: No test report files were found. Configuration error?
is this error related to my changes?

@mikedanese
Copy link
Member

this is almost certainly a flake

@k8s-bot node e2e test this please, issue: #IGNORE

@k8s-github-robot
Copy link

Automatic merge from submit-queue

@k8s-github-robot k8s-github-robot merged commit cbde2ec into kubernetes:master Jun 10, 2016
waitLoadbalancerActiveProvisioningStatus(lbaas.network, loadbalancer.ID)

_, err = v2_pools.CreateAssociateMember(lbaas.network, pool.ID, v2_pools.MemberCreateOpts{
Name: name,
Copy link
Contributor

Choose a reason for hiding this comment

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

there is no name for pool members according to https://wiki.openstack.org/wiki/Neutron/LBaaS/API_2.0#Add_a_New_Member_to_a_Pool, I got the error "create failed (client error): Unrecognized attribute(s) 'name'" when creating a service.

I had to remove this line to be able to successfully create a service with lbv2 on openstack liberty

Copy link
Contributor

Choose a reason for hiding this comment

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

Perhaps member's name is supported in Mitaka and beyond. Can you verify this?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This works for latest/Mitaka but will remove it so this will work for liberty as well.

@tybritten
Copy link

Do you think the plugin should ask for a default security group id? Once the LB is created for the service, a security group has to be applied to the LB VIP port manually via neutron.

@tybritten
Copy link

Currently in LBaaS in openstack (v1 and v2), it put the LBaaS port in the default security group only. Most environments have that set not to allow any traffic. There's a bug open to ask for a security group when creating an LB, but it hasn't gone anywhere. This means if you use this plugin with kubernetes, it with create the LB and assign a floating ip, but no one will be able to access it. the best fix is allow the config file to specify a security group id- the plugin would get the port_id of the LB after its created and then use update-port (http://gophercloud.io/docs/networking/#update-port) to add the security group to the port. if no security group was supplied in the config file it would behave as it does now.

@dagnello
Copy link
Contributor Author

@vmtyler that looks like a good extension of the current implementation. Can you raise an issue in Kubernetes for this?

@tybritten
Copy link

tybritten commented Jul 28, 2016

yes, will do now.

#29745

k8s-github-robot pushed a commit that referenced this pull request Sep 7, 2016
Automatic merge from submit-queue

Openstack heat network

add lbaas subnet and floating network configuration
support lbaas v2
add environment variable for fixed network
~~fix lb creation failed because of no 'name' for pool members according to lbaas v2 api~~ #27810

#25987 
@dagnello @lavalamp @mikedanese

[![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/.github/PULL_REQUEST_TEMPLATE.md?pixel)]()
dims pushed a commit to dims/kubernetes that referenced this pull request Feb 8, 2018
Automatic merge from submit-queue

LBaaS v2 Support for Openstack Cloud Provider Plugin

Resolves kubernetes#19774.

This work is based on Gophercloud support for LBaaS v2 currently in review (this will have to merge first):
rackspace/gophercloud#575

These changes includes the addition of a new loadbalancer configuration option:  **LBVersion**.  If this configuration attribute is missing or anything other than "v2", lbaas v1 implementation will be used.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
lgtm "Looks good to me", indicates that a PR is ready to be merged. release-note Denotes a PR that will be considered when it comes time to generate release notes. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.