Repository navigation
Closed
Labels
bugCategorizes issue or PR as related to a bug.good first issueDenotes an issue ready for a new contributor, according to the "help wanted" guidelines.
Description
Hi
I'm using Helm from Concourse pipeline I just upgraded Helm to 2.6.1 (from 2.4.2) and my pipeline doesn't work anymore.
The culprit line seems to be https://github.com/kubernetes/helm/blob/v2.6.1/pkg/downloader/manager.go#L220
$ helm dependency update
Hang tight while we grab the latest from your chart repositories...
...Successfully got an update from the "ci" chart repository
...Successfully got an update from the "local" chart repository
...Successfully got an update from the "stable" chart repository
Update Complete. ⎈Happy Helming!⎈
Error: Unable to move current charts to tmp dir: rename /tmp/build/put/staging-helm/cvhub-api/charts /tmp/build/put/staging-helm/cvhub-api/tmpcharts: invalid cross-device linkI cannot change the path used by Concourse but if I do the same command manually on my mac from my home directory (i.e not from /tmp) it works:
% ~/Downloads/helm dependency update
Hang tight while we grab the latest from your chart repositories...
...Successfully got an update from the "ci" chart repository
...Successfully got an update from the "local" chart repository
...Successfully got an update from the "stable" chart repository
Update Complete. ⎈Happy Helming!⎈
Saving 1 charts
Downloading elasticsearch-singlenode from repo http://127.0.0.1:8879
±|develop ✘| cvhub-api
% pwd
/Users/nsitbon/github/cvhub-api/scripts/helm/cvhub-apiAs far as I understand the error and the related code it seems that you should not use Rename rather you should use Move.
Any help would be appreciated.
Best regards.
Metadata
Metadata
Assignees
Labels
bugCategorizes issue or PR as related to a bug.good first issueDenotes an issue ready for a new contributor, according to the "help wanted" guidelines.
Activity
redbaron commentedon Oct 4, 2017
It seems that either source or destination is mount point, therefore rename doesn’t work. If you change your concourse pipeline so that both source and destination are on the same mount point it should work
nsitbon commentedon Oct 4, 2017
I know and like I said I'm just a Concourse user I cannot change how it works and how it mounts directory. However I expect Helm working whatever the configuration like before.
bacongobbler commentedon Oct 4, 2017
This should be a relatively quick fix. I know what’s causing this. I’ll make a PR this morning.
bacongobbler commentedon Oct 4, 2017
For now you should downgrade to v2.5.x.
nsitbon commentedon Oct 4, 2017
This is exactly what I did. Thx @bacongobbler
thomastaylor312 commentedon Oct 7, 2017
@bacongobbler Did you end up opening a PR for this? Is it a bug that should be pulled into 2.7?
bacongobbler commentedon Oct 7, 2017
Sorry didn’t get around to making a PR last week, but I’ll have some free time on Monday. Thanks for the ping :)
bacongobbler commentedon Oct 7, 2017
This was a bug introduced in a new feature for 2.6 so yeah it should be slated for 2.7.
redbaron commentedon Oct 9, 2017
Marking it as a bug means, that any use of
os.Renameis a bug "because of concourse". Atomic rename of a.tmpfolder into final destination next to it is a well known, widely use pattern, there is nothing wrong with it.@nsitbon , concourse gives you full control over final mounts and file locations.
nsitbon commentedon Oct 9, 2017
@redbaron I disagree with "widely use pattern" I mean you should not make any assumptions on the filesystem or impose anything. By the way I don't find anything in the concourse documentation giving me access to the final mounts and file location as concourse is using docker to run its tasks it makes sense to mount the result from one task to another via mount points. Anyway Concourse or not I do think you shouldn't impose filesystem requirements because in this case you would force all your users to change their code whereas in the other case you only have to change your code.
bacongobbler commentedon Oct 10, 2017
I also disagree, though for different reasons. I was calling out the fact that we are not utilizing
os.TempDir()as an issue, not the fact that usingos.Renameis a bug. If Concourse sets up and utilizes $TMPDIR correctly, this shouldn't be an issue moving forward, especially since we useioutil.TempDireverywhere else in the codebase.os.Rename is a
moveoperation, so we're doing the right thing here. It's just the fact that we're not writing to a temporary scratch directory that may be the issue.bacongobbler commentedon Oct 10, 2017
#3021 is the proposed fix. @nsitbon if you have some time and are able to build helm from scratch, would you mind testing that fix? Thanks!
redbaron commentedon Oct 10, 2017
It is a fact. It is only way to create a directory with it's content in an atomic way. Every good behaving program creates directories with populated content in this way. What you are asking is essentially to ban
rename(2)syscall when called with directories as an argument. This alone should set alarms off and begs the question is it a right thing to ask. Just search github foros.Rename, every single time it is called on directories, it can break your concourse setup. Do all of them wrong?As for concourse, feel free to ask them on a slack channel, they are very helpful. If you change what task is producing from content of
chartsto achartsdirectory itself, in other words move mount pointeverything will just work.
@bacongobbler patch makes things worse and wont help with this "problem" at all, as it is even more likely that $TMPDIR is on a separate mountpoint from
m.ChartPath. Absolute correct way would be to doioutil.TempDir(m.ChartPath, "tmpcharts"), then there can be no clashes with random leftovers in tmpdir.43 remaining items
bacongobbler commentedon Mar 7, 2019
Thanks for the ping @chriscone.
For reference, here is the PR (had to go looking to find it again): #5038
The PR introduces code from dep, which is BSD-licensed code and is okay to re-license it as Apache 2 code. The problem at hand, though, is that we're unsure if copying code from
internal/fsfollows the DCO.I can't recall who was looking into this, but it probably fell through the cracks. I'll open a ticket with the CNCF service desk and see if we can get the legal team to weigh in on this topic.
de-code commentedon Jul 2, 2019
A simple workaround for me (which I didn't see above), was to just remove the
chartsdirectory - or add it to something like.dockerignoreto not copy it in the first place (if it's part of a Docker build). May not work for everyone.bacongobbler commentedon Aug 14, 2019
due to inactivity, I had to close #5038. If anyone else feels like taking this across the finish line, please feel free!
Deploys project on GKE 1.15.7
Deploys project on GKE 1.15.7
Deploys project on GKE 1.15.7
Deploys project on GKE 1.15.7
Deploys project on GKE 1.15.7
Deploys project on GKE 1.15.7
Deploys project on GKE 1.15.7
Deploys project on GKE 1.15.7
Deploys project on GKE 1.15.7
Deploys project on GKE 1.15.7
bacongobbler commentedon Apr 24, 2020
fixed in #6750.