Skip to content
This repository has been archived by the owner on Mar 27, 2024. It is now read-only.

Windows: Failed to create symlink / error removing file / error retrieving image #409

Closed
sparrowt opened this issue Nov 15, 2023 · 1 comment

Comments

@sparrowt
Copy link

Expected behavior

Ability to compare two images using latest container-diff.exe downloaded from GitHub

Actual behavior

I ran this:
container-diff diff daemon://IMAGENAME:TAG1 daemon://IMAGENAME:TAG2

It spewed a whole bunch of these for different values of FOO

time="2023-11-15T16:53:41Z" level=error msg="Failed to create symlink between FOO and C:\\Users\\USERNAME\\.container-diff\\cache\\daemon_\\IMAGENAME_TAG2\\path\\to\\FOO: symlink FOO C:\\Users\\USERNAME\\.container-diff\\cache\\daemon_\\IMAGENAME_TAG2\\path\\to\\FOO:: A required privilege is not held by the client."
...

followed by these final 2 errors:

time="2023-11-15T16:57:30Z" level=error msg="error removing file C:\\Users\\USERNAME\\.container-diff\\cache\\daemon_\\IMAGENAME_TAG1\\usr\\share\\man\\man1\\:.1.gz"
time="2023-11-15T16:57:30Z" level=error msg="error retrieving image daemon://IMAGENAME:TAG2: getting filesystem for image: remove C:\\Users\\USERNAME\\.container-diff\\cache\\daemon_\\IMAGENAME_TAG2\\usr\\share\\man\\man1\\:.1.gz: The filename, directory name, or volume label syntax is incorrect.\nerror retrieving image daemon://IMAGENAME:TAG1: getting filesystem for image: remove C:\\Users\\USERNAME\\.container-diff\\cache\\daemon_\\IMAGENAME_TAG1\\usr\\share\\man\\man1\\:.1.gz: The filename, directory name, or volume label syntax is incorrect."

and no actual comparison output.

Information

  • container-diff version: v0.17.0 built from git bea7ad9
  • Operating system: Windows 10, 22H2, 19045.3570
  • launched from powershell

Steps to reproduce the behavior

Though I initially hit this on a private image, part of the issue at least seems to repro with other images e.g. choosing 2 public images I happened to have locally:

container-diff diff daemon://alpine:3.14.3 daemon://alpine:3.14.8

This produced a whole bunch of the "Failed to create symlink between" error - though not the other 2 final ones above - so in that case after all the errors I see only the 'Image size diference' but nothing else.

@sparrowt
Copy link
Author

sparrowt commented Nov 15, 2023

Ah, the Failed to create symlink errors no longer occur if I run from an Administrator powershell prompt - assuming this is expected, perhaps the documentation needs updating to mention this for Windows e.g. under https://github.com/GoogleContainerTools/container-diff#windows ? (happy to open a PR if so)

Nevertheless for my private image the other errors (error removing file and thus error retrieving image) still remain so no comparison can be performed. Is it that the file name actually contains a colon :.1.gz?

Looking in the affected .container-diff\cache folder I see a file with the name ..1.gz so perhaps something is replacing the : with a . but then trying to delete it by its original name?

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

No branches or pull requests

2 participants