Description of problem: capsule-certs-generate and satellite-installer fail immediately if any of the provided argument contains '-S'. Example: 1]--server-ca-cert "/root/certs/A-STest.crt" #capsule-certs-generate --foreman-proxy-fqdn "capsule.fqdn.here" --certs-tar "~/capsule-certs.tar" --server-cert "/root/ssl-build/capsule.fqdn.here/capsule_cert.pem" --server-key "/root/ssl-build/capsule.fqdn.here/capsule_cert_key.pem" --server-ca-cert "/root/certs/A-STest.crt" ERROR: Scenario (/usr/share/foreman-installer/katello-certs/scenarios.d/Test.crt.yaml) was not found, can not continue 2] --certs-server-cert "/etc/pki/katello/certs/katello-S-apache.crt" #satellite-installer --scenario satellite --certs-server-cert "/etc/pki/katello/certs/katello-S-apache.crt" --certs-server-key "/etc/pki/katello/private/katello-apache.key" --certs-server-ca-cert "/etc/pki/katello/certs/katello-server-ca.crt" [ INFO 2020-06-12T21:13:23 verbose] Executing hooks in group pre_migrations [ INFO 2020-06-12T21:13:23 verbose] All hooks in group pre_migrations finished [ERROR 2020-06-12T21:13:23 verbose] You are trying to replace existing installation with different scenario. This may lead to unpredictable states. Use --force to override. You can use --compare-scenarios to see the differences [ INFO 2020-06-12T21:13:23 verbose] Log was be written to /var/log/foreman-installer/satellite.log [ INFO 2020-06-12T21:13:23 verbose] Logs flushed Version-Release number of selected component (if applicable): Satellite 6.5/6.6/6.7 How reproducible: Always Steps to Reproduce: 1. #capsule-certs-generate --foreman-proxy-fqdn "capsule.fqdn.here" --certs-tar "~/capsule-certs.tar" --server-cert "/root/ssl-build/capsule.fqdn.here/capsule_cert.pem" --server-key "/root/ssl-build/capsule.fqdn.here/capsule_cert_key.pem" --server-ca-cert "/root/certs/A-STest.crt" 2.#satellite-installer --scenario satellite --certs-server-cert "/etc/pki/katello/certs/katello-S-apache.crt" --certs-server-key "/etc/pki/katello/private/katello-apache.key" --certs-server-ca-cert "/etc/pki/katello/certs/katello-server-ca.crt" 3.# satellite-installer --help |grep "-S" grep: invalid option -- 'S' Usage: grep [OPTION]... PATTERN [FILE]... Try 'grep --help' for more information. /usr/share/gems/gems/clamp-1.1.2/lib/clamp/command.rb:139:in `write': Broken pipe - <STDOUT> (Errno::EPIPE) from /usr/share/gems/gems/clamp-1.1.2/lib/clamp/command.rb:139:in `puts' from /usr/share/gems/gems/clamp-1.1.2/lib/clamp/command.rb:139:in `puts' from /usr/share/gems/gems/clamp-1.1.2/lib/clamp/command.rb:139:in `rescue in run' from /usr/share/gems/gems/clamp-1.1.2/lib/clamp/command.rb:132:in `run' from /usr/share/gems/gems/kafo-4.0.1/lib/kafo/kafo_configure.rb:162:in `run' from /usr/sbin/satellite-installer:8:in `<main>' Actual results: Fails with the above-mentioned errors. Expected results: It should not fail. Additional info: #capsule-certs-generate --help -S, --scenario SCENARIO Use installation scenario #satellite-installer --help -S, --scenario SCENARIO Use installation scenario
Note that for grep you should use grep -- -S. Upstream a minimal reproducer in develop is: foreman-proxy-certs-generate --server-ca-cert A-ST The problem is a bad regex here: https://github.com/theforeman/kafo/blob/68ae1ad760f4073a6fedc9ce8cfe4f6ddd1a85e8/lib/kafo/scenario_manager.rb#L81
Upstream bug assigned to ekohlvan
Moving this bug to POST for triage into Satellite since the upstream issue https://projects.theforeman.org/issues/30218 has been resolved.
Fix is in Satellite 6.9 SNAP 1 with tfm-rubygem-kafo-6.0.0-1.el7sat.noarch
FailedQA. Version tested: Satellite 6.9.0 Snap 7
Verified on 6.9 Snap 17
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory (Moderate: Satellite 6.9 Release), and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHSA-2021:1313