Add podman machine restart subcommand#28687
Conversation
|
@jaitjacob TYVM for the PR! It looks great overall. You should add a test or two if possible, and there are a few tweaks to do to the documenation. By far the best description I've seen on a PR in a very long time! |
Honny1
left a comment
There was a problem hiding this comment.
Thanks! At first glance, the code looks good. However, the PR is missing tests. Please implement e2e tests for machine. Here is an example you can use as a reference: https://github.com/containers/podman/blob/main/pkg/machine/e2e/start_test.go. You can add a restart_test.go file for this.
|
One of the reasons I never wanted this sub-command is because there were cases were if the Podman binary did not exit, then there could be collision or zombied processes of helper functions or the various sockets and pipes being used. Are you certain that this cannot happen? |
|
in addition to tests, we might need a basic test added to podman-machine-os as well? |
5fb7439 to
e76d4e0
Compare
|
[NON-BLOCKING] Packit jobs failed. @containers/packit-build please check. Everyone else, feel free to ignore. |
e76d4e0 to
1ec2c98
Compare
1ec2c98 to
60fca16
Compare
func Start(...) error {
dirs := ...
if !opts.ReExec {
mc.Lock()
defer mc.Unlock()
}
mc.Refresh()
return startLocked(...) // rest of Start is refactored inside startLocked
}
mc.Lock()
defer mc.Unlock()
mc.Refresh()
stopLocked(...)
startLocked(...) |
60fca16 to
d09e29d
Compare
|
@jaitjacob all kinds of test unhappiness. |
Signed-off-by: Jait Jacob <jai8.jacob@gmail.com>
Signed-off-by: Jait Jacob <jai8.jacob@gmail.com>
Signed-off-by: Jait Jacob <jai8.jacob@gmail.com>
Signed-off-by: Jait Jacob <jai8.jacob@gmail.com>
6cf2765 to
47a7d4b
Compare
Signed-off-by: Jait Jacob <jai8.jacob@gmail.com>
Checklist
Ensure you have completed the following checklist for your pull request to be reviewed:
commits. (
git commit -s). (If needed, usegit commit -s --amend). The author email must matchthe sign-off email address. See CONTRIBUTING.md
for more information.
Fixes: #00000in commit message (if applicable)make validatepr(format/lint checks)Noneif no user-facing changes)Does this PR introduce a user-facing change?
Fixes #28366
This PR implements
podman machine restartsubcommand.Here's how I tested it,
podmanbinary usingmake BUILDTAGS="selinux seccomp" PREFIX=/usrcd bin/./podman machine restart --help& verify help text displays correctly../podman machine list./podman machine startuptime./podman machine restartuptimeagainI also built the docs locally and viewed in browser,
