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

When creating a service with no image and selector.container , scale gets saved as 1. #2317

Closed
sangeethah opened this issue Oct 12, 2015 · 3 comments
Assignees
Labels
kind/bug Issues that are defects reported by users or that we know have reached a real release
Milestone

Comments

@sangeethah
Copy link
Contributor

Rancher server version - v0.41.0-rc1
Rancher compose version - rancher-compose-v0.4.1-rc2

Used the following docker-compose.yml from rancher-compose to create a service with no image.
noscale:
labels:
io.rancher.service.selector.container: foo=bar

When this service gets created on the rancher-server , its scale gets set to 1:
When i try to export config for the service , the scale for this service is set to 1.

| 113 | noscale |          5 | service | 2ca407bf-0221-4964-a3d8-ed1970af67d8 | NULL        | active  | 2015-10-10 00:22:36 | NULL                | NULL                | {"fields":{"scale":1,"launchConfig":{"labels":{"io.rancher.service.selector.container":"foo=bar"},"logConfig":{},"networkMode":"managed","privileged":false,"publishAllPorts":false,"readOnly":false,"startOnCreate":true,"stdinOpen":false,"tty":false,"version":"0"}}} |             50 | 169.254.86.202 |         NULL | NULL          | foo=bar        

We should not set the scale when adding a service with no image and selector.container.

@sangeethah sangeethah added the kind/bug Issues that are defects reported by users or that we know have reached a real release label Oct 12, 2015
@sangeethah sangeethah added this to the Milestone 10/7/2015 milestone Oct 12, 2015
@alena1108
Copy link

Have to remove default value for "scale" parameter - today its 1. Should accept 0, positive integers and null values.

@alena1108
Copy link

Thought more of it - changing the default from 1 to 0 can break the backwards compatibility. Users would have to go and update their *yml templates in case the scale was missing there.

This issue is not a blocker. When user wants to create his service with scale=0, he can pass scale=0 parameter to the API call. Although its not supported in the UI today, it should be supported via API/rancher-compose

As for putting a scale on selector only container - keeping scale causes no harm either. Selector only service is identified by imageUUID=rancher/image-none presence; and as long as this image is set, scale is going to be ignored.

Punting this bug till later.

@alena1108
Copy link

Closing this bug for now as it doesn't impact functionality, only a compose representation which is harmless.

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

3 participants