helm: ...\repositories.yaml: The process cannot access the file...
I am trying Helm 3 Beta 4 and am running into an issue when trying to add a repo. When I try the same thing with Beta 3 I do not get the error.
Command helm repo add stable https://kubernetes-charts.storage.googleapis.com/
Result Error: read C:\Users\me\AppData\Roaming\helm\repositories.yaml: The process cannot access the file because another process has locked a portion of the file.
Output of helm version:
version.BuildInfo{Version:“v3.0.0-beta.4”, GitCommit:“7ffc879f137bd3a69eea53349b01f05e3d1d2385”, GitTreeState:“dirty”, GoVersion:“go1.13.1”}
Output of kubectl version:
Client Version: version.Info{Major:“1”, Minor:“14”, GitVersion:“v1.14.6”, GitCommit:“96fac5cd13a5dc064f7d9f4f23030a6aeface6cc”, GitTreeState:“clean”, BuildDate:“2019-08-19T11:13:49Z”, GoVersion:“go1.12.9”, Compiler:“gc”, Platform:“windows/amd64”}
Server Version: version.Info{Major:“1”, Minor:“14”, GitVersion:“v1.14.6”, GitCommit:“96fac5cd13a5dc064f7d9f4f23030a6aeface6cc”, GitTreeState:“clean”, BuildDate:“2019-08-19T11:05:16Z”, GoVersion:“go1.12.9”, Compiler:“gc”, Platform:“linux/amd64”}
Cloud Provider/Platform (AKS, GKE, Minikube etc.): Docker for Windows
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Reactions: 3
- Comments: 26 (14 by maintainers)
acquiring a lockfile instead of locking the repository file fixes the issue. It is indeed due to https://github.com/gofrs/flock/issues/42 as @hickeyma pointed out:
Will submit a PR.
The fix is available in Helm 2.16.0-rc.1.
https://github.com/helm/helm/compare/v2.15.2...v2.16.0-rc.1
Certainly.
It was identified in https://github.com/helm/helm/issues/6770 that it was not released in 2.15.0 or 2.15.1. It will be in 2.15.2. Sorry about that!
For now, you may either build from source from the HEAD of the
dev-v2branch, or downgrade to 2.14.3. Either that or run Helm from a machine running an operating system other than Windows.Im trying to work around this issue by downgrading to helm v3.0.0-beta3. I have successfully added the stable repo with
helm repo add stable https://kubernetes-charts.storage.googleapis.com/. The content ofC:\Users\$USER\AppData\Roaming\helm\repositories.ymlis now:Switched back to
v3.0.0-beta4and the commandhelm repo listreturns the configured repo. Now I can get back to learning Kubernetes & Helm. 🙂