mirror of
https://github.com/containers/podman.git
synced 2025-07-15 03:02:52 +08:00
rootless: disable pod stats
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
This commit is contained in:
cmd/podman
@ -71,6 +71,7 @@ var cmdsNotRequiringRootless = map[*cobra.Command]bool{
|
|||||||
_killCommand: true,
|
_killCommand: true,
|
||||||
_pauseCommand: true,
|
_pauseCommand: true,
|
||||||
_podKillCommand: true,
|
_podKillCommand: true,
|
||||||
|
_podStatsCommand: true,
|
||||||
_restartCommand: true,
|
_restartCommand: true,
|
||||||
_runCommand: true,
|
_runCommand: true,
|
||||||
_unpauseCommand: true,
|
_unpauseCommand: true,
|
||||||
|
@ -53,6 +53,11 @@ func init() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func podStatsCmd(c *cliconfig.PodStatsValues) error {
|
func podStatsCmd(c *cliconfig.PodStatsValues) error {
|
||||||
|
|
||||||
|
if os.Geteuid() != 0 {
|
||||||
|
return errors.New("stats is not supported in rootless mode")
|
||||||
|
}
|
||||||
|
|
||||||
format := c.Format
|
format := c.Format
|
||||||
all := c.All
|
all := c.All
|
||||||
latest := c.Latest
|
latest := c.Latest
|
||||||
|
Reference in New Issue
Block a user