talos
talos copied to clipboard
Fix for etcd snapshot on windows
Pull Request
What? (description)
Fix talosctl etcd snapshot
on windows. Before PR change, executing ./talosctl.exe etcd snapshot ./etcd.db
on windows would give me:
error renaming to final location: rename ./etcd.db.part ./etcd.db: The process cannot access the file because it is being used by another process.
Why? (reasoning)
Standard windows file locking issue, dest not being closed before trying to re-open it for the os.Rename()
.
Acceptance
I didn't quite get my environment all the way set up, make conformance and make unit-tests isn't running locally, but I did build talosctl with my change and verify it fixed my issue and generated an etcd snapshot.
Please use the following checklist:
- [ ] you linked an issue (if applicable)
- [ ] you included tests (if applicable)
- [ ] you ran conformance (
make conformance
) - [x] you formatted your code (
make fmt
) - [x] you linted your code (
make lint
) - [x] you generated documentation (
make docs
) - [ ] you ran unit-tests (
make unit-tests
)
See
make help
for a description of the available targets.
could you please fix your commit message to include the DCO?
git commit --amend -s
and make it something like: fix: etcd snapshot command on Windows
with some non-empty commit body?
/ok-to-test
/m