When attempting to manually step through upgrading versions of a package using the ClusterExtension using the replaces chain in the FBC channel, moving beyond the first replaced version results in the following status condition:
- lastTransitionTime: "2024-07-03T19:44:12Z"message: 'error upgrading from currently installed version "0.1.0": no package "argocd-operator" matching version "0.3.0" in channel "alpha" found'observedGeneration: 4reason: ResolutionFailedstatus: "False"type: Resolved
In this case, I had followed the replaces chain from v0.1.0 --> v0.2.0 successfully. When attempting to go from v0.2.0 --> v0.3.0 the upgrade failed and contained the above resolution failure.
To verify this is a valid upgrade path, you can see the channel and upgrade edges with:
docker run --rm -it quay.io/operator-framework/opm:latest render quay.io/operatorhubio/catalog:latest | jq -s '.[] | select( .schema == "olm.channel" ) | select( .package == "argocd-operator")'
Output
{
"schema": "olm.channel",
"name": "alpha",
"package": "argocd-operator",
"entries": [
{
"name": "argocd-operator.v0.0.11",
"replaces": "argocd-operator.v0.0.9"
},
{
"name": "argocd-operator.v0.0.12",
"replaces": "argocd-operator.v0.0.11"
},
{
"name": "argocd-operator.v0.0.13",
"replaces": "argocd-operator.v0.0.12"
},
{
"name": "argocd-operator.v0.0.14",
"replaces": "argocd-operator.v0.0.13"
},
{
"name": "argocd-operator.v0.0.15",
"replaces": "argocd-operator.v0.0.14"
},
{
"name": "argocd-operator.v0.0.2"
},
{
"name": "argocd-operator.v0.0.3",
"replaces": "argocd-operator.v0.0.2"
},
{
"name": "argocd-operator.v0.0.4",
"replaces": "argocd-operator.v0.0.3"
},
{
"name": "argocd-operator.v0.0.5",
"replaces": "argocd-operator.v0.0.4"
},
{
"name": "argocd-operator.v0.0.6",
"replaces": "argocd-operator.v0.0.5"
},
{
"name": "argocd-operator.v0.0.8",
"replaces": "argocd-operator.v0.0.6"
},
{
"name": "argocd-operator.v0.0.9",
"replaces": "argocd-operator.v0.0.8"
},
{
"name": "argocd-operator.v0.1.0",
"replaces": "argocd-operator.v0.0.15"
},
{
"name": "argocd-operator.v0.10.0",
"replaces": "argocd-operator.v0.9.2"
},
{
"name": "argocd-operator.v0.10.1",
"replaces": "argocd-operator.v0.10.0"
},
{
"name": "argocd-operator.v0.2.0",
"replaces": "argocd-operator.v0.1.0"
},
{
"name": "argocd-operator.v0.2.1",
"replaces": "argocd-operator.v0.2.0"
},
{
"name": "argocd-operator.v0.3.0",
"replaces": "argocd-operator.v0.2.1"
},
{
"name": "argocd-operator.v0.4.0",
"replaces": "argocd-operator.v0.3.0"
},
{
"name": "argocd-operator.v0.5.0",
"replaces": "argocd-operator.v0.4.0"
},
{
"name": "argocd-operator.v0.6.0",
"replaces": "argocd-operator.v0.5.0"
},
{
"name": "argocd-operator.v0.7.0",
"replaces": "argocd-operator.v0.6.0"
},
{
"name": "argocd-operator.v0.8.0",
"replaces": "argocd-operator.v0.7.0"
},
{
"name": "argocd-operator.v0.9.0",
"replaces": "argocd-operator.v0.8.0"
},
{
"name": "argocd-operator.v0.9.1",
"replaces": "argocd-operator.v0.9.0"
},
{
"name": "argocd-operator.v0.9.2",
"replaces": "argocd-operator.v0.9.1"
}
]
}Reproduction Steps
- Create a
ClusterCatalog that references the operatorhub.io catalog image:
apiVersion: catalogd.operatorframework.io/v1alpha1kind: ClusterCatalogmetadata:
name: operatorhubiospec:
source:
type: imageimage:
ref: quay.io/operatorhubio/catalog:latestpollInterval: 24h
- Create a
ClusterExtension that installs the argocd-operator at v0.1.0:
apiVersion: olm.operatorframework.io/v1alpha1kind: ClusterExtensionmetadata:
name: argocdspec:
packageName: argocd-operatorinstallNamespace: defaultchannel: alphaversion: 0.1.0
- Once the previously created
ClusterExtension is successfully installed, manually update the version to v0.2.0 (note you will have to disable the recently added CRD Upgrade Safety check for this to work due to unknown changes to argo's CRDs):
apiVersion: olm.operatorframework.io/v1alpha1kind: ClusterExtensionmetadata:
name: argocdspec:
packageName: argocd-operatorinstallNamespace: defaultchannel: alphaversion: 0.2.0preflight:
crdUpgradeSafety:
disabled: true
- Once the first manual upgrade is successfully installed, manually upgrade again to
v0.3.0:
apiVersion: olm.operatorframework.io/v1alpha1kind: ClusterExtensionmetadata:
name: argocdspec:
packageName: argocd-operatorinstallNamespace: defaultchannel: alphaversion: 0.3.0preflight:
crdUpgradeSafety:
disabled: true
You should now be able to see the same resolution failure.
Full ClusterExtension output YAML
apiVersion: olm.operatorframework.io/v1alpha1kind: ClusterExtensionmetadata:
annotations:
kubectl.kubernetes.io/last-applied-configuration: | {"apiVersion":"olm.operatorframework.io/v1alpha1","kind":"ClusterExtension","metadata":{"annotations":{},"name":"argocd"},"spec":{"channel":"alpha","installNamespace":"default","packageName":"argocd-operator","preflight":{"crdUpgradeSafety":{"disabled":true}},"version":"0.3.0"}}creationTimestamp: "2024-07-03T19:41:50Z"finalizers:
- olm.operatorframework.io/cleanup-unpack-cache
- olm.operatorframework.io/delete-cached-bundlegeneration: 4name: argocdresourceVersion: "1979"uid: 86f0b4a0-d6a7-4856-8aa2-e2d39e40b2a9spec:
channel: alphainstallNamespace: defaultpackageName: argocd-operatorpreflight:
crdUpgradeSafety:
disabled: trueupgradeConstraintPolicy: Enforceversion: 0.3.0status:
conditions:
- lastTransitionTime: "2024-07-03T19:41:52Z"message: ""observedGeneration: 3reason: Deprecatedstatus: "False"type: Deprecated
- lastTransitionTime: "2024-07-03T19:41:52Z"message: ""observedGeneration: 3reason: Deprecatedstatus: "False"type: PackageDeprecated
- lastTransitionTime: "2024-07-03T19:41:52Z"message: ""observedGeneration: 3reason: Deprecatedstatus: "False"type: ChannelDeprecated
- lastTransitionTime: "2024-07-03T19:41:52Z"message: ""observedGeneration: 3reason: Deprecatedstatus: "False"type: BundleDeprecated
- lastTransitionTime: "2024-07-03T19:44:12Z"message: 'error upgrading from currently installed version "0.1.0": no package "argocd-operator" matching version "0.3.0" in channel "alpha" found'observedGeneration: 4reason: ResolutionFailedstatus: "False"type: Resolved
- lastTransitionTime: "2024-07-03T19:41:54Z"message: 'unpack successful: 'observedGeneration: 3reason: UnpackSuccessstatus: "True"type: Unpacked
- lastTransitionTime: "2024-07-03T19:43:53Z"message: Instantiated bundle argocd successfullyobservedGeneration: 3reason: Successstatus: "True"type: InstalledJust to note, this was originally found by OpenShift QE. I verified the bug was reproducible and used a different package for installation.
When attempting to manually step through upgrading versions of a package using the
ClusterExtensionusing thereplaceschain in the FBC channel, moving beyond the first replaced version results in the following status condition:In this case, I had followed the replaces chain from
v0.1.0-->v0.2.0successfully. When attempting to go fromv0.2.0-->v0.3.0the upgrade failed and contained the above resolution failure.To verify this is a valid upgrade path, you can see the channel and upgrade edges with:
Output
{ "schema": "olm.channel", "name": "alpha", "package": "argocd-operator", "entries": [ { "name": "argocd-operator.v0.0.11", "replaces": "argocd-operator.v0.0.9" }, { "name": "argocd-operator.v0.0.12", "replaces": "argocd-operator.v0.0.11" }, { "name": "argocd-operator.v0.0.13", "replaces": "argocd-operator.v0.0.12" }, { "name": "argocd-operator.v0.0.14", "replaces": "argocd-operator.v0.0.13" }, { "name": "argocd-operator.v0.0.15", "replaces": "argocd-operator.v0.0.14" }, { "name": "argocd-operator.v0.0.2" }, { "name": "argocd-operator.v0.0.3", "replaces": "argocd-operator.v0.0.2" }, { "name": "argocd-operator.v0.0.4", "replaces": "argocd-operator.v0.0.3" }, { "name": "argocd-operator.v0.0.5", "replaces": "argocd-operator.v0.0.4" }, { "name": "argocd-operator.v0.0.6", "replaces": "argocd-operator.v0.0.5" }, { "name": "argocd-operator.v0.0.8", "replaces": "argocd-operator.v0.0.6" }, { "name": "argocd-operator.v0.0.9", "replaces": "argocd-operator.v0.0.8" }, { "name": "argocd-operator.v0.1.0", "replaces": "argocd-operator.v0.0.15" }, { "name": "argocd-operator.v0.10.0", "replaces": "argocd-operator.v0.9.2" }, { "name": "argocd-operator.v0.10.1", "replaces": "argocd-operator.v0.10.0" }, { "name": "argocd-operator.v0.2.0", "replaces": "argocd-operator.v0.1.0" }, { "name": "argocd-operator.v0.2.1", "replaces": "argocd-operator.v0.2.0" }, { "name": "argocd-operator.v0.3.0", "replaces": "argocd-operator.v0.2.1" }, { "name": "argocd-operator.v0.4.0", "replaces": "argocd-operator.v0.3.0" }, { "name": "argocd-operator.v0.5.0", "replaces": "argocd-operator.v0.4.0" }, { "name": "argocd-operator.v0.6.0", "replaces": "argocd-operator.v0.5.0" }, { "name": "argocd-operator.v0.7.0", "replaces": "argocd-operator.v0.6.0" }, { "name": "argocd-operator.v0.8.0", "replaces": "argocd-operator.v0.7.0" }, { "name": "argocd-operator.v0.9.0", "replaces": "argocd-operator.v0.8.0" }, { "name": "argocd-operator.v0.9.1", "replaces": "argocd-operator.v0.9.0" }, { "name": "argocd-operator.v0.9.2", "replaces": "argocd-operator.v0.9.1" } ] }ClusterCatalogthat references the operatorhub.io catalog image:ClusterExtensionthat installs theargocd-operatoratv0.1.0:ClusterExtensionis successfully installed, manually update the version tov0.2.0(note you will have to disable the recently added CRD Upgrade Safety check for this to work due to unknown changes to argo's CRDs):v0.3.0:You should now be able to see the same resolution failure.
Full ClusterExtension output YAML
Just to note, this was originally found by OpenShift QE. I verified the bug was reproducible and used a different package for installation.