cephadm: check if cephadm is root after cli is parsed
Fixes: https://tracker.ceph.com/issues/53572
Perform a check if cephadm is root after the CLI arguments are parsed
but before logging is configured. This allows a user to get help on
cephadm without requiring to be root or use sudo, etc.
The root check must be done before logging is configured because the
logging set up function creates dirs and files in system dirs.
Signed-off-by: John Mulligan <jmulligan@redhat.com>
(cherry picked from commit
6f01977a68c3a2bba7bf2dfb7322728e7da96d0d)