Skip to content
This repository has been archived by the owner on Mar 26, 2018. It is now read-only.

Integration count limit is not enforced in TP2 #769

Closed
dsimansk opened this issue Nov 1, 2017 · 3 comments
Closed

Integration count limit is not enforced in TP2 #769

dsimansk opened this issue Nov 1, 2017 · 3 comments
Labels

Comments

@dsimansk
Copy link
Member

dsimansk commented Nov 1, 2017

It seems that our limits are not applied for TP2 on production cluster. Therefor I'm able to deploy 2 Integrations at once. Fortunately the current quota(after Keycloak removal) is gracious enough to accomodate those deployments.

@dsimansk dsimansk added the TP2 label Nov 1, 2017
@dsimansk
Copy link
Member Author

dsimansk commented Nov 1, 2017

@rhuss @zregvart correct me if I'm wrong, but we set up annotation during creating DC, but then fetch DCs with label. Could this be caused by kubernetes-client upgrade actually? That for some reason older client doesn't distinguish between those two variants.

return DeploymentData.builder()
.addLabel(OpenShiftService.REVISION_ID_ANNOTATION, revision.getVersion().orElse(0).toString())
.addAnnotation(OpenShiftService.USERNAME_LABEL, username)
.addSecretEntry("application.properties", propsToString(applicationProperties))
.build();

Map<String, String> labels = new HashMap<>();
labels.put(OpenShiftService.USERNAME_LABEL, Names.sanitize(username));
return (int) openShiftService().getDeploymentsByLabel(labels)
.stream()
.filter(d -> !Names.sanitize(name).equals(d.getMetadata().getName())) //this is also called on updates (so we need to exclude)
.filter(d -> d.getSpec().getReplicas() > 0)
.count();
}

@rhuss
Copy link
Contributor

rhuss commented Nov 2, 2017

Annotations and labels were and still are completely different things so I wonder whether this has changed in the code or never worked as expected.

Let me check that later ....

@dsimansk
Copy link
Member Author

dsimansk commented Nov 2, 2017

As we discussed on channel, imho the following change is causing the issue. I can confirm that manually adding label USERNAME to first deployment prevents the subsequent one from starting and puts it immediately to Inactive state (without s2i build triggered etc.).

zregvart added a commit to zregvart/syndesis-rest that referenced this issue Nov 2, 2017
...g integration deployment

Username that we use to count the number of deployments was set as
annotation and when counting expected as label. This sets the username
as label when creating integration deployment.

Fixes syndesisio#769
zregvart added a commit to zregvart/syndesis-rest that referenced this issue Nov 2, 2017
...g integration deployment

Username that we use to count the number of deployments was set as
annotation and when counting expected as label. This sets the username
as label when creating integration deployment.

Fixes syndesisio#769
@pure-bot pure-bot bot closed this as completed in #771 Nov 2, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants