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

Integration fails to retrieve the publish task and the image digest on OCP #5465

Closed
christophd opened this issue May 7, 2024 · 1 comment
Labels
kind/bug Something isn't working
Milestone

Comments

@christophd
Copy link
Contributor

What happened?

When using build strategy pod on OCP the integration build is marked as Phase=Error because the image digest is not available.

The build condition state that causes the build to fail:

message: ' publishing task completed but no digest is available in container status. Make sure that the process successfully push the image to the registry and write its digest to /dev/termination-log'
reason: ImageDigestAvailable
status: 'False'
type: ImageDigestAvailable

I noticed that the monitor action is not able to determine the publish task name from the list of build tasks although it is there in the build spec.

spec:
  configuration: {}
  tasks:
    - builder:
        baseImage: 'eclipse-temurin:17'
        configuration:
          #...
    - package:
        baseImage: 'eclipse-temurin:17'
        configuration:
        # ...
    - s2i:
        configuration: {}
        name: s2i
        tag: '3804935125'

Having a look into the code it assumes that the last task in the build spec is the publish task and retrieves the name of that task. But for some reason the ordering of tasks in the spec may not be the same in different environments. I have seen this on OCP that the publish task is not the last task in the list. As a result of this the task name is empty which leads to the ImageDigestAvailable condition failure as seen above.

Unfortunately the Integration status does not reflect this build/integration kit error root cause at all.

message: integration kit camel-k-operator/kit-cosstuufr893vlutccf0 is in state "Error"
reason: IntegrationKitAvailable
status: 'False'
type: IntegrationKitAvailable

It would be good to see the build error cause with ImageDigestAvailable=false in the IntegrationKitAvailable status.
Also, the operator logs should reveal the error status of the Build with the ImageDigestAvailable error. At the moment there is not real evidence of the error root cause unless you have a look into the build status.

Also, as a result of the missing integration kit a trait execution failure on the mount trait is reported on the Integration resource which is quite misleading.

message: 'error during trait customization: mount trait execution failed: unable to find integration container: roll-dice'
reason: InitializationFailed
status: 'False'
type: Ready

Steps to reproduce

  1. Install Camel K 2.3.0 on OCP
  2. Set build strategy on IntegrationPlatform to pod
  3. Run an integration
  4. See the Integration, IntegrationKit and Build in error Phase

Relevant log output

{"level":"info","ts":"2024-05-07T06:50:20Z","logger":"camel-k.controller.integrationkit","msg":"Invoking action error","request-namespace":"camel-k-operator","request-name":"kit-cosstuufr893vlutccf0","api-version":"camel.apache.org/v1","kind":"IntegrationKit","ns":"camel-k-operator","name":"kit-cosstuufr893vlutccf0"}
{"level":"info","ts":"2024-05-07T06:50:20Z","logger":"camel-k.controller.integration","msg":"State transition","request-namespace":"camel-k-operator","request-name":"roll-dice","api-version":"camel.apache.org/v1","kind":"Integration","ns":"camel-k-operator","name":"roll-dice","phase-from":"Building Kit","phase-to":"Error"}
{"level":"error","ts":"2024-05-07T06:50:20Z","msg":"Reconciler error","controller":"integration-controller","controllerGroup":"camel.apache.org","controllerKind":"Integration","Integration":{"name":"roll-dice","namespace":"camel-k-operator"},"namespace":"camel-k-operator","name":"roll-dice","reconcileID":"deedb3f9-a496-4ea2-82db-f5e99955190e","error":"error during trait customization: mount trait execution failed: unable to find integration container: roll-dice","stacktrace":"sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).reconcileHandler\n\tsigs.k8s.io/controller-runtime@v0.15.2/pkg/internal/controller/controller.go:324\nsigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).processNextWorkItem\n\tsigs.k8s.io/controller-runtime@v0.15.2/pkg/internal/controller/controller.go:265\nsigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).Start.func2.2\n\tsigs.k8s.io/controller-runtime@v0.15.2/pkg/internal/controller/controller.go:226"}

Camel K version

2.3.0

@christophd christophd added the kind/bug Something isn't working label May 7, 2024
@squakez
Copy link
Contributor

squakez commented May 7, 2024

Fixed by #5435

It did not make time to put it into 2.3.1, we will do a patch release asap. In the while, stick to routine builder pod strategy.

@squakez squakez added this to the 2.3.2 milestone May 7, 2024
@squakez squakez closed this as completed May 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants