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

Convert v1 selector based LB to v2 #7269

Closed
alena1108 opened this issue Jan 3, 2017 · 4 comments
Closed

Convert v1 selector based LB to v2 #7269

alena1108 opened this issue Jan 3, 2017 · 4 comments
Assignees
Labels
kind/bug Issues that are defects reported by users or that we know have reached a real release
Milestone

Comments

@alena1108
Copy link

If selector is defined on LB service level in v1, it should be transformed to the selector on the port rule in v2.

@deniseschannon we've decided to fix it on the rancher compose side

@alena1108 alena1108 added the kind/bug Issues that are defects reported by users or that we know have reached a real release label Jan 3, 2017
@alena1108 alena1108 added this to the Release 1.4.0 milestone Jan 3, 2017
@lukewhiting
Copy link

This is currently malfunctioning on Rancher 1.2.2 (Compose v0.12.1).

When running rancer-compose up on a Docker compose file written from Rancher <1.2 it partially converts the label based LB targets to the newer load balancer but incorrectly sets them to type TCP so the path is ignored causing apps that rely on path routing to fail.

It seems the paths are being read and set. For example an old style LB with a label of io.rancher.loadbalancer.target.twitter-profile-service: /twitter=8082 created an entry in the new LB config screen targeting twitter-profile-service on port 8082 and once you change the type from TCP to HTTP the path shows correctly in the UI.

Currently for operational reasons we must keep backwards compatibility in our docker-compose & rancher-compose files so this is unfortunately blocking us from upgrading to 1.2.

If you need any more info please don't hesitate to ask.

@joshwget
Copy link

joshwget commented Jan 4, 2017

@lukewhiting Can you file a another issue for this? It's a separate problem but I'd definitely like to get that fixed too.

@lukewhiting
Copy link

@joshwget Sure thing

@sangeethah
Copy link
Contributor

Tested with rancher-server version - v1.4.0-rc3
Created a stack with following yml where Lb is v1 selector based .

lb-1:
  ports:
  - 4001:80
  labels:
    io.rancher.service.selector.link: test2=bar
  image: rancher/load-balancer-service
test-752736:
  labels:
    test2: bar
  image: sangeetha/testlbsd:latest
test-479268:
  labels:
    test2: bar
  image: sangeetha/testlbsd:latest
lb-1:
  scale: 1
  health_check:
    port: 42
    interval: 2000
    unhealthy_threshold: 3
    healthy_threshold: 2
    response_timeout: 2000

When Lb gets created with selector based Port Rule as expected.
Lb is functional and directs traffic to all the containers that have the specified label.
screen shot 2017-01-27 at 6 40 05 pm

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Issues that are defects reported by users or that we know have reached a real release
Projects
None yet
Development

No branches or pull requests

4 participants