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

failed to get pre-cached package with pull policy Never #314

Closed
haarchri opened this issue Nov 3, 2022 · 4 comments
Closed

failed to get pre-cached package with pull policy Never #314

haarchri opened this issue Nov 3, 2022 · 4 comments
Labels
bug Something isn't working

Comments

@haarchri
Copy link
Member

haarchri commented Nov 3, 2022

What happened?

we try to install pre-cached configurations via CI in a universal-crossplane 1.9.1-up.2 installation

---
apiVersion: meta.pkg.crossplane.io/v1
kind: Configuration
metadata:
  name: xxx
spec:
  crossplane:
    version: ">=v1.6.0"
kubectl describe configurations crossplane
Name:         crossplane
Namespace:    
Labels:       <none>
Annotations:  <none>
API Version:  pkg.crossplane.io/v1
Kind:         Configuration
Metadata:
  Creation Timestamp:  2022-11-03T17:52:29Z
  Generation:          1
  UID:               a6759a9a-a685-422c-bf73-0986e11612be
Spec:
  Ignore Crossplane Constraints:  false
  Package:                        crossplane-v1.150.0-72.g431b875.dirty.gz
  Package Pull Policy:            Never
  Revision Activation Policy:     Automatic
  Revision History Limit:         1
  Skip Dependency Resolution:     false
Status:
  Conditions:
    Last Transition Time:  2022-11-03T17:53:27Z
    Reason:                UnhealthyPackageRevision
    Status:                False
    Type:                  Healthy
    Last Transition Time:  2022-11-03T17:53:27Z
    Reason:                ActivePackageRevision
    Status:                True
    Type:                  Installed
  Current Identifier:      crossplane-v1.150.0-72.g431b875.dirty.gz
  Current Revision:        crossplane-crossplane-v
Events:
  Type     Reason                  Age                    From                                      Message
  ----     ------                  ----                   ----                                      -------
  Warning  InstallPackageRevision  2m30s (x3 over 2m30s)  packages/configuration.pkg.crossplane.io  current package revision health is unknown
  Warning  InstallPackageRevision  2m29s (x3 over 2m30s)  packages/configuration.pkg.crossplane.io  current package revision is unhealthy

in crossplane pod with debug we can see the following "failed to get pre-cached package with pull policy Never" but at the end it looks like a problem with the spec.crossplane.version in configuration

1.667496681445879e+09	ERROR	crossplane.controller.packages/configurationrevision.pkg.crossplane.io	Reconciler error	{"reconciler group": "pkg.crossplane.io", "reconciler kind": "ConfigurationRevision", "name": "crossplane-crossplane-v", "namespace": "", "error": "failed to get pre-cached package with pull policy Never"}
sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).processNextWorkItem
	/home/runner/work/crossplane/crossplane/vendor/sigs.k8s.io/controller-runtime/pkg/internal/controller/controller.go:266
sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).Start.func2.2
	/home/runner/work/crossplane/crossplane/vendor/sigs.k8s.io/controller-runtime/pkg/internal/controller/controller.go:227

when we change the configuration to set version fits for 1.9.1-up.2 - everything is working as expected

---
apiVersion: meta.pkg.crossplane.io/v1
kind: Configuration
metadata:
  name: sop
spec:
  crossplane:
    version: ">=v1.9.0-0"
NAME         INSTALLED   HEALTHY   PACKAGE                                    AGE
crossplane   True        True      crossplane-v1.150.0-72.g431b875.dirty.gz   5m16s

Epic #

How can we reproduce it?

What environment did it happen in?

@haarchri haarchri added the bug Something isn't working label Nov 3, 2022
@hasheddan
Copy link
Contributor

Looks like an unhelpful error message here, which we should definitely address 👍🏻 The underlying issue should be solved by #301

@haarchri
Copy link
Member Author

we switched from crossplane to universal-crossplane

---
apiVersion: meta.pkg.crossplane.io/v1
kind: Configuration
metadata:
  name: crossplane-sop-tenant-composition
spec:
  crossplane:
    version: ">=v1.10.0"

in the unhealthy configuration we see only the following events:

Events:
  Type     Reason                  Age                From                                      Message
  ----     ------                  ----               ----                                      -------
  Warning  InstallPackageRevision  96s (x3 over 96s)  packages/configuration.pkg.crossplane.io  current package revision health is unknown
  Warning  InstallPackageRevision  96s                packages/configuration.pkg.crossplane.io  cannot apply package revision: cannot patch object: Operation cannot be fulfilled on configurationrevisions.pkg.crossplane.io "crossplane-sop-tenant-composition": the object has been modified; please apply your changes to the latest version and try again
  Warning  InstallPackageRevision  95s (x3 over 95s)  packages/configuration.pkg.crossplane.io  current package revision is unhealthy

in debug we can see the issue why the configuration is unhealthy:

1.6784413439475956e+09 DEBUG crossplane.events Warning {"object": {"kind":"ConfigurationRevision","name":"crossplane-sop-tenant-composition","uid":"60b8ab97-e80d-4888-b15a-0134c93bed97","apiVersion":"pkg.crossplane.io/v1","resourceVersion":"3457"}, "reason": "LintPackage", "message": "incompatible Crossplane version: package is not compatible with Crossplane version (v1.10.2-up.1)"}

we changed the configuration version to fits for universal-crossplane

---
apiVersion: meta.pkg.crossplane.io/v1
kind: Configuration
metadata:
  name: crossplane-sop-tenant-composition
spec:
  crossplane:
    version: ">=v1.10.1-up.1"

think we should log the DEBUG Message incompatible Crossplane version: package is not compatible with Crossplane version in configuration events

@turkenh
Copy link
Member

turkenh commented Mar 28, 2023

@haarchri until we have a proper fix like #301, appending -0 to xp version constraint could be used as a workaround.

I see you already used that in the first message but in the above one you chose to provide the full XP version, i.e. >=v1.10.1-up.1. Any reason not to use >=v1.10.1-0 there as well?

@jeanduplessis
Copy link
Contributor

Since #301 has been fixed, I will close this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants