operator-framework / operator-controller

A new and improved management framework for extending Kubernetes with Operators
https://operator-framework.github.io/operator-controller/
Apache License 2.0
70 stars 54 forks source link

`entity for package "registry-operator" not found in solution` when trying to upgrade to next version using skip edges. #329

Closed jubittajohn closed 5 months ago

jubittajohn commented 1 year ago

I am getting the error entity for package "registry-operator" not found in solution when trying to upgrade to next version using skip edges.

Steps to recreate

  1. Use a FBC template with skip in upgrade graph. olm.package and olm.channel for the FBC

    ---
    defaultChannel: stable-v0.1
    name: registry-operator
    schema: olm.package
    ---
    entries:
    - name: registry-operator.v0.1.0
    - name: registry-operator.v0.1.1
    skips:
    - registry-operator.v0.1.0
    name: stable-v0.1
    package: registry-operator
    schema: olm.channel
    ---
  2. Install the version v0.1.0 of the operator. The operator is installed successfully .

  3. Upgrade the operator to version v0.1.1(which is specified along skip edges). The resolver fails to resolve the right version on upgrading to v0.1.1.

    Operator Status:

    apiVersion: operators.operatorframework.io/v1alpha1
    kind: Operator
    metadata:
    creationTimestamp: "2023-08-10T19:40:44Z"
    generation: 2
    name: registry-operator
    resourceVersion: "84405"
    uid: bb6ad6c0-d60b-4990-8fd3-03f878463dfd
    spec:
    packageName: registry-operator
    version: 0.1.1
    status:
    conditions:
    - lastTransitionTime: "2023-08-10T19:42:45Z"
      message: entity for package "registry-operator" not found in solution
      observedGeneration: 2
      reason: ResolutionFailed
      status: "False"
      type: Resolved
    - lastTransitionTime: "2023-08-10T19:42:45Z"
      message: installation has not been attempted as resolution failed
      observedGeneration: 2
      reason: InstallationStatusUnknown
      status: Unknown
      type: Installed

    The bundledeployment remains at versionv0.1.0

    spec:
    provisionerClassName: core-rukpak-io-plain
    template:
      metadata: {}
      spec:
        provisionerClassName: core-rukpak-io-registry
        source:
          image:
            ref: localhost:5001/registry-operator-bundle:v0.1.0
          type: image
    status:
    activeBundle: registry-operator-6f7zd4
    conditions:
    - lastTransitionTime: "2023-08-10T19:40:45Z"
      message: Successfully unpacked the registry-operator-6f7zd4 Bundle
      reason: UnpackSuccessful
      status: "True"
      type: HasValidBundle
    - lastTransitionTime: "2023-08-10T19:40:50Z"
      message: Instantiated bundle registry-operator-6f7zd4 successfully
      reason: InstallationSucceeded
      status: "True"
      type: Installed
    observedGeneration: 2

    Expected output

    Successful upgrade of the operator to version v0.1.1 or Error message like: “no eligible successors found for ${currentVersion}"

ankitathomas commented 5 months ago

I've verified the issue is fixed with https://github.com/operator-framework/operator-controller/pull/352, closing this out.