Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add option to ignore registration failures #261

Merged
merged 1 commit into from
Sep 17, 2018

Conversation

sideangleside
Copy link
Member

Fixes #260

@@ -348,8 +348,12 @@ def migrate_systems(org_name, activationkey):
else:
options.rhsmargs += " --keep"
exec_failok("/usr/sbin/subscription-manager config --server.server_timeout=%s" % options.timeout)
exec_failexit("/usr/sbin/rhn-migrate-classic-to-rhsm --org %s --activation-key '%s' %s" % (org_label, activationkey, options.rhsmargs))
exec_failexit("subscription-manager config --rhsm.baseurl=https://%s/pulp/repos" % options.foreman_fqdn)
if options.ignore_registration_failures:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

reading these branches, I wonder how often we will forget to update params in one of them.

how about we mangle exec_failok and exec_failexit into one function exec(command, failok=False) and make the other two sensible aliases to it? then we can just pass ignore_r_f as the failok param.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ack, but I'd rather handle a refactoring of the exec* functions as a different PR. (because I am bound to mess it up :) )

@sideangleside sideangleside added this to the 1.7.0 milestone Sep 5, 2018
@evgeni evgeni merged commit c2a2c63 into Katello:master Sep 17, 2018
evgeni added a commit to evgeni/katello-client-bootstrap that referenced this pull request Jan 24, 2019
changelog:
* Python 3 support
* Capability to preserve proxy settings when reconfiguring/migrating the client (Katello#283)
* EL5 subscription manager compatibility fixes (Katello#284)
* Only yum clean metadata and dbcache, not RPMs (Katello#280)
* Allow defining where to get ssh keys and where to store them (Katello#281)
* Make the FIPS check more robust (Katello#279)
* Support yum and dnf Python bindings (Katello#271)
* Option to ignore registration failures (Katello#261)
* Force lowercase FQDN writing puppet configuration (Katello#255)
* Improve the error message when a search fails (Katello#257)
@evgeni evgeni mentioned this pull request Jan 24, 2019
evgeni added a commit that referenced this pull request Jan 25, 2019
changelog:
* Python 3 support
* Capability to preserve proxy settings when reconfiguring/migrating the client (#283)
* EL5 subscription manager compatibility fixes (#284)
* Only yum clean metadata and dbcache, not RPMs (#280)
* Allow defining where to get ssh keys and where to store them (#281)
* Make the FIPS check more robust (#279)
* Support yum and dnf Python bindings (#271)
* Option to ignore registration failures (#261)
* Force lowercase FQDN writing puppet configuration (#255)
* Improve the error message when a search fails (#257)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants