Project

General

Profile

Actions

Feature #12133

open

Optionally log output of finish scripts (Image Provisioning)

Added by Tommy McNeely about 9 years ago. Updated almost 9 years ago.

Status:
New
Priority:
Normal
Assignee:
-
Category:
Unattended installations
Target version:
-
Difficulty:
Triaged:
Fixed in Releases:
Found in Releases:

Description

When a finish script fails/doesn't run/appears to hang, it would be really nice to be able to see the output of that job. At a minimum, logging to something like /root/foreman-finish-output.txt (or maybe something under /var/log?). Perhaps it could be implemented as a checkbox or something? Then when the script runs, tee its output to the file.

Ideally, I could see the output as some property of the host in the WebUI, so that I wouldn't have to go in and extract the SSH key and login to the system directly. When I see output in the logs like:

```
Started GET "/tasks/6f952f72-c382-4d61-917a-2b3c2f939784" for 50.170.194.170 at 2015-10-11 16:15:44 -0400
2015-10-11 16:15:44 [I] channel_data: 0 82b
2015-10-11 16:15:44 [I] Processing by TasksController#show as */*
2015-10-11 16:15:44 [I] Parameters: {"id"=>"6f952f72-c382-4d61-917a-2b3c2f939784"}
2015-10-11 16:15:44 [I] Rendered tasks/_list.html.erb (0.7ms)
2015-10-11 16:15:44 [I] Completed 200 OK in 10ms (Views: 1.4ms | ActiveRecord: 1.6ms)
2015-10-11 16:15:44 [I] channel_data: 0 82b
2015-10-11 16:15:44 [I] channel_data: 0 82b
2015-10-11 16:15:44 [I] channel_data: 0 82b
2015-10-11 16:15:44 [I] channel_data: 0 82b
2015-10-11 16:15:44 [I] channel_data: 0 82b
2015-10-11 16:15:44 [I] channel_data: 0 82b
2015-10-11 16:15:44 [I] channel_data: 0 82b
2015-10-11 16:15:44 [I] channel_data: 0 82b
2015-10-11 16:15:44 [I] channel_data: 0 82b
2015-10-11 16:15:44 [I] channel_data: 0 82b
2015-10-11 16:15:44 [I] channel_data: 0 82b
2015-10-11 16:15:44 [I] channel_data: 0 82b
2015-10-11 16:15:44 [I] channel_data: 0 82b
2015-10-11 16:15:44 [I] channel_data: 0 82b
2015-10-11 16:15:44 [I] channel_data: 0 82b
2015-10-11 16:15:44 [I] channel_data: 0 82b
2015-10-11 16:15:44 [I] channel_data: 0 82b
2015-10-11 16:15:44 [I] channel_data: 0 82b
2015-10-11 16:15:44 [I] channel_data: 0 82b
2015-10-11 16:15:44 [I] channel_data: 0 82b
2015-10-11 16:15:44 [I] channel_data: 0 82b
2015-10-11 16:15:44 [I] channel_data: 0 82b
2015-10-11 16:15:44 [I] channel_data: 0 82b
2015-10-11 16:15:44 [I] channel_data: 0 82b
2015-10-11 16:15:44 [I] channel_data: 0 82b
2015-10-11 16:15:44 [I] channel_data: 0 82b
2015-10-11 16:15:44 [I] channel_data: 0 82b
2015-10-11 16:15:44 [I] channel_data: 0 82b
2015-10-11 16:15:44 [I] channel_data: 0 82b
2015-10-11 16:15:44 [I] channel_data: 0 82b
2015-10-11 16:15:44 [I] channel_data: 0 82b
2015-10-11 16:15:44 [I] channel_data: 0 82b
2015-10-11 16:15:44 [I] channel_data: 0 82b
2015-10-11 16:15:44 [I] channel_data: 0 82b
2015-10-11 16:15:44 [I] channel_data: 0 82b
2015-10-11 16:15:44 [I] channel_data: 0 82b
2015-10-11 16:15:45 [I] channel_data: 0 4095b
2015-10-11 16:15:45 [I] channel_data: 0 2110b
2015-10-11 16:15:46 [I] channel_data: 0 191b
2015-10-11 16:15:46 [I] channel_data: 0 32b
2015-10-11 16:15:46 [I]
```

It makes me think that the output of the ssh script is being received by foreman itself, so it really should just be a matter of allowing it to be logged or even better, stored somewhere.

Actions

Also available in: Atom PDF