Closed ccremer closed 3 years ago
btw, it says also Version: unreleased
and Build Date: now
;)
This seems to happen if wrestic is run in a container. Wrestic's own integration test works without issues. Although wrestic's test checks a slightly different case, but the command handling seems to be working there.
Maybe there's some race condition if started in a container. Because cmd.Start()
is definitely called before cmd.Wait()
https://github.com/vshn/wrestic/blob/master/restic/command.go#L43. The docs only stated that Wait()
should only be called after Start()
but it doesn't state if the actual process already needs to be running. I assume the process hasn't started yet so cmd.Wait()
fails.
chmod +x /usr/local/bin/restic
🤦
But I wonder why cmd.Start()
doesn't return an error that the binary can't be started...
I'll open a PR later to address this. Also including an additional check to catch this.
Describe the bug
Running wrestic v0.2.1 ends up in a container crashloop
Additional context
I think the current implementation fails for any command, it may not be limited to repository inializing only. It looks something fundamentally is bugged with command handling.
Logs
If applicable, add logs to help explain your problem.
Expected behavior
Wrestic should be able to initialize the repository.
To Reproduce
Steps to reproduce the behavior:
export WRESTIC_IMAGE=quay.io/vshn/wrestic:v0.2.1
make e2e-test
kubectl -n k8up-e2e-subject logs -l job-name=k8up-k8up-backup
Environment (please complete the following information):