When the number of args provided to --build is not a multiple of 3,
display the arguments which do not comply.
For instance the --debug_crush 0 option is not consumed by global_init
in crushtool because, unlike most ceph tools, the arguments are not
passed to global_init. As a result --debug_crush 0 become part of the
arguments and triggers the failure.
crushtool --debug_crush 0 --build --num_osds 320 node straw 4
remaining args: [--debug_crush,0,node,straw,4]
layers must be specified with 3-tuples of (name, buckettype, size)
Signed-off-by: Loic Dachary <loic@dachary.org>
}
else {
if ((args.size() % 3) != 0U) {
+ cerr << "remaining args: " << args << std::endl;
cerr << "layers must be specified with 3-tuples of (name, buckettype, size)"
<< std::endl;
exit(EXIT_FAILURE);