Project

General

Profile

Actions

Feature #3131

closed

Print message at the end of configuration

Added by Lukas Zapletal over 10 years ago. Updated almost 6 years ago.

Status:
Closed
Priority:
Urgent
Category:
-
Target version:
Difficulty:
easy
Triaged:
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
Actions #1

Updated by Greg Sutcliffe over 10 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?

Actions #2

Updated by Lukas Zapletal over 10 years ago

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

Actions #3

Updated by Lukas Zapletal over 10 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.

Actions #4

Updated by Greg Sutcliffe over 10 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.

Actions #5

Updated by Greg Sutcliffe over 10 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.

Actions #6

Updated by Marek Hulán over 10 years ago

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

Actions #7

Updated by Greg Sutcliffe over 10 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

Actions #8

Updated by Lukas Zapletal over 10 years ago

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

Updated by Lukas Zapletal over 10 years ago

  • Status changed from Ready For Testing to Closed

Merged with 7a6bb46

Actions #10

Updated by Lukas Zapletal over 10 years ago

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

Also available in: Atom PDF