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

Provider fails to correctly create a device. #10

Closed
KrystianMarek opened this issue Jul 26, 2022 · 1 comment
Closed

Provider fails to correctly create a device. #10

KrystianMarek opened this issue Jul 26, 2022 · 1 comment
Labels
bug Something isn't working

Comments

@KrystianMarek
Copy link

KrystianMarek commented Jul 26, 2022

What happened?

I tried to create a device resource. According to the provider, the operation exited with error. In fact, numerous new devices were created in metal. They were visible via the UI.

Provider produces a debug log message:

2022-07-26T15:09:38.726Z	DEBUG	provider-tf-equinix-metal	Cannot create external resource	{"controller": "managed/device.equinixmetal.jet.crossplane.io/v1alpha1, kind=device", "request": "/equinix-metal-provider", "uid": "5a41f85c-8409-4cfc-aef1-a0af63b1f2b9", "version": "190213", "external-name": "", "error": "cannot apply: apply failed: ", "errorVerbose": "apply failed: \ncannot apply\ngithub.com/crossplane-contrib/terrajet/pkg/controller.(*external).Create\n\t/home/runner/work/provider-tf-equinix-metal/provider-tf-equinix-metal/vendor/github.com/crossplane-contrib/terrajet/pkg/controller/external.go:200\ngithub.com/crossplane/crossplane-runtime/pkg/reconciler/managed.(*Reconciler).Reconcile\n\t/home/runner/work/provider-tf-equinix-metal/provider-tf-equinix-metal/vendor/github.com/crossplane/crossplane-runtime/pkg/reconciler/managed/reconciler.go:800\nsigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).reconcileHandler\n\t/home/runner/work/provider-tf-equinix-metal/provider-tf-equinix-metal/vendor/sigs.k8s.io/controller-runtime/pkg/internal/controller/controller.go:298\nsigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).processNextWorkItem\n\t/home/runner/work/provider-tf-equinix-metal/provider-tf-equinix-metal/vendor/sigs.k8s.io/controller-runtime/pkg/internal/controller/controller.go:253\nsigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).Start.func2.2\n\t/home/runner/work/provider-tf-equinix-metal/provider-tf-equinix-metal/vendor/sigs.k8s.io/controller-runtime/pkg/internal/controller/controller.go:214\nruntime.goexit\n\t/opt/hostedtoolcache/go/1.17.3/x64/src/runtime/asm_arm64.s:1133"}
2022-07-26T15:09:38.727Z	DEBUG	controller-runtime.manager.events	Warning	{"object": {"kind":"Device","name":"equinix-metal-provider","uid":"5a41f85c-8409-4cfc-aef1-a0af63b1f2b9","apiVersion":"device.equinixmetal.jet.crossplane.io/v1alpha1","resourceVersion":"190377"}, "reason": "CannotCreateExternalResource", "message": "cannot apply: apply failed: "}

How can we reproduce it?

On a kind cluster apply:

apiVersion: device.equinixmetal.jet.crossplane.io/v1alpha1
kind: Device
metadata:
  name: equinix-metal-provider
  namespace: crossplane-system
spec:
  providerConfigRef:
    name: equinix-metal-provider
  forProvider:
    operatingSystem: flatcar_stable
    plan: c3.small.x86
    projectId: <edited>
    facilities:
      - da6
    tags:
      - crossplane
    hostname: crossplane-test
apiVersion: pkg.crossplane.io/v1alpha1
kind: ControllerConfig
metadata:
  name: equinix-metal-provider
  namespace: crossplane-system
spec:
  args:
    - '--debug'
  env:
    - name: PACKNGO_DEBUG
      value: "1"
apiVersion: pkg.crossplane.io/v1
kind: Provider
metadata:
  name: crossplane-provider-tf-equinix-metal
  namespace: crossplane-system
spec:
  package: crossplane/provider-tf-equinix-metal:v0.2.2
  packagePullPolicy: IfNotPresent
  controllerConfigRef:
    name: equinix-metal-provider
apiVersion: equinixmetal.jet.crossplane.io/v1alpha1
kind: ProviderConfig
metadata:
  name: equinix-metal-provider
  namespace: crossplane-system
spec:
  credentials:
    source: Secret
    secretRef:
      name: metal-creds
      key: credentials
      namespace: crossplane-system

What environment did it happen in?

Crossplane version: 1.9

@KrystianMarek KrystianMarek added the bug Something isn't working label Jul 26, 2022
@displague
Copy link
Collaborator

Closing as won't fix, but this should be resolved in the replacement project.
See #11

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

2 participants