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

Refs #21873 - Switch warn to fail #189

Merged
merged 1 commit into from
Jan 24, 2018
Merged

Refs #21873 - Switch warn to fail #189

merged 1 commit into from
Jan 24, 2018

Conversation

chris1984
Copy link
Member

No description provided.

@chris1984
Copy link
Member Author

QE would like the installer to exit out upon trying to create a proxy with the same name as the Katello box.

@ehelms
Copy link
Member

ehelms commented Jan 24, 2018

I looked at the output that failed verification and I did not see the warning appear in the output at all. Does this fail guarantee it appears? I tend to be hesitant to pull in a full hard stop fail when a warning was requested. Fails like this provide no way for a user to ever perform the action where they match (perhaps they have good reason?). This is not me nack-ing this, but rather wanting to step back and ask why the warning does not appear.

@ekohl
Copy link
Member

ekohl commented Jan 24, 2018

An invisible warning that was ignored anyway was my worry in #186 (review) as well so hard failures do make sense to me.

@chris1984
Copy link
Member Author

chris1984 commented Jan 24, 2018

@ehelms before the fix it would not show it and let it run, the only time you would see the warning would be with the -v option like so:

Before fix:

[ WARN 2018-01-24 10:02:02 verbose]  Scope(Class[Certs::Foreman_proxy_content]): The hostname is the same as the foreman-proxy
[ WARN 2018-01-24 10:02:03 verbose]  Compiled catalog for sat.croberts.lan in environment production in 0.49 seconds
[ INFO 2018-01-24 10:02:03 verbose]  Applying configuration version '1516806122'
[ WARN 2018-01-24 10:02:04 verbose]  /Stage[main]/Certs::Foreman_proxy_content/Certs::Tar_create[/root/blah.tar]/Exec[generate /root/blah.tar]/returns: executed successfully
[ WARN 2018-01-24 10:02:04 verbose]  Finished catalog run in 0.55 seconds
[ INFO 2018-01-24 10:02:04 verbose] Puppet has finished, bye!
[ INFO 2018-01-24 10:02:04 verbose] Executing hooks in group post
  Success!

With fix

[root@sat ~]# capsule-certs-generate --certs-tar /root/blah.tar --foreman-proxy-fqdn sat.croberts.lan
 The hostname is the same as the foreman-proxy at /usr/share/katello-installer-base/modules/certs/manifests/foreman_proxy_content.pp:31 on node sat.croberts.lan
Preparing installation Done                                              
  Something went wrong! Check the log for ERROR-level output
  The full log is at /var/log/foreman-proxy-certs-generate.log

From how I have seen customers use the product in support I see this as a failsafe to prevent customers from creating issues for themselves down the road. Also if they want to create a capsule/foreman-proxy with the same name and change the sat/katello to a different name then they can use sat-clone and then create new certs correctly. Also if need be we can create a KCS article on how to bypass this if needed since changing this does not require puppet parser to be installed as I was able to see the changes just by editing the .pp file.

@@ -24,7 +24,7 @@
validate_present($foreman_proxy_fqdn)

if $foreman_proxy_fqdn == $::fqdn {
warning('The hostname is the same as the foreman-proxy')
fail('The hostname is the same as the foreman-proxy')
Copy link
Member

Choose a reason for hiding this comment

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

I'd consider one slight modification to the wording -- The hostname is the same as the provided hostname for the foreman-proxy

@chris1984
Copy link
Member Author

@ehelms updated the wording

@ehelms ehelms merged commit 42583ce into theforeman:master Jan 24, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants