pedantic oddity regarding "timeout" option for "podman stop"
just noticed (and verified) the following ... while "man podman-stop" documents the three variations for the timeout option: --timeout, --time, t=time Timeout to wait before forcibly stopping the container the code itself associates "-t" with "--timeout", as opposed to "--time", and checks for conflicts with: flags.UintVar(&stopCommand.Timeout, "time", define.CtrRemoveTimeout, "Seconds to wait for stop before killing the container") flags.UintVarP(&stopCommand.Timeout, "timeout", "t", define.CtrRemoveTimeout, "Seconds to wait for stop before killing the container") ... snip ... func stopCmd(c *cliconfig.StopValues) error { if c.Flag("timeout").Changed && c.Flag("time").Changed { return errors.New("the --timeout and --time flags are mutually exclusive") } amusingly, the above appears to allow the combination of "--timeout" and "-t" with no problem, which seems counter-intuitive. rday -- ======================================================================== Robert P. J. Day Ottawa, Ontario, CANADA http://crashcourse.ca Twitter: http://twitter.com/rpjday LinkedIn: http://ca.linkedin.com/in/rpjday ========================================================================
Hi Robert, if you feel that's a bug, would you open a pull request upstream? Kind regards, Valentin On Mon, Jan 27, 2020 at 10:30 PM Robert P. J. Day <rpjday@crashcourse.ca> wrote:
just noticed (and verified) the following ... while "man podman-stop" documents the three variations for the timeout option:
--timeout, --time, t=time
Timeout to wait before forcibly stopping the container
the code itself associates "-t" with "--timeout", as opposed to "--time", and checks for conflicts with:
flags.UintVar(&stopCommand.Timeout, "time", define.CtrRemoveTimeout, "Seconds to wait for stop before killing the container") flags.UintVarP(&stopCommand.Timeout, "timeout", "t", define.CtrRemoveTimeout, "Seconds to wait for stop before killing the container")
... snip ...
func stopCmd(c *cliconfig.StopValues) error { if c.Flag("timeout").Changed && c.Flag("time").Changed { return errors.New("the --timeout and --time flags are mutually exclusive") }
amusingly, the above appears to allow the combination of "--timeout" and "-t" with no problem, which seems counter-intuitive.
rday
--
======================================================================== Robert P. J. Day Ottawa, Ontario, CANADA http://crashcourse.ca
Twitter: http://twitter.com/rpjday LinkedIn: http://ca.linkedin.com/in/rpjday ======================================================================== _______________________________________________ Podman mailing list -- podman@lists.podman.io To unsubscribe send an email to podman-leave@lists.podman.io
On Tue, 28 Jan 2020, Valentin Rothberg wrote:
Hi Robert,
if you feel that's a bug, would you open a pull request upstream?
Kind regards, Valentin
eh, not really a bug, just an oddity. i'm sure i can find more significant stuff to fix. :-) rday
On 2020-01-28 06:16, Robert P. J. Day wrote:
On Tue, 28 Jan 2020, Valentin Rothberg wrote:
Hi Robert,
if you feel that's a bug, would you open a pull request upstream?
Kind regards, Valentin
eh, not really a bug, just an oddity. i'm sure i can find more significant stuff to fix. :-)
rday
We're using flag normalization to fix this for `podman run --net` vs `podman run --network` so I think the same could be done here. Thanks, Matt Heon
_______________________________________________ Podman mailing list -- podman@lists.podman.io To unsubscribe send an email to podman-leave@lists.podman.io
On 1/28/20 9:21 AM, Matt Heon wrote:
On 2020-01-28 06:16, Robert P. J. Day wrote:
On Tue, 28 Jan 2020, Valentin Rothberg wrote:
Hi Robert,
if you feel that's a bug, would you open a pull request upstream?
Kind regards, Valentin
eh, not really a bug, just an oddity. i'm sure i can find more significant stuff to fix. :-)
rday
We're using flag normalization to fix this for `podman run --net` vs `podman run --network` so I think the same could be done here.
Thanks, Matt Heon
_______________________________________________ Podman mailing list -- podman@lists.podman.io To unsubscribe send an email to podman-leave@lists.podman.io
_______________________________________________ Podman mailing list -- podman@lists.podman.io To unsubscribe send an email to podman-leave@lists.podman.io
Pleas open an issue on this, should be an easy fix.
participants (4)
-
Daniel Walsh -
Matt Heon -
Robert P. J. Day -
Valentin Rothberg