Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 1152083

Summary: OSE 2.1: Firefox for selenium fails to run due to SELinux issues
Product: OpenShift Container Platform Reporter: Evgheni Dereveanchin <ederevea>
Component: UnknownAssignee: Brenton Leanhardt <bleanhar>
Status: CLOSED CANTFIX QA Contact:
Severity: low Docs Contact:
Priority: medium    
Version: 2.1.0CC: ederevea, jokerman, libra-bugs, libra-onpremise-devel, lmeyer, mmccomas
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-10-22 15:40:30 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Evgheni Dereveanchin 2014-10-13 12:43:59 UTC
Description of problem:
when attempting to integrate selenium into a jenkins build, firefox fails to run due to what seems to be SELinux errors

Version-Release number of selected component (if applicable):
OpenShift Enterprise 2.1

How reproducible:
always

Steps to Reproduce:
1. set up Selenium according to https://blog.openshift.com/selenium-ruby-jenkins/
2. start a build

Actual results:
errors reported

mkdir: cannot create directory `/var/lib/openshift/321fedcba0987654321fedcba//.mozilla
process 8685: D-Bus library appears to be incorrectly set up; failed to read machine uuid: Failed to open "/var/lib/dbus/machine-id"

Expected results:
tests run fine

Additional info:
when SELinux is disabled, the setup starts to work

Comment 2 Luke Meyer 2014-10-16 21:25:17 UTC
I agree that this is a really nice use case to enable. Just to set expectations, that article is three years old, OpenShift has changed massively since, and this isn't likely to be a high priority for OpenShift engineering to work on. In fact I would say it's unlikely to be addressed under OpenShift v2 unless you or someone else looking at this troubleshoots and contributes some code (or finds the right SELinux policy changes - setenforce 0 and run audit2allow to determine what policy is needed).

Does this work on OpenShift Online (rhcloud.com)?

Comment 3 Evgheni Dereveanchin 2014-10-17 07:13:24 UTC
@Luke I believe this requires firefox installation on hosts. I don't know the software configuration of the hosts used but presume it's the bare minimum required. So I don't expect it to work there.

Comment 4 Luke Meyer 2014-10-22 15:40:30 UTC
It would have helped had I done more than skim the article. It's about running this setup in general, not on an OpenShift Jenkins gear (which I think would be an awesome use of OpenShift if it worked). Of course Online isn't going to supply the dependencies to run this.

I strongly suspect that there's just no good way to get this to work with OpenShift v2 containers. For a start, containers don't have access to edit their own home dir to create e.g. /var/lib/openshift/321fedcba0987654321fedcba//.mozilla (though you could with a custom cartridge), but beyond that, I don't think interactions with dbus and probably console/X11 are going to work from the confines of a gear (*maybe* with selinux permissive).

It's not a use case we've ever targeted, but there's a much better chance it will work under Docker containers in v3. For now, I don't think we can address it.