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

ImagePullBackOff Error for pod build strategy and s2i publish strategy #5595

Closed
christophd opened this issue Jun 6, 2024 · 5 comments · Fixed by #5599
Closed

ImagePullBackOff Error for pod build strategy and s2i publish strategy #5595

christophd opened this issue Jun 6, 2024 · 5 comments · Fixed by #5599
Labels
area/olm Related to the Operator Lifecycle Manager kind/bug Something isn't working
Milestone

Comments

@christophd
Copy link
Contributor

christophd commented Jun 6, 2024

What happened?

Image set on integrations is wrong when using pod build strategy and S2I publish strategy.

When running an integration the build pod is successful reporting to have pushed the built integrationkit image into the registry as exepcted:

Build pod log output:

Successfully pushed image-registry.openshift-image-registry.svc:5000/camel-k-operator/camel-k-kit-cpgll90chnp8o2ggtc00@sha256:33889011ccebe0289c06a608fb8f0a24204ddcf307da4d6874be321e58e803c9

But the image set on the Integration is wrong causing a ImagePullBackOff Error:

Image set on Integration

  containerStatuses:
    - name: integration
      state:
        waiting:
          reason: ImagePullBackOff
          message: 'Back-off pulling image "s2i@sha256:33889011ccebe0289c06a608fb8f0a24204ddcf307da4d6874be321e58e803c9"'
      lastState: {}
      ready: false
      restartCount: 0
      image: 's2i@sha256:33889011ccebe0289c06a608fb8f0a24204ddcf307da4d6874be321e58e803c9'
      imageID: ''
      started: false

The image set for the Integration s2i@sha256:33889011ccebe0289c06a608fb8f0a24204ddcf307da4d6874be321e58e803c9 looks suspicious, this can't be right.

Integration CR status

status:
  image: 's2i@sha256:33889011ccebe0289c06a608fb8f0a24204ddcf307da4d6874be321e58e803c9'

Steps to reproduce

  1. Install Camel K 2.3.2 on OCP
  2. Set build strategy to pod
  3. Set publish strategy to S2I
  4. Run an integration and see it failing with the ImagePullBackOff error

Relevant log output

No response

Camel K version

2.3.2

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

squakez commented Jun 6, 2024

This is a bad regression. Would you mind posting the image info coming off from Build and IntegrationKit? Thanks.

@christophd
Copy link
Contributor Author

The Build CR (not the full YAML some information removed):

apiVersion: camel.apache.org/v1
kind: Build
metadata:
  annotations:
    camel.apache.org/operator.id: camel-k
  name: kit-cpgll90chnp8o2ggtc00
  namespace: camel-k-operator
  labels:
    camel.apache.org/created.by.kind: Integration
    camel.apache.org/created.by.name: simple
    camel.apache.org/created.by.namespace: camel-k-operator
    camel.apache.org/created.by.version: '3931148488'
    camel.apache.org/kit.layout: fast-jar
spec:
  tasks:
    - builder:
        baseImage: 'eclipse-temurin:17'
        configuration:
          operatorNamespace: camel-k-operator
          orderStrategy: sequential
          strategy: pod
          toolImage: 'docker.io/apache/camel-k:2.3.2'
        name: builder
        runtime:
          metadata:
            camel-quarkus.version: 3.8.1
            camel.version: 4.4.1
            jib.layer-filter-extension-maven.version: 0.3.0
            jib.maven-plugin.version: 3.4.1
            quarkus.native-builder-image: 'quay.io/quarkus/ubi-quarkus-mandrel-builder-image:jdk-21'
            quarkus.version: 3.8.3
          provider: quarkus
          version: 3.8.1
        steps:
          - github.com/apache/camel-k/v2/pkg/builder/LoadCamelQuarkusCatalog
          - github.com/apache/camel-k/v2/pkg/builder/CleanUpBuildDir
          - github.com/apache/camel-k/v2/pkg/builder/GenerateJavaKeystore
          - github.com/apache/camel-k/v2/pkg/builder/GenerateQuarkusProject
          - github.com/apache/camel-k/v2/pkg/builder/GenerateProjectSettings
          - github.com/apache/camel-k/v2/pkg/builder/InjectDependencies
          - github.com/apache/camel-k/v2/pkg/builder/SanitizeDependencies
          - github.com/apache/camel-k/v2/pkg/builder/InjectProfiles
          - github.com/apache/camel-k/v2/pkg/builder/BuildQuarkusRunner
    - package:
        baseImage: 'eclipse-temurin:17'
        name: package
        steps:
          - github.com/apache/camel-k/v2/pkg/builder/LoadCamelQuarkusCatalog
          - github.com/apache/camel-k/v2/pkg/builder/ComputeQuarkusDependencies
          - github.com/apache/camel-k/v2/pkg/builder/IncrementalImageContext
          - github.com/apache/camel-k/v2/pkg/builder/JvmDockerfile
    - s2i:
        configuration: {}
        name: s2i
        tag: '3931148497'
status:
  digest: 'sha256:33889011ccebe0289c06a608fb8f0a24204ddcf307da4d6874be321e58e803c9'
  baseImage: 'eclipse-temurin:17'
  image: s2i
  phase: Succeeded

The IntegrationKit (also not the full YAML):

apiVersion: camel.apache.org/v1
kind: IntegrationKit
metadata:
  name: kit-cpgll90chnp8o2ggtc00
  namespace: camel-k-operator
  labels:
    camel.apache.org/kit.type: platform
    camel.apache.org/created.by.name: simple
    camel.apache.org/kit.priority: '1000'
    camel.apache.org/runtime.version: 3.8.1
    camel.apache.org/created.by.kind: Integration
    camel.apache.org/kit.layout: fast-jar
    camel.apache.org/runtime.provider: quarkus
    camel.apache.org/created.by.version: '3931148488'
    camel.apache.org/created.by.namespace: camel-k-operator
spec:
  dependencies:
    - 'camel:core'
    - 'camel:log'
    - 'camel:timer'
    - 'mvn:org.apache.camel.k:camel-k-runtime'
    - 'mvn:org.apache.camel.quarkus:camel-quarkus-yaml-dsl'
  traits: {}
status:
  runtimeVersion: 3.8.1
  digest: vtzPxjETR_86FqSNVCGLbCUjt6VPS9Id3r7wxjft6YeA
  runtimeProvider: quarkus
  baseImage: 'eclipse-temurin:17'
  platform: camel-k
  version: 2.3.2
  image: 's2i@sha256:33889011ccebe0289c06a608fb8f0a24204ddcf307da4d6874be321e58e803c9'
  phase: Ready

Seems like the image is already wrong on the kit

@squakez
Copy link
Contributor

squakez commented Jun 6, 2024

This is the culprit:

status:
...
  image: s2i

@squakez
Copy link
Contributor

squakez commented Jun 6, 2024

cc @gansheer fyi

@squakez
Copy link
Contributor

squakez commented Jun 6, 2024

Okey, I've had a look and it seems the root cause is a wrong CRD definition in the OLM bundle. For some reason the generation process screwed up and the OLM version is not using the proper configuration for 2.3.2. I'm going to regenerate the bundle and update or create a new OLM release accordingly.

@squakez squakez added the area/olm Related to the Operator Lifecycle Manager label Jun 6, 2024
@squakez squakez added this to the 2.3.3 milestone Jun 6, 2024
@squakez squakez closed this as completed Jun 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/olm Related to the Operator Lifecycle Manager kind/bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants