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

Insufficient error message: "unknown error: remote:" #101

Closed
ugurarpaci opened this issue Jan 27, 2021 · 4 comments
Closed

Insufficient error message: "unknown error: remote:" #101

ugurarpaci opened this issue Jan 27, 2021 · 4 comments

Comments

@ugurarpaci
Copy link

Image automation controller gives the following error log:

{
  "level": "error",
  "ts": "2021-01-27T12:34:46.613Z",
  "logger": "controller-runtime.manager.controller.imageupdateautomation",
  "msg": "Reconciler error",
  "reconciler group": "image.toolkit.fluxcd.io",
  "reconciler kind": "ImageUpdateAutomation",
  "name": "flux-system",
  "namespace": "flux-system",
  "error": "unknown error: remote: ",
  "stacktrace": "sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).processNextWorkItem\n\t/go/pkg/mod/sigs.k8s.io/controller-runtime@v0.8.0/pkg/internal/controller/controller.go:248\nsigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).Start.func1.1\n\t/go/pkg/mod/sigs.k8s.io/controller-runtime@v0.8.0/pkg/internal/controller/controller.go:211\nk8s.io/apimachinery/pkg/util/wait.JitterUntilWithContext.func1\n\t/go/pkg/mod/k8s.io/apimachinery@v0.20.2/pkg/util/wait/wait.go:185\nk8s.io/apimachinery/pkg/util/wait.BackoffUntil.func1\n\t/go/pkg/mod/k8s.io/apimachinery@v0.20.2/pkg/util/wait/wait.go:155\nk8s.io/apimachinery/pkg/util/wait.BackoffUntil\n\t/go/pkg/mod/k8s.io/apimachinery@v0.20.2/pkg/util/wait/wait.go:156\nk8s.io/apimachinery/pkg/util/wait.JitterUntil\n\t/go/pkg/mod/k8s.io/apimachinery@v0.20.2/pkg/util/wait/wait.go:133\nk8s.io/apimachinery/pkg/util/wait.JitterUntilWithContext\n\t/go/pkg/mod/k8s.io/apimachinery@v0.20.2/pkg/util/wait/wait.go:185\nk8s.io/apimachinery/pkg/util/wait.UntilWithContext\n\t/go/pkg/mod/k8s.io/apimachinery@v0.20.2/pkg/util/wait/wait.go:99"
}

I am using gitlab token to provision the flux deployment. The command that I use as follows:

export GITLAB_TOKEN="xxxx"

flux bootstrap gitlab \
    --owner=xxx/xxx \
    --repository="xxx"  \
    --branch=master \
    --log-level debug \
    --hostname="gitlab.com" \
    --path="xxx/xxx" \
    --components-extra=image-reflector-controller,image-automation-controller

Flux version:

flux version 0.7.2

With the error log that I receive from image-automation-controller, I do not see useful information to troubleshoot this issue.

@stefanprodan
Copy link
Member

Please post here:

  • the ImageUpdateAutomation manifest
  • the size of your repository including .git
  • the token type and permissions

@ugurarpaci
Copy link
Author

Image automation objects that I deployed to the cluster:

apiVersion: image.toolkit.fluxcd.io/v1alpha1
kind: ImageRepository
metadata:
  name: xxxx
  namespace: flux-system
spec:
  interval: 1m
  image: REGISTRY
  secretRef:
    name: regcred
---
apiVersion: image.toolkit.fluxcd.io/v1alpha1
kind: ImagePolicy
metadata:
  name: xxxx
  namespace: flux-system
spec:
  imageRepositoryRef:
    name: xxxx
  filterTags:
    pattern: '^develop-(?P<id>.*)'
    extract: '$id'
  policy:
    alphabetical:
      order: asc
---
apiVersion: image.toolkit.fluxcd.io/v1alpha1
kind: ImageUpdateAutomation
metadata:
  name: flux-system
  namespace: flux-system
spec:
  checkout:
    branch: main
    gitRepositoryRef:
      name: flux-system
  commit:
    authorEmail: fluxv2@foo.com
    authorName: fluxv2
    messageTemplate: '[ci skip] update image'
  interval: 1m0s

Repository size is 536K.

Token information:
image

@ugurarpaci
Copy link
Author

Hello,

I think this issue is resolved on my end. I realized that I forget to add --token-auth flag when I bootstrap the flux. A proper error message would still be helpful though :). I am closing this issue now.

@thanatchakromsang
Copy link

thanatchakromsang commented Mar 2, 2021

For some folks that coming here and rely on Deploy key instead of personal GITLAB_TOKEN.

In order for ImageUpdateAutomation to work without bootstrap using --token-auth we need to enable write access to Deploy key that flux use

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants