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

discovery/lxd: Remove lxdhelpers #113

Merged
merged 2 commits into from
Oct 20, 2017
Merged

Conversation

jtopjian
Copy link
Contributor

This commit removes the dependency of the external lxdhelpers package. The core functionality of the lxdhelpers package has been integrated into the upstream LXD client API and so the lxdhelpers package is no longer useful.

The additional functions that are added are specific to the LXD discovery plugin - it does not make sense to abstract them into an external package.

Also, Travis has been modified to no longer install the libacl1-dev package since this was resolved a month ago (#105).

Just like with #102, I have Terraform configurations here which can help with testing. At a minimum, the deploy.sh script can be used to easily create an LXD+gobetween environment.

This commit removes the dependency of the external lxdhelpers
package. The core functionality of the lxdhelpers package has
been integrated into the upstream LXD client API and so the
lxdhelpers package is no longer useful.
This commit removes the installation of libacl1-dev from
Travis since libacl1-dev is no longer required to build
gobetween/lxd.
@yyyar
Copy link
Owner

yyyar commented Oct 19, 2017

Hi @jtopjian, thanks for the PR!

Unfortunately I don't have enough time to do extensive testing by myself. Your changes look good and I can't see any problems there and to speed up the process, please just confirm you tested it on your envs both with https and non-https, and it works, and I'll be happy to merge!

@jtopjian
Copy link
Contributor Author

@yyyar No problem at all.

I've tested this to the best of my ability and all looks good. Here's some debug output from a recent test balancing two containers:

2017-10-20 03:56:01 [INFO ] (manager): Initializing...
2017-10-20 03:56:01 [INFO ] (server): Creating 'web_servers': :80 weight lxd none
2017-10-20 03:56:01 [INFO ] (scheduler): Starting scheduler
2017-10-20 03:56:01 [INFO ] (api): Starting up API
2017-10-20 03:56:01 [INFO ] (api): Using HTTP Basic Auth
2017-10-20 03:56:01 [INFO ] (api): Starting HTTP server :8888
2017-10-20 03:56:01 [INFO ] (manager): Initialized
2017-10-20 03:56:01 [DEBUG] (lxdBuildConfig): Using API: https://gb:8443
2017-10-20 03:56:01 [DEBUG] (lxdBuildClient): Generating LXD client certificates
2017-10-20 03:56:05 [DEBUG] (lxdBuildClient): Retrieving LXD server certificate
2017-10-20 03:56:05 [INFO ] (lxdBuildClient): Authenticating to LXD server
2017-10-20 03:56:05 [INFO ] (lxdBuildClient): Authentication successful
2017-10-20 03:56:05 [DEBUG] (lxdBuildConfig): Using API: https://gb:8443
2017-10-20 03:56:05 [DEBUG] (lxdFetch): Fetching containers from https://gb:8443
2017-10-20 03:56:12 [DEBUG] (server.handle [:80]): Accepted 127.0.0.1:47086 -> [::]:80
2017-10-20 03:56:12 [DEBUG] (server.handle [:80]): Begin 127.0.0.1:47086 -> [::]:80 -> 192.168.244.127:80
2017-10-20 03:56:12 [DEBUG] (server.handle [:80]): End 127.0.0.1:47086 -> [::]:80 -> 192.168.244.127:80
2017-10-20 03:56:15 [DEBUG] (server.handle [:80]): Accepted 127.0.0.1:47090 -> [::]:80
2017-10-20 03:56:15 [DEBUG] (server.handle [:80]): Begin 127.0.0.1:47090 -> [::]:80 -> 192.168.244.220:80
2017-10-20 03:56:15 [DEBUG] (server.handle [:80]): End 127.0.0.1:47090 -> [::]:80 -> 192.168.244.220:80
2017-10-20 03:56:17 [DEBUG] (server.handle [:80]): Accepted 127.0.0.1:47094 -> [::]:80
2017-10-20 03:56:17 [DEBUG] (server.handle [:80]): Begin 127.0.0.1:47094 -> [::]:80 -> 192.168.244.220:80
2017-10-20 03:56:17 [DEBUG] (server.handle [:80]): End 127.0.0.1:47094 -> [::]:80 -> 192.168.244.220:80

With regard to https/non-https: did you mean communicating with LXD over http/https? If so, https is mandatory with LXD - no way to communicate over http.

@yyyar
Copy link
Owner

yyyar commented Oct 20, 2017

@jtopjian, thanks!

With regard to https/non-https: did you mean communicating with LXD over http/https? If so, https is mandatory with LXD - no way to communicate over http.

Sorry, I meant local unix socket and secure https.

Looks good, I'll merge it right now.

@yyyar yyyar merged commit fafe58e into yyyar:master Oct 20, 2017
@yyyar yyyar self-requested a review October 20, 2017 14:47
@yyyar yyyar self-assigned this Oct 20, 2017
@yyyar yyyar added this to the 0.6.0 milestone Oct 20, 2017
@jtopjian
Copy link
Contributor Author

Sorry, I meant local unix socket and secure https.

Ahh - gotcha. Yup, both work 😄

Thank you!

With 0.5 released, no doubt there will be people trying out LXD. I'll be keeping an eye out for issues.

@yyyar
Copy link
Owner

yyyar commented Oct 20, 2017

@jtopjian thank you so much for your support!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants