containers / storage

Container Storage Library
Apache License 2.0
563 stars 244 forks source link

copy.DirCopy fails when encountering sockets #2113

Closed anderbubble closed 1 week ago

anderbubble commented 1 month ago

We use copy.DirCopy and have encountered a behavior that, if the source contains sockets, the copy operation fails with an error of the form:

lchown /var/lib/warewulf/chroots/gpuslurm/rootfs/run/user/0/gnupg/d.kg8ijih5tq41ixoeag4p1qup/S.gpg-agent: no such file or directory

Could copy.DirCopy be updated to ignore sockets in the source in stead?

Reported for Warewulf at https://github.com/warewulf/warewulf/issues/892

giuseppe commented 1 month ago

yes, I think we should skip sockets. Would you like to open a PR?

anderbubble commented 1 month ago

yes, I think we should skip sockets. Would you like to open a PR?

I'll have a look; thanks!

anderbubble commented 1 month ago

@giuseppe PR submitted. Thanks for the support! Let me know if there's anything else you need from me, particularly to get it backported to a release that supports go 1.21 or earlier.