Skip to content

Commit

Permalink
Automatically store agama logs at the end of installation
Browse files Browse the repository at this point in the history
  • Loading branch information
mchf committed Nov 23, 2023
1 parent f2a1b89 commit 040552e
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion service/lib/agama/manager.rb
Original file line number Diff line number Diff line change
Expand Up @@ -208,14 +208,19 @@ def valid?
# @path [String] directory where to store logs
#
# @return [String] path to created archive
def collect_logs(path)
def collect_logs(path: nil)
opt = "-d #{path}" if !path.nil? && !path.empty?

%x(agama logs store #{opt}).strip
end

# Whatever has to be done at the end of installation
def finish_installation
# TODO: make it optional
logs = collect_logs

logger.info("Installation logs stored in #{logs}")

cmd = if iguana?
"/usr/bin/agamactl -k"
else
Expand Down

0 comments on commit 040552e

Please sign in to comment.