Bug 1152083 - OSE 2.1: Firefox for selenium fails to run due to SELinux issues
Summary: OSE 2.1: Firefox for selenium fails to run due to SELinux issues
Keywords:
Status: CLOSED CANTFIX
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Unknown
Version: 2.1.0
Hardware: Unspecified
OS: Unspecified
medium
low
Target Milestone: ---
: ---
Assignee: Brenton Leanhardt
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-10-13 12:43 UTC by Evgheni Dereveanchin
Modified: 2018-12-09 18:50 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-10-22 15:40:30 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

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.


Note You need to log in before you can comment on or make changes to this bug.