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

Could not update application spec: stat /tmp: no such file or directory #560

Open
chrismith-equinix opened this issue May 1, 2023 · 5 comments
Labels
bug Something isn't working

Comments

@chrismith-equinix
Copy link

Describe the bug
ArgoCD Image Updater is correctly discovering that there is a new image in the registry, however it is unable to update the Application spec and fails with this error in the log:

Could not update application spec: stat /tmp: no such file or directory

I have verified that the Connected Repo is working(it says "Connection Status: Successful" on the Connected Repos page), and the Image Registry connection is also good as it is able to pull the tags.

To Reproduce

Create an Application in ArgoCD UI using the following annotations:

    argocd-image-updater.argoproj.io/image-list: argocdapp=myregistry/argocd-test-app:0.0.x
    argocd-image-updater.argoproj.io/write-back-method: git
    argocd-image-updater.argoproj.io/git-branch: develop
    argocd-image-updater.argoproj.io/argocdapp.update-strategy: semver
    argocd-image-updater.argoproj.io/argocdapp.force-update: "true"

Expected behavior

I would expect that the new image would get deployed into K8S, and the new image version would be committed back to git successfully.

Additional context

Kubernetes: Minikube
Running on MacOS (M2 Max)

Version

ArgoCD Version: v2.6.7+5bcd846
Image Updater Version: 0.12.0

Logs

time="2023-05-01T16:51:33Z" level=info msg="Setting new image to myregistry/argocd-test-app:0.0.5" alias=argocdapp application=cid-uat-build image_name=argocd-test-app image_tag=0.0.2 registry=myregistry
time="2023-05-01T16:51:33Z" level=info msg="Successfully updated image 'myregistry/argocd-test-app:0.0.2' to 'myregistry/argocd-test-app:0.0.5', but pending spec update (dry run=false)" alias=argocdapp application=cid-uat-build image_name=argocd-test-app image_tag=0.0.2 registry=myregistry
time="2023-05-01T16:51:33Z" level=info msg="Committing 1 parameter update(s) for application cid-uat-build" application=cid-uat-build
time="2023-05-01T16:51:33Z" level=info msg="Starting configmap/secret informers"
time="2023-05-01T16:51:33Z" level=info msg="Configmap/secret informer synced"
time="2023-05-01T16:51:33Z" level=error msg="Could not update application spec: stat /tmp: no such file or directory" application=cid-uat-build
time="2023-05-01T16:51:33Z" level=info msg="configmap informer cancelled"
time="2023-05-01T16:51:33Z" level=info msg="secrets informer cancelled"
time="2023-05-01T16:51:33Z" level=info msg="Processing results: applications=2 images_considered=2 images_skipped=0 images_updated=0 errors=1"
@chrismith-equinix chrismith-equinix added the bug Something isn't working label May 1, 2023
@chrismith-equinix
Copy link
Author

This seems to only be an issue when running Kubernetes(Minikube) on arm64. I used the exact same config on a cluster deployed on amd64 and everything worked fine.

@valves-ops
Copy link

I've encountered the same problem while running the Image Updater on version v0.12.0 on a Raspberry Pi 4 (also arm64).

I've traced the error back to this line
tempRoot, err := os.MkdirTemp(os.TempDir(), fmt.Sprintf("git-%s", app.Name))

And one possible cause, as seen in other places the same error popped up, could be the lack of the /tmp directory.
Given that the project uses alpine:latest image and it comes with the /tmp directory, I decide to rebuild the argo-image-updater image and check if the error would go away. And that's exactly what happened.

Checking the registry, I've noticed there are some builds to newer releases (v0.12.2 at the time of this writing), so I decided to try them out as well. And the error also did not pop up.

So, I guess, for this issue to be finally closed it is for the stable install manifest to be updated to v0.12.0.

@8th-block
Copy link

8th-block commented Oct 3, 2023

I've encountered the same problem while running the Image Updater on version v0.12.0 on a Raspberry Pi 4 (also arm64).

I've traced the error back to this line tempRoot, err := os.MkdirTemp(os.TempDir(), fmt.Sprintf("git-%s", app.Name))

And one possible cause, as seen in other places the same error popped up, could be the lack of the /tmp directory. Given that the project uses alpine:latest image and it comes with the /tmp directory, I decide to rebuild the argo-image-updater image and check if the error would go away. And that's exactly what happened.

Checking the registry, I've noticed there are some builds to newer releases (v0.12.2 at the time of this writing), so I decided to try them out as well. And the error also did not pop up.

So, I guess, for this issue to be finally closed it is for the stable install manifest to be updated to v0.12.0.

Not the case for me. Using on Pi4 v 0.12.0 and same issue pops up. Together with the x509 for docker.io registries. May be you meant "...updated to 0.12.2"?

@8th-block
Copy link

Can confirm updatng manually to 0.12.2 resolves all the issues ...

@cheleb
Copy link

cheleb commented Nov 16, 2023

I don't think so :'( at least on M1 I also have a:

time="2023-11-16T18:44:10Z" level=error msg="Could not update application spec: chdir /tmp/git-zio-hexagonal-apps675939650/base: no such file or directory" application=zio-hexagonal-apps

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

4 participants