Closed sthirugn closed 6 years ago
The general concern that I have is that by changing to exec_failok
is that it would mask other legitimate subscription-manager issues.
This is related to bz1591315. Even when that bug is addressed, we'd still have crusty old versions of subscription-manager in the wild that won't return proper exit codes when registering.
As much as I don't want 'yet another bootstrap.py CLI option', I would rather that in lieu of potentially masking errors in subscription-manager. Registering to a system with org_environment
entitlement mode is extremely uncommon. So changing the common case to support the exception seems wrong. Maybe something like --ignore-registration-failures
as a boolean.
Also, we'd have to patch the migrate_systems
function to handle the migration (from Sat5|Spacewalk|RHN) use-cases.
@evgeni thoughts?
Yeah, silent failok
will be a source for nightmares (but then again, not mine).
--ignore-registration-failures
would be a solution -- until someone asks for --ignore-puppet-failures
etc?
the other day, I suggested failok
with a post-failure check if the failure was legit. but this makes code more complicated, so ugh.
for simplicitys sake, +1 on --ignore
+1 to --ignore-registration-failures
with a clear help message that it is user responsibility to take care of it.
There are scenarios in which it is okay for the user to register a client to satellite without having a subscription allocated to it. Right now, bootstrap.py fails and exits since it uses
exec_failexit
onsubscription-manager register
call as shown below.the above-mentioned line should use
exec_failok
if the user wants to optionally ignore non-availability of subscriptions in certain scenarios.