-
Notifications
You must be signed in to change notification settings - Fork 905
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
Warn when unable to snapshot locked files #313
Comments
This is no bueno. I wouldn't want to disable snapshotting, because otherwise it can't uninstall the files. |
Rather add some fault tolerance around the snapshot and let it continue. |
yeah, got it. anyway, this pushes developer to keep such files outside of choco package install path. |
I'll be addressing this quickly, so hopefully you won't need to. What I'm stating here is:
|
fully agree 👍 , but actually, it would be nice if those files will be snapshotted too! it just somehow had to be done before they start running and became unreadable. i think its complicated flow, coz snapshotting take place after package install script ran, and those kinda files became unavailable for reading (when it issues start-service call) inside chocoInstall script. |
Yes - although if the files are inside the package, they will be removed by nuget core when uninstalled as long as they have not changed. |
they actually are downloading during installation from the web by chocolateyInstall.ps1, so they are not there in advance |
Well darn. That makes it a bit hard to capture. One thing we could do is explore the Volume Shadow Service to get those checksums if it errors. That would be a followup to this though. |
Any chance you can provide a log so I can see where this happens at? |
In testing this, I don't see it as an error, just a warning. I've added code to add a special snapshot code for locked files, but without using something like Volume Shadow Copy Service there is no way to snapshot the locked file. |
Was your package installation failing on this or just giving you a warning? |
I created #321 to followup on a VSS type of fix to snapshot locked files. It's not the easiest thing to achieve so it's move back. For now this issue is resolved with a special snapshot code and a warning when removing the file. |
When a locked file is detected, use a special code for it instead of file too big. When cleaning up the files during uninstall, provide messages for the user to take action on those locked files as they will be in the best place to determine whether they should stick around or get removed.
* stable: (maint) formatting (GH-313) Snapshot detection of locked files (maint) formatting Conflicts: src/chocolatey/infrastructure/filesystem/DotNetFileSystem.cs
Added messaging in 8a283d6 |
The checksum snapshotting prevents service installation scenarios:
Package installation process looks like:
error here: 5) chocolatey checksum snapshot will fail to read ran exe file (service)
The text was updated successfully, but these errors were encountered: