Bug 1083079

Summary: jetty: jetty.state file should be located in /var/run/jetty
Product: [Fedora] Fedora Reporter: Mikolaj Izdebski <mizdebsk>
Component: jettyAssignee: Mikolaj Izdebski <mizdebsk>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 20CC: java-sig-commits, krzysztof.daniel, mizdebsk, msimacek, msrb, overholt, sochotni
Target Milestone: ---Keywords: Triaged
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: jetty-9.0.5-3.fc20 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-04-25 04:26:15 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 Mikolaj Izdebski 2014-04-01 12:51:55 UTC
Description of problem:
Jetty expects jetty.run file in its home directory.  According to FHS this file belongs in /var/run

Current (buggy) behaviour is (correctly) blocked by SELinux:

type=AVC msg=audit(1396355990.387:862): avc:  denied  { unlink } for  pid=29107 comm="rm" name="jetty.state" dev="vda2" ino=1232634 scontext=system_u:system_r:httpd_t:s0 tcontext=unconfined_u:object_r:usr_t:s0 tclass=file
type=AVC msg=audit(1396355991.406:864): avc:  denied  { create } for  pid=29114 comm="java" name="jetty.state" scontext=system_u:system_r:httpd_t:s0 tcontext=system_u:object_r:usr_t:s0 tclass=file
type=AVC msg=audit(1396355991.406:864): avc:  denied  { append } for  pid=29114 comm="java" path="/usr/share/jetty/jetty.state" dev="vda2" ino=1232634 scontext=system_u:system_r:httpd_t:s0 tcontext=system_u:object_r:usr_t:s0 tclass=file

Creating a symlink in Jetty home dir and pointing it to a fille under /var/run/jetty/ probably won't work as Jetty is trying to remove the state file before writing to it.  I suspect that setting tome property or patching Jetty code may be required.

Version-Release number of selected component (if applicable):
9.0.5-1

Comment 1 Mikolaj Izdebski 2014-04-01 12:53:18 UTC
From jetty logs:
Apr 01 14:38:52 f20 jetty[28988]: rm: cannot remove ‘/usr/share/jetty/jetty.state’: Permission denied

Comment 2 Michael Simacek 2014-04-11 13:16:37 UTC
I rewritten the script to not use state file at all and rely on systemd.

Comment 3 Fedora Update System 2014-04-11 14:09:55 UTC
jetty-9.0.5-3.fc20 has been submitted as an update for Fedora 20.
https://admin.fedoraproject.org/updates/jetty-9.0.5-3.fc20

Comment 4 Fedora Update System 2014-04-15 15:40:27 UTC
Package jetty-9.0.5-3.fc20:
* should fix your issue,
* was pushed to the Fedora 20 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing jetty-9.0.5-3.fc20'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2014-5116/jetty-9.0.5-3.fc20
then log in and leave karma (feedback).

Comment 5 Fedora Admin XMLRPC Client 2014-04-24 12:46:34 UTC
This package has changed ownership in the Fedora Package Database.  Reassigning to the new owner of this component.

Comment 6 Fedora Update System 2014-04-25 04:26:15 UTC
jetty-9.0.5-3.fc20 has been pushed to the Fedora 20 stable repository.  If problems still persist, please make note of it in this bug report.