Description of problem: I found it hard to understand where the deployment logs are located. It would help if we can create a deployment log per deployment under the /var/log/<deployment_name>/xxx.log Version-Release number of selected component (if applicable): fusor-initial-setup-0.0.21-4.el7eso.noarch fusor-installer-0.0.14-1.el7eso.noarch How reproducible: 100% Steps to Reproduce: 1. run a deployment that would fail 2. look for the location of the logs in the server 3. Actual results: the logs are not located under /var/log Expected results: logs should be accessible and organized per deployment under a known location that would allow an easy debugging Additional info:
Initial attempt at this is captured in: https://github.com/fusor/fusor/pull/526
I just tried to run an ISO install (https://engineering.redhat.com/trac/RHCI/wiki/Guides/ISO_Install) with the latest ISO image (RHCI-6.0-RHEL-7-20151204.t.1-RHCI-x86_64-dvd1.iso). I created a simle RHEV + Cloudforms deployment named "rhevtest1". When I clicked on "Deploy", I got the following message : Permission denied - /usr/share/foreman/log/rhevtest1-1 I will attach the relevant portion of production.log with the error stack. This error was not present when using the ISO RHCI-6.0-RHEL-7-20151022.t.3-RHCI-x86_64-dvd1.iso.
Created attachment 1103363 [details] Foreman production.log error stack
Jean-Francois, thank you for the note and the log snippet. David Gao, Please try an ISO install and see if the issue is related to SELinux, we may need to include another rule in https://github.com/fusor/fusor-selinux From Jean-Francois log snippet: 2015-12-07 14:18:02 [I] Processing by Fusor::Api::V21::DeploymentsController#deploy as JSON 2015-12-07 14:18:02 [I] Parameters: {"api_version"=>"v21", "id"=>"1", "deployment"=>{}} 2015-12-07 14:18:02 [E] Errno::EACCES: Permission denied - /usr/share/foreman/log/rhevtest1-1 /opt/rh/ruby193/root/usr/share/gems/gems/fusor_server-0.0.1/lib/init_log.rb:22:in `mkdir' /opt/rh/ruby193/root/usr/share/gems/gems/fusor_server-0.0.1/lib/init_log.rb:22:in `log_change_deployment' /opt/rh/ruby193/root/usr/share/gems/gems/fusor_server-0.0.1/app/controllers/fusor/api/v2/deployments_controller.rb:55:in `deploy'
I forgot to add the selinux audit log, sorry. Here is a snippet from the audit.log : type=AVC msg=audit(1449515882.169:708): avc: denied { create } for pid=26901 comm="ruby" name="rhevtest1-1" scontext=system_u:system_r:passenger_t:s0 tcontext=system_u:object_r:foreman_log_t:s0 tclass=dir type=SYSCALL msg=audit(1449515882.169:708): arch=c000003e syscall=83 success=no exit=-13 a0=7f81f49409e0 a1=1ff a2=1 a3=0 items=0 ppid=1 pid=26901 auid=4294967295 uid=994 gid=994 euid=994 suid=994 fsuid=994 egid=994 sgid=994 fsgid=994 tty=(none) ses=4294967295 comm="ruby" exe="/opt/rh/ruby193/root/usr/bin/ruby" subj=system_u:system_r:passenger_t:s0 key=(null)
Thank you!, the AVC denial helped. Jason Montleon added the below commit for us which we hope will address the AVC denial. https://github.com/fusor/fusor- selinux/commit/21824262c80823b73599319bb9339a1dea09d52c A new compose will be created this afternoon with this fix.
We've built compose RHCI-6.0-RHEL-7-20151207.t.0 to address the AVC denial seen in comment #5.
I can confirm that this bug is fixed in RHCI-6.0-RHEL-7-20151207.t.0 compose, thank you.
VERIFIED on RHCI-6.0-RHEL-7-20160107.t.1
QCI has sunset. Closing the BZ's.