Closed wzzrd closed 6 years ago
Soooo..... the bare excepts that Travis still complains about have been in there for months and have your prints all over them, @evgeni ;)
Not sure what to do about those...
@wzzrd ah, this is new in flake8 3.5.0. Let's see how we can fix that.
As for the Capsule / Proxy discussion: I'm not against naming everything by the upstream names, but the problem is that there is a million places where that is not the case right now.
To be honest, looking at get_api_port()
, that will only work on Satellite or Capsule servers, because it relies on parsing/etc/rhsm/rhsm.conf
. That file might not even exist on pure upstream Foreman / Foreman Proxy, as I understand it. I'm not saying that is right, I'm just saying this issue needs a closer look.
Please review code, but wait with potential merge until I do a final functional that I cannot do here.
@evgeni ping
Test done w/ RHEL7 on Satellite 6.2.12 machine and ditto Capsule. One last change incorporated, works fine otherwise: 6e8d9bee966a5dbf75463da9ea24c82a9e5f0661
/etc/rhsm/rhsm.conf
exists on Katello clients, which is good enough for us :)
@evgeni @sideangleside are yall waiting for me to 's/capsule/smart_proxy/g' or is there something else?
@evgeni I've manually rebased on current master this morning because there were some conflicts
@wzzrd puppet4 support and sed-fixes are at https://github.com/evgeni/katello-client-bootstrap/tree/capsule-migration-option-new, feel free to pull these in
Pulled in latest master and changes from your fork, @evgeni
Thanks @wzzrd! I think if we update the README to say Katello and not Satellite and give the new Capsule a example.com
domain as with the rest of the examples, this is good to go.
@sideangleside you also happy with that?
Done.
I finally got time to review this. No issues to report from me. Other than squashing the commits, we can merge this PR. Thanks for the pretty big feature @wzzrd
Squashed and pushed @sideangleside @evgeni
So after a long pause, here's attempt two to bring in a capsule migration option into bootstrap.py.
Because the change is fairly large, here's the breakdown, to start with the nitty-gritty stuff:
put_json
andget_bootstrap_rpm
. Theput_json
function needed to accept a payload to update a host record, and theget_bootstrap_rpm
needed to have options to override both whether or not to remove existing katello-ca-consumer RPMs, and whether or not to unregister when forcing the installation of new katello-ca-consumer RPMs. Unregistering, needless to say, from a migration PoV, would be bad.update_host_capsule_mapping
function to DRY when updating the proxy_ids for a system.--hostgroup
and--location
parameters are passed) switch to new location, hostgrouppuppet
andforeman
in options.skip) change puppet_proxy_id and puppet_ca_proxy_idforeman
in options.skip and the features the new capsule offers) change openscap_proxy_idRemarks:
foreman
andpuppet
in options.skip when changing puppet_proxy_id, puppet_ca_proxy_id and re-configuring Puppet. I don't think it makes sense to reconfigure Puppet if we skip foreman, because submitted reports will create / update an existing foreman host anyway. So if we skippuppet
orforeman
, we don't touch anything Puppet related. Agreed?Sample usage is provided in README.md. Tested on RHEL6 and RHEL7 w/ Satellite 6.2.12. RHEL5 untested, but I'm not using any functionality in Python that wasn't available on Python 2.4 (I think).