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

Issue with recurseSubmodules on 0.37.1 #970

Closed
cdm-arm opened this issue Nov 25, 2022 · 11 comments · Fixed by #975
Closed

Issue with recurseSubmodules on 0.37.1 #970

cdm-arm opened this issue Nov 25, 2022 · 11 comments · Fixed by #975
Assignees
Labels
area/git Git related issues and pull requests bug Something isn't working
Milestone

Comments

@cdm-arm
Copy link

cdm-arm commented Nov 25, 2022

Since update from 0.36 to 0.37.1 the below git repo definitions fail with this error:

{"level":"error","ts":"2022-11-25T17:36:54.324Z","msg":"Reconciler error","controller":"gitrepository","controllerGroup":"source.toolkit.fluxcd.io","controllerKind":"GitRepository","GitRepository":{"name":"abc-atest","namespace":"flux-system"},"namespace":"flux-system","name":"abc-atest","reconcileID":"d42e4151-0c5a-471f-bac5-ecee1927183d","error":"failed to checkout and determine revision: unable to clone 'https://bitbucket.example.com/bitbucket/scm/DEPLOYKUB/abc-atest.git': feature not supported"}

The source definition:

apiVersion: source.toolkit.fluxcd.io/v1beta2
kind: GitRepository
metadata:
  name: abc-atest
  namespace: flux-system
spec:
  recurseSubmodules: true
  interval: 1m2s
  ref:
    branch: master
  secretRef:
    name: bitbucket
  url: https://bitbucket.example.com/bitbucket/scm/DEPLOYKUB/abc-atest.git

The moment I remove the recurseSubmodules: true it get's fetched.

@pjbgf pjbgf added bug Something isn't working area/git Git related issues and pull requests labels Nov 25, 2022
@pjbgf pjbgf added this to the Bootstrap GA milestone Nov 25, 2022
@aryan9600 aryan9600 self-assigned this Nov 28, 2022
@pjbgf
Copy link
Member

pjbgf commented Nov 29, 2022

@aek-arm we have created a rc image to test the fix for this: ghcr.io/fluxcd/source-controller:rc-f50e968f. Changes are on branch fix-chroot.

Can you please give it a try and confirm whether it resolves your issue?

@pjbgf
Copy link
Member

pjbgf commented Nov 30, 2022

There was an issue with the previous rc release build. A new image has been generated (still from the same branch). The image above has been updated accordingly.

@cdm-arm
Copy link
Author

cdm-arm commented Nov 30, 2022

Hi @pjbgf - We'll try that one and give feedback.

@cdm-arm
Copy link
Author

cdm-arm commented Dec 7, 2022

Hi @pjbgf

Sorry for late reply, I had to define and setup a cluster first.

I changed gotk-components.yaml like below, committed and pushed:
#image: ghcr.io/fluxcd/source-controller:v0.32.1
image: ghcr.io/fluxcd/source-controller:rc-f50e968f

~ flux reconcile kustomization flux-system --with-source
► annotating GitRepository flux-system in flux-system namespace
✔ GitRepository annotated
◎ waiting for GitRepository reconciliation
✔ fetched revision develop/d63761677e8c507911ce525a18b4b6c92d6cdf97
► annotating Kustomization flux-system in flux-system namespace
✔ Kustomization annotated
◎ waiting for Kustomization reconciliation
✔ applied revision develop/d63761677e8c507911ce525a18b4b6c92d6cdf97

It proceed but then is failing with this errors on "mkdir modules: read-only file" - while the helm charts before get fetched and stored.

{"level":"error","ts":"2022-12-07T17:12:37.522Z","msg":"failed to checkout and determine revision: unable to clone 'https://git.example.com/bitbucket/scm/KUBDEP/cdm-mm-config.git': mkdir modules: read-only file system","controller":"gitrepository","controllerGroup":"source.toolkit.fluxcd.io","controllerKind":"GitRepository","GitRepository":{"name":"cdm-mm-config","namespace":"flux-system"},"namespace":"flux-system","name":"cdm-mm-config","reconcileID":"cd8ddcb5-a547-4a7a-89b1-6c1c8a6aff3c","error":"failed to checkout and determine revision: unable to clone 'https://git.example.com/bitbucket/scm/KUBDEP/cdm-mm-config.git': mkdir modules: read-only file system"}

{"level":"error","ts":"2022-12-07T17:12:37.566Z","msg":"Reconciler error","controller":"gitrepository","controllerGroup":"source.toolkit.fluxcd.io","controllerKind":"GitRepository","GitRepository":{"name":"cdm-mm-config","namespace":"flux-system"},"namespace":"flux-system","name":"cdm-mm-config","reconcileID":"cd8ddcb5-a547-4a7a-89b1-6c1c8a6aff3c","error":"failed to checkout and determine revision: unable to clone 'https://git.example.com/bitbucket/scm/KUBDEP/cdm-mm-config.git': mkdir modules: read-only file system"}

Happy to try any other bug fix

@pjbgf
Copy link
Member

pjbgf commented Dec 7, 2022

Thank you @aek-arm, we will try to reproduce and come up with another fix. (@aryan9600)

@pjbgf
Copy link
Member

pjbgf commented Dec 12, 2022

@aek-arm we have another fix for you. Do you mind retrying with ghcr.io/fluxcd/source-controller:rc-d24afcf2 please?

@cdm-arm
Copy link
Author

cdm-arm commented Dec 12, 2022

@pjbgf - can confirm it works!

{"level":"info","ts":"2022-12-12T13:51:55.329Z","msg":"stored artifact for commit 'mycommit k8s-base-tenants-master submodule updg...'","controller":"gitrepository","controllerGroup":"source.toolkit.fluxcd.io","controllerKind":"GitRepository","GitRepository":{"name":"my-kustomization","namespace":"flux-system"},"namespace":"flux-system","name":"my-kustomization","reconcileID":"5b4b9fae-9b50-4e98-bc9f-e722325d0d30"}

@pjbgf
Copy link
Member

pjbgf commented Dec 12, 2022

@aek-arm excellent, thank you very much for confirming. 🙇

@cdm-arm
Copy link
Author

cdm-arm commented Dec 12, 2022

For those looking how to test, just patch from the kustomization.yaml

apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- gotk-components.yaml
- gotk-sync.yaml
patches:
  - patch: | 
      - op: replace
        path: /spec/template/spec/containers/0/image
        value: ghcr.io/fluxcd/source-controller:rc-d24afcf2
    target:
      kind: Deployment
      name: source-controller

@cdm-arm
Copy link
Author

cdm-arm commented Dec 12, 2022

@aek-arm excellent, thank you very much for confirming. 🙇

@pjbgf any chance that will make it into 0.37.1?

@pjbgf
Copy link
Member

pjbgf commented Dec 12, 2022

@aek-arm that's the plan. Once #977 is merged, #975 is next.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/git Git related issues and pull requests bug Something isn't working
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

3 participants