Closed Bug 1179819 Opened 10 years ago Closed 9 years ago

runner tasks output on OSX goes to /dev/null

Categories

(Infrastructure & Operations Graveyard :: CIDuty, task)

task
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: catlee, Assigned: aobreja)

References

Details

Attachments

(3 files)

The output from tasks running under runner on OSX doesn't get logged anywhere - not in /var/log/system.log, nor in papertrail.
Blocks: 1258480
I checked runner application from git and I found that for Darwin operation system is used /var/run/syslog for output (more details : https://github.com/mozilla/build-runner/blob/master/runner/__init__.py#L188 ) The only message that I see in syslog log is "com.apple.xpc.launchd[1] (com.mozilla.runner): This key does not do anything: OnDemand"
I made some research and I found that OnDemand is deprecated since 10.5 and needs to be removed from the init script used for Darwin servers. I will create a patch and I will test
Assignee: nobody → vlad.ciobancai
Attached you can find the patch to remove the "OnDemand" key from the service script because is deprecated. I tried to start the script by using the following command : "launchctl start /Library/LaunchAgents/com.mozilla.runner.plist" but I was not able Kim can you please help me to test the change ?
Flags: needinfo?(kmoir)
After some research I was able to start the application by running the following commands: - launchctl load /Library/LaunchAgents/com.mozilla.runner.plist - launchctl start com.mozilla.runner After the application started the output from runner is logged in /var/log/system.log . Before removing the "OnDemand" line in the com.mozilla.runner.plist, the messages from system.log was like in comment #1. Also the output can be view on papertrail for t-yosemite-r7-0021 (the slave have been loaned to me)
Flags: needinfo?(kmoir)
Attachment #8735452 - Flags: review?(kmoir) → review+
merged to production
I checked randomly some OS X servers and the logs from runner appears in papertrail.
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
catlee mentioned today that while the command is now being logged on OS X, the output of the command is not. Can we verify that the output is being logged too, please?
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Assignee: vciobancai → andrei.obreja
Andrei: what machine are you testing this command and as what user? If you used a loaner I think runner is disabled.
Flags: needinfo?(andrei.obreja)
I did not yet begun any test but I checked the server used by Vlad, t-yosemite-r7-0021 and I saw that he used these commands : - launchctl load /Library/LaunchAgents/com.mozilla.runner.plist - launchctl start com.mozilla.runner This slave however does not have LaunchAgents folder under root or cltbld accounts to start the runner.
Flags: needinfo?(andrei.obreja)
Maybe this machine is in a weird state since Vlad had it for a long time? Perhaps reimage it so all the runner bits are in the places that you expect.
Made some tests on t-yosemite-r7-0021,after runnig ( launchctl load /Library/LaunchAgents/com.mozilla.runner.plist) we will have this job(/opt/runner/bin/python2.7 /opt/runner/bin/runner -v --syslog -H -n 15 -c /opt/runner/runner.cfg /opt/runner/tasks.d) which will send messages to system.log that will appear in Papertrail. Also com.mozilla.runner.plist is configured to output the logs in runner.out and runner.err which are located in /var/tmp. If the machine will be disable the logs from runner.err will be also present on Papertrail but the logs from runner.out are never showed even when the machine is enabled. I suppose that the runner job should also send the logs from runner.out to system.log,but as this action never happens and the scripts doesn't indicate any restrictions, the solution is to redirect the logs from runner.com to system.log? Or is there any other way? I think that the logs that Chris is looking for are in runner.out
Flags: needinfo?(coop)
Attached image runner tasks.PNG
After making some investigation and comparing the logs from Papertrail on some talos-linux64-ix machines and the logs from some t-yosemite-r7 machines the conclusion is that similar logs are shown in Papertrail. After runner is enabled the following common tasks will be run : ['0-checkout_tools', '1-cleanslate', '1-cleanup', '1-mig_agent', '1-purge_builds', '3-update_shared_repos', '4-buildbot.py', '99-post_flight', '99-restart_services'] These tasks have the same logs on Papertrail for CentOS,Ubuntu or Darwin. So there is no need for redirecting the logs from runner.out to system.log. I have also attached a screenshot from Papertrail for a talos-linux64 machine and a yosemite-r7 machine with the logs from these tasks. If more informations will need to be displayed on Papertrail for runner's tasks then the configuration will need to be done for all machines not just OS X.
(In reply to Andrei Obreja [:aobreja][:buildduty] from comment #11) > I suppose that the runner job should also send the logs from runner.out to > system.log,but as this action never happens and the scripts doesn't indicate > any restrictions, the solution is to redirect the logs from runner.com to > system.log? Or is there any other way? > I think that the logs that Chris is looking for are in runner.out Your papertrail screenshot indicates to me that this is working you've found a valid solution here. Verify that there's no missing data between the two logs (runner.out & syslog) for the events, and then proceed.
Flags: needinfo?(coop)
These logs from Papertrail were shown without runner.out been redirected to system.log,this is the current situation without any change. Also for OS X the tasks that are running under runner (0-checkout_tools , 1-cleanslate,etc) are not logged in system.log ,but are present in Papertrail(not sure yet how Papertrail got these messages). Also runner.out have different logs from papaertrail or system.log but after checking them I think that these logs are not needed in Papertrail,here(runner.out) we will only find this sequence in a loop: 0-darwin_clean_buildbot: finished buildslave cleanup Fri Jul 29 04:15:48 PDT 2016 216.15 GB of space available Updating hg repos in /builds/hg-shared pulling from https://hg.mozilla.org/build/tools searching for changes no changes found pulling from https://hg.mozilla.org/build/mozharness searching for changes no changes found skipping /builds/slave/twistd.pid skipping /builds/slave/talos-slave/twistd.pid Starting buildbot via runslave.py. Buildbot started successfully. Buildbot finished. So in conclusion I think there is no need for any action,the commands and the output of the tasks under runner are already in Papertrail for OS X.
I see output in papertrail for bld-lion-r5, t-yosemite-r5, and t-yosemite-r7 machines. Thanks, Andrei!
Status: REOPENED → RESOLVED
Closed: 9 years ago9 years ago
Resolution: --- → FIXED
Component: Platform Support → Buildduty
Product: Release Engineering → Infrastructure & Operations
Product: Infrastructure & Operations → Infrastructure & Operations Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: