You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by GitBox <gi...@apache.org> on 2022/04/25 07:42:31 UTC
[GitHub] [camel-k] apupier opened a new issue, #3077: [regression] Cannot provide 2 resources with 1.8.0 and 1.8.1
apupier opened a new issue, #3077:
URL: https://github.com/apache/camel-k/issues/3077
regression https://github.com/apache/camel-k/issues/2943 was marked as fixed in 1.8.1 but seems it wasn't.
I tried with 1.8.1 but I still have the same errors
double-checked the kamel installation:
```
{"level":"info","ts":1646313742.1552255,"logger":"cmd","msg":"Camel K Operator Version: 1.8.1"}
```
```
./kamel version
Camel K Client 1.8.1
```
example of error which seems really the same than in 1.8.0 (even the line numbers which might be strange):
```json
{
"level": "error",
"ts": 1646316143.3936555,
"logger": "controller.integration-controller",
"msg": "Reconciler error",
"reconciler group": "camel.apache.org",
"reconciler kind": "Integration",
"name": "test-multiple-resources",
"namespace": "default",
"error": "error executing post actions: error during apply resource: default/test-multiple-resources: failed to create typed patch object: .spec.template.spec.containers[name=\"integration\"].volumeMounts: duplicate entries for key [mountPath=\"/etc/camel/resources\"]",
"errorVerbose": "error during apply resource: default/test-multiple-resources: failed to create typed patch object: .spec.template.spec.containers[name=\"integration\"].volumeMounts: duplicate entries for key [mountPath=\"/etc/camel/resources\"]\nerror executing post actions\ngithub.com/apache/camel-k/pkg/trait.Apply\n\tgithub.com/apache/camel-k/pkg/trait/trait.go:55\ngithub.com/apache/camel-k/pkg/controller/integration.(*monitorAction).Handle\n\tgithub.com/apache/camel-k/pkg/controller/integration/monitor.go:118\ngithub.com/apache/camel-k/pkg/controller/integration.(*reconcileIntegration).Reconcile\n\tgithub.com/apache/camel-k/pkg/controller/integration/integration_controller.go:309\ngithub.com/apache/camel-k/pkg/util/monitoring.(*instrumentedReconciler).Reconcile\n\tgithub.com/apache/camel-k/pkg/util/monitoring/controller.go:70\nsigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).reconcileHandler\n\tsigs.k8s.io/controller-runtime@v0.9.7/pkg/internal/controller/
controller.go:298\nsigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).processNextWorkItem\n\tsigs.k8s.io/controller-runtime@v0.9.7/pkg/internal/controller/controller.go:253\nsigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).Start.func2.2\n\tsigs.k8s.io/controller-runtime@v0.9.7/pkg/internal/controller/controller.go:214\nruntime.goexit\n\truntime/asm_amd64.s:1371",
"stacktrace": "sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).Start.func2.2\n\tsigs.k8s.io/controller-runtime@v0.9.7/pkg/internal/controller/controller.go:214"
}
```
the difference that I spotted with 1.8.0 is that 2 configmap are created even if the two files have the same content
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [camel-k] mrmertozturk commented on issue #3077: [regression] Cannot provide 2 resources with 1.8.0 and 1.8.1
Posted by GitBox <gi...@apache.org>.
mrmertozturk commented on issue #3077:
URL: https://github.com/apache/camel-k/issues/3077#issuecomment-1156186937
@yididiyag That is incorrect. I've confirmed that the issue was _not_ fixed in v1.9.0
And according to the changelogs for v1.9.2 no change/fix has been made with regards to this issue.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [camel-k] squakez commented on issue #3077: [regression] Cannot provide 2 resources with 1.8.0 and 1.8.1
Posted by GitBox <gi...@apache.org>.
squakez commented on issue #3077:
URL: https://github.com/apache/camel-k/issues/3077#issuecomment-1108193776
Thanks for reporting. Would you mind commenting what is the Integration which is failing or the command you use to run it? I'd like to understand what exactly is failing now. Thanks!
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [camel-k] mrmertozturk commented on issue #3077: [regression] Cannot provide 2 resources with 1.8.0 and 1.8.1
Posted by GitBox <gi...@apache.org>.
mrmertozturk commented on issue #3077:
URL: https://github.com/apache/camel-k/issues/3077#issuecomment-1106862326
I am still experiencing this issue in the latest stable release 1.8.2.
```
./kamel version
Camel K Client 1.8.2
```
Phase is stuck at "Deploying".
```
kubectl get integration
NAME PHASE KIT REPLICAS
s-contact-v2 Deploying kit-c9hgufi5a6h9ag5a4s4g
```
When I describe the integration:
```
Events:
Type Reason Age From Message
---- ------ ---- ---- -------
Normal IntegrationConditionChanged 7m25s camel-k-integration-controller Condition "IntegrationPlatformAvailable" is "True" for Integration s-contact-v2: development/camel-k
Normal IntegrationConditionChanged 7m25s camel-k-integration-controller Condition "ExposureAvailable" is "False" for Integration s-contact-v2: explicitly disabled
Normal IntegrationPhaseUpdated 7m25s camel-k-integration-controller Integration "s-contact-v2" in phase "Initialization"
Normal IntegrationPhaseUpdated 7m25s camel-k-integration-controller Integration "s-contact-v2" in phase "Building Kit"
Normal IntegrationConditionChanged 7m25s camel-k-integration-controller Condition "IntegrationKitAvailable" is "True" for Integration s-contact-v2: kit-c9hgufi5a6h9ag5a4s4g
Normal IntegrationPhaseUpdated 7m25s camel-k-integration-controller Integration "s-contact-v2" in phase "Deploying"
Warning IntegrationError 115s (x17 over 7m25s) camel-k-integration-controller Cannot reconcile Integration s-contact-v2: error executing post actions: error during apply resource: development/s-contact-v2: failed to create typed patch object: errors:
.spec.template.spec.containers[name="integration"].volumeMounts: duplicate entries for key [mountPath="/etc/camel/resources"]
.spec.template.spec.containers[name="integration"].volumeMounts: duplicate entries for key [mountPath="/etc/camel/resources"]
```
I thought the issue was present in version 1.8.0, claimed to be fixed in version 1.8.1, but actually did indeed carry onto 1.8.1. I thought it was fixed with the latest stable release. Is this not the case?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [camel-k] squakez commented on issue #3077: [regression] Cannot provide 2 resources with 1.8.0 and 1.8.1
Posted by GitBox <gi...@apache.org>.
squakez commented on issue #3077:
URL: https://github.com/apache/camel-k/issues/3077#issuecomment-1111840655
> Thanks for the update. I would love to be a part of the fix and help you in any way possible.
Thanks for the interest. If you want, you can start having a look at the E2E test we have here https://github.com/apache/camel-k/blob/main/e2e/common/config/config_test.go#L212 . It looks like this is not enough to cover the failure. Maybe you can figure out a test which cover the situation mentioned in the previous comments so we have a clear target to fix. Feel free to ping me if you are willing to look and need support.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [camel-k] yididiyag commented on issue #3077: [regression] Cannot provide 2 resources with 1.8.0 and 1.8.1
Posted by GitBox <gi...@apache.org>.
yididiyag commented on issue #3077:
URL: https://github.com/apache/camel-k/issues/3077#issuecomment-1156156721
Hello, this has been resolved from 1.9.x onward, check the [latest- v1.9.2](https://github.com/apache/camel-k/releases/tag/v1.9.2)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [camel-k] mrmertozturk commented on issue #3077: [regression] Cannot provide 2 resources with 1.8.0 and 1.8.1
Posted by GitBox <gi...@apache.org>.
mrmertozturk commented on issue #3077:
URL: https://github.com/apache/camel-k/issues/3077#issuecomment-1108269011
Thanks for the response. Of course, let me give you some information on what I'm trying to do.
We have a bunch of camel-k routes whose main function is to sync data from our Salesforce account to Postgresql database. Probably not important but camel components we have in these routes are: setHeader, setBody, setProperty, log, filter, removeHeader, convertBody, validate, split, process, bean, atlasmap and sql. (As I said, probably not necessary to mention for this issue but I add it here just in case it is related.)
The command I use to run the integration is:
```
kamel run \
-d mvn:org.apache.commons:commons-dbcp2:2.9.0 \
-d mvn:org.postgresql:postgresql:42.2.23 \
-d mvn:org.postgresql:postgresql:42.3.0 \
-d mvn:xalan:xalan:2.7.2 \
--source ./sources/postgres_db.groovy \
--source ./sources/dynamic.java \
--source ./sources/ContactPreMapHandler.java \
--config configmap:elb-svc-names-cm \
--config configmap:other-configs-cm \
--config secret:dynamic-salesforce-credentials-secret \
--config secret:postgres-credentials-secret \
--config secret:sf-jwt-token \
--open-api file:./resources/contact-openapi.yaml \
--resource file:./resources/get-salesforce-contacts.vm \
--resource file:./resources/upsert-contact.vm \
--resource file:./resources/contact-mapping.adm \
-t container.limit-memory="512Mi" \
-t ingress.enabled=false \
-t jolokia.enabled=true \
-t logging.enabled=true \
-t logging.color=true \
-t logging.level="DEBUG" \
-t service.enabled=true \
-t service.node-port=false \
-t service.auto=true \
-t health.enabled=true \
-t health.liveness-probe-enabled=true \
-t health.liveness-scheme="HTTP" \
-t health.liveness-initial-delay=30 \
-t health.liveness-timeout=30 \
-t health.liveness-period=300 \
-t health.liveness-success-threshold=1 \
-t health.liveness-failure-threshold=3 \
-t health.readiness-probe-enabled=true \
-t health.readiness-scheme="HTTP" \
-t health.readiness-initial-delay=30 \
-t health.readiness-timeout=30 \
-t health.readiness-period=300 \
-t health.readiness-success-threshold=1 \
-t health.readiness-failure-threshold=3 \
ContactSync.java \
-n $1
```
- We have the last line `-n $1` so that we can reference a namespace in our Github Actions.
- All our camel-k integrations share the following resources:
1. `postgres_db.groovy`
2. `dynamic.java`
3. All 5 resources with the `--config` type.
4. All the traits.
The `postgres_db.groovy` file:
```
import org.apache.commons.dbcp2.BasicDataSource
beans {
String postgresUsername = context.resolvePropertyPlaceholders("{{postgres.username}}")
String postgresPassword = context.resolvePropertyPlaceholders("{{postgres.password}}")
String postgresHost = context.resolvePropertyPlaceholders("{{postgres.host}}")
String postgresDatabase = context.resolvePropertyPlaceholders("{{local.parameters.postgres.database}}")
dataSource(BasicDataSource) {
driverClassName = 'org.postgresql.Driver'
url = 'jdbc:postgresql://' + postgresHost + '/' + postgresDatabase
username = postgresUsername
password = postgresPassword
maxTotal = 8
maxIdle = 8
minIdle = 0
initialSize = 0
}
}
```
The `dynamic.java` file:
```
import org.apache.camel.builder.RouteBuilder;
import org.apache.camel.component.salesforce.AuthenticationType;
import org.apache.camel.component.salesforce.SalesforceComponent;
import org.apache.camel.component.salesforce.SalesforceLoginConfig;
import org.apache.camel.support.jsse.KeyStoreParameters;
public class dynamic extends RouteBuilder {
@Override
public void configure() throws Exception {
SalesforceLoginConfig salesforceLoginConfig = new SalesforceLoginConfig();
salesforceLoginConfig.setType(AuthenticationType.JWT);
salesforceLoginConfig.setClientId(getContext().resolvePropertyPlaceholders("{{dynamicsfconfig.sf-login-config-clientId}}"));
salesforceLoginConfig.setClientSecret(getContext().resolvePropertyPlaceholders("{{dynamicsfconfig.sf-login-config-clientSecret}}"));
salesforceLoginConfig.setLoginUrl(getContext().resolvePropertyPlaceholders("{{dynamicsfconfig.sf-login-config-loginURL}}"));
salesforceLoginConfig.setUserName(getContext().resolvePropertyPlaceholders("{{dynamicsfconfig.sf-login-config-username}}"));
KeyStoreParameters keyStoreParameters = new KeyStoreParameters();
keyStoreParameters.setPassword(getContext().resolvePropertyPlaceholders("{{dynamicsfconfig.keystore-password}}"));
keyStoreParameters.setResource(getContext().resolvePropertyPlaceholders("{{dynamicsfconfig.keystore-resource}}"));
salesforceLoginConfig.setKeystore(keyStoreParameters);
SalesforceComponent salesforceComponent = new SalesforceComponent();
salesforceComponent.setLoginConfig(salesforceLoginConfig);
getContext().addComponent("salesforce", salesforceComponent);
}
}
```
A bit more insight on when&how we encountered this issue: We had one camel-k route deployed using the command I posted above. It was running smoothly, without any problems. All the ConfigMaps, Secrets, mappings and resources were available and used within the route.
The problem started when I deployed a very similar but a different route to the same namespace. Now, these two routes were sharing the aforementioned resources and it is when I first encountered with the issue:
```
Events:
Type Reason Age From Message
---- ------ ---- ---- -------
Normal IntegrationConditionChanged 7m25s camel-k-integration-controller Condition "IntegrationPlatformAvailable" is "True" for Integration s-contact-v2: development/camel-k
Normal IntegrationConditionChanged 7m25s camel-k-integration-controller Condition "ExposureAvailable" is "False" for Integration s-contact-v2: explicitly disabled
Normal IntegrationPhaseUpdated 7m25s camel-k-integration-controller Integration "s-contact-v2" in phase "Initialization"
Normal IntegrationPhaseUpdated 7m25s camel-k-integration-controller Integration "s-contact-v2" in phase "Building Kit"
Normal IntegrationConditionChanged 7m25s camel-k-integration-controller Condition "IntegrationKitAvailable" is "True" for Integration s-contact-v2: kit-c9hgufi5a6h9ag5a4s4g
Normal IntegrationPhaseUpdated 7m25s camel-k-integration-controller Integration "s-contact-v2" in phase "Deploying"
Warning IntegrationError 115s (x17 over 7m25s) camel-k-integration-controller Cannot reconcile Integration s-contact-v2: error executing post actions: error during apply resource: development/s-contact-v2: failed to create typed patch object: errors:
.spec.template.spec.containers[name="integration"].volumeMounts: duplicate entries for key [mountPath="/etc/camel/resources"]
.spec.template.spec.containers[name="integration"].volumeMounts: duplicate entries for key [mountPath="/etc/camel/resources"]
```
Since then, I removed the `camel-k-operator` and cleaned all camel-k resources in the said namespace by running `kamel uninstall --all -n development` and then tried again with the following kamel versions: `1.7.0`, `1.8.0`, `1.8.1`, `1.8.2` and lastly `1.9.0-nightly`. Unfortunately, none of them worked. I kept getting the same error.
I hope I've provided you with enough details regarding the issue. Please feel free to let me know if you need any further details. Thanks!
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [camel-k] squakez closed issue #3077: [regression] Cannot provide 2 resources with 1.8.0 and 1.8.1
Posted by GitBox <gi...@apache.org>.
squakez closed issue #3077: [regression] Cannot provide 2 resources with 1.8.0 and 1.8.1
URL: https://github.com/apache/camel-k/issues/3077
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [camel-k] squakez commented on issue #3077: [regression] Cannot provide 2 resources with 1.8.0 and 1.8.1
Posted by GitBox <gi...@apache.org>.
squakez commented on issue #3077:
URL: https://github.com/apache/camel-k/issues/3077#issuecomment-1183041212
It seems the issue is no longer present in > 1.9.2 versions. I am still able to reproduce with 1.8.2, although I am not able to identify which is the commit that fixed. Could you please try testing with 1.9.2 version and report if now the problem has really gone?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [camel-k] mrmertozturk commented on issue #3077: [regression] Cannot provide 2 resources with 1.8.0 and 1.8.1
Posted by GitBox <gi...@apache.org>.
mrmertozturk commented on issue #3077:
URL: https://github.com/apache/camel-k/issues/3077#issuecomment-1111250509
Thanks for the update. I would love to be a part of the fix and help you in any way possible.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [camel-k] oscerd commented on issue #3077: [regression] Cannot provide 2 resources with 1.8.0 and 1.8.1
Posted by GitBox <gi...@apache.org>.
oscerd commented on issue #3077:
URL: https://github.com/apache/camel-k/issues/3077#issuecomment-1156219099
It's not fixed yet.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [camel-k] squakez commented on issue #3077: [regression] Cannot provide 2 resources with 1.8.0 and 1.8.1
Posted by GitBox <gi...@apache.org>.
squakez commented on issue #3077:
URL: https://github.com/apache/camel-k/issues/3077#issuecomment-1111225260
I managed to reproduce. I did not manage to see why it is failing though. I'll keep working on it, thanks for reporting.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org