Actions
Bug #57107
closedtrash purge schedule subcommands aren't working on el9
% Done:
0%
Source:
Tags:
backport_processed
Backport:
pacific,quincy
Regression:
No
Severity:
3 - minor
Reviewed:
Description
The order in which objects with static storage duration in different TUs are initialized is undefined. If the compiler chooses to initialize Shell::Action objects in action/Trash.cc before Shell::Action objects in action/TrashPurgeSchedule.cc, all "rbd trash purge schedule ..." commands get shadowed by "rbd trash purge" command:
$ rbd trash purge schedule list rbd: too many arguments
The confusing error arises because "rbd trash purge" takes a single positional argument. "schedule" gets interpreted as <pool-spec> and "list" generates an error.
Help is busted the same way:
$ rbd help trash purge schedule list usage: rbd trash purge [--pool <pool>] [--namespace <namespace>] [--no-progress] [--expired-before <expired-before>] [--threshold <threshold>] <pool-spec> Remove all expired images from trash. Positional arguments <pool-spec> pool specification (example: <pool-name>[/<namespace>] Optional arguments -p [ --pool ] arg pool name --namespace arg namespace name --no-progress disable progress output --expired-before date purges images that expired before the given date --threshold arg purges images until the current pool data usage is reduced to X%, value range: 0.0-1.0
Actions