Project

General

Profile

Feature #3131

Print message at the end of configuration

Added by Lukas Zapletal about 7 years ago. Updated over 2 years ago.

Status:
Closed
Priority:
Urgent
Category:
-
Target version:
Difficulty:
easy
Triaged:
Bugzilla link:
Pull request:
Fixed in Releases:
Found in Releases:

Description

Currently kafo works the UNIX way - silence if no params are provided, which is cool, but for the huge installer I think we can print something.

When puppet returns OK, then we should output something like:

Installation was successful.
You can now login at http://host/foreman

If there was an error, we should print something like:

Installation was NOT successful.
Please search /var/log/foreman-installer/foreman-installer.log for ERRORs

Associated revisions

Revision 448ba8b5 (diff)
Added by Greg Sutcliffe about 7 years ago

Fixes #3131 - Output information at the end of the foreman-installer execution

Revision 7a6bb461
Added by Lukas Zapletal about 7 years ago

Merge pull request #67 from GregSutcliffe/develop

Fixes #3131 - Output information at the end of the foreman-installer

History

#1 Updated by Greg Sutcliffe about 7 years ago

I think this is a job for the foreman-installer script - perhaps Kafo could return a hash of interesting data for the frontend to use as it likes?

#2 Updated by Lukas Zapletal about 7 years ago

I think kafo is the right place. It also knows the log file from kafo configuration. Let's wait for Marek.

#3 Updated by Lukas Zapletal about 7 years ago

  • Priority changed from Normal to Urgent
  • Target version set to 1.3.0

This is critical bug for 1.3. If the configuration fails, there is no output. We need to print out at least there was an error, preferably all the ERROR messages.

#4 Updated by Greg Sutcliffe about 7 years ago

Why would Kafo, a generic library for building application installaters, print a message specific to the Foreman Installer? I think KafoConfigure.run (which is called in /usr/bin/foreman-installer) needs to return some useful data (such as the number of errors, etc) and the the foreman-installer script can decide what to do with it. Something like

CONFIG_FILE = "/usr/share/foreman-installer/config/foreman-installer.yaml" 
result = KafoConfigure.run
if result[:exitstatus] == 0
url = YAML.load_file(CONFIG_FILE)
puts "Success! You can login a https://#{url}"
else
puts "Installation not successful - there were #{result[:num_errors]} errors - see /var/log/foreman-installer for more detail'
end
exit result[:exitstatus]

This would allow the installer script to interpret the results from Kafo in any way it chooses.

#5 Updated by Greg Sutcliffe about 7 years ago

  • Project changed from Kafo to Installer
  • Assignee set to Greg Sutcliffe

We can do this with the data Kafo returns to us today, doing it now.

#6 Updated by Marek Hulán about 7 years ago

Also note that with progress bar you'll see the result so you don't need to hack foreman-installer itself.

#7 Updated by Greg Sutcliffe about 7 years ago

  • Status changed from New to Ready For Testing

Yeah, I'm fine with the puppet output coming from Kafo (progress bar, debug logs, etc). It's the project-specific text which should be kept to the wrapper.

https://github.com/theforeman/foreman-installer/pull/67

#8 Updated by Lukas Zapletal about 7 years ago

  • Related to Tracker #3112: [TRACKER] Issues to be released in 1.3 RC or final added

#9 Updated by Lukas Zapletal about 7 years ago

  • Status changed from Ready For Testing to Closed

Merged with 7a6bb46

#10 Updated by Lukas Zapletal about 7 years ago

  • Related to deleted (Tracker #3112: [TRACKER] Issues to be released in 1.3 RC or final)

Also available in: Atom PDF