Bug 1054396 - Thermostat webapp conflicts with system tomcat
Summary: Thermostat webapp conflicts with system tomcat
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: thermostat
Version: 20
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: ---
Assignee: Severin Gehwolf
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On: 447156 975909
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-01-16 18:15 UTC by Robert Rati
Modified: 2014-03-21 08:03 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-03-21 08:03:14 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)
Fix for revision f0be04eeff638eee843c9a13956d7e493278dcb2 in dist-git (3.91 KB, patch)
2014-02-17 14:44 UTC, Severin Gehwolf
no flags Details | Diff
Fix for revision f0be04eeff638eee843c9a13956d7e493278dcb2 in dist-git (4.19 KB, patch)
2014-02-18 13:43 UTC, Severin Gehwolf
no flags Details | Diff

Description Robert Rati 2014-01-16 18:15:11 UTC
Description of problem:
The thermostat webapp borrows it's configuration from tomcat.  This results in it trying to use the same ports as the system tomcat which causes port conflicts if both the system tomcat and the thermostat webapp are both running.

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


How reproducible:


Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:


Additional info:

Comment 1 Severin Gehwolf 2014-02-17 14:44:30 UTC
Created attachment 864129 [details]
Fix for revision f0be04eeff638eee843c9a13956d7e493278dcb2 in dist-git

Comment 2 Severin Gehwolf 2014-02-17 14:49:13 UTC
The attached patch fixes this. The thermostat tomcat instance uses port 8999 with this patch applied. I'm not going to build this in kojo just yet, since after this patch thermostat-webapp upgrades fail with:

file /var/lib/tomcats/thermostat/conf/logging.properties from install of thermostat-webapp-1.0.2-2.fc20.noarch conflicts with file from package tomcat-0:7.0.47-1.fc21.noarch
        file /var/lib/tomcats/thermostat/conf/Catalina from install of thermostat-webapp-1.0.2-2.fc20.noarch conflicts with file from package tomcat-0:7.0.47-1.fc21.noarch
        file /var/lib/tomcats/thermostat/conf/catalina.policy from install of thermostat-webapp-1.0.2-2.fc20.noarch conflicts with file from package tomcat-0:7.0.47-1.fc21.noarch
        file /var/lib/tomcats/thermostat/conf/catalina.properties from install of thermostat-webapp-1.0.2-2.fc20.noarch conflicts with file from package tomcat-0:7.0.47-1.fc21.noarch
        file /var/lib/tomcats/thermostat/conf/context.xml from install of thermostat-webapp-1.0.2-2.fc20.noarch conflicts with file from package tomcat-0:7.0.47-1.fc21.noarch
        file /var/lib/tomcats/thermostat/conf/log4j.properties from install of thermostat-webapp-1.0.2-2.fc20.noarch conflicts with file from package tomcat-0:7.0.47-1.fc21.noarch
        file /var/lib/tomcats/thermostat/conf/server.xml from install of thermostat-webapp-1.0.2-2.fc20.noarch conflicts with file from package tomcat-0:7.0.47-1.fc21.noarch
        file /var/lib/tomcats/thermostat/conf/tomcat-users.xml from install of thermostat-webapp-1.0.2-2.fc20.noarch conflicts with file from package tomcat-0:7.0.47-1.fc21.noarch
        file /var/lib/tomcats/thermostat/conf/tomcat.conf from install of thermostat-webapp-1.0.2-2.fc20.noarch conflicts with file from package tomcat-0:7.0.47-1.fc21.noarch
        file /var/lib/tomcats/thermostat/conf/web.xml from install of thermostat-webapp-1.0.2-2.fc20.noarch conflicts with file from package tomcat-0:7.0.47-1.fc21.noarch
        file /var/lib/tomcats/thermostat/conf from install of thermostat-webapp-1.0.2-2.fc20.noarch conflicts with file from package thermostat-webapp-1.0.0-2.fc20.noarch

This can be reproduces with (for example):
$ sudo rpm -Uvh --test noarch/thermostat-webapp-1.0.2-2.fc20.noarch.rpm \
  x86_64/thermostat-1.0.2-2.fc20.x86_64.rpm

Removing the "--test" switch lets one update from 1.0.0-2 for example. Marking the RPM bug as dependent.

Comment 3 Panu Matilainen 2014-02-18 09:53:11 UTC
AFAICS the %pretrans script should be in thermostat-webapp as that's where the conflicting symlink is, not the main thermostat package where the patch from comment #1 puts it.

Comment 4 Severin Gehwolf 2014-02-18 11:38:29 UTC
(In reply to Panu Matilainen from comment #3)
> AFAICS the %pretrans script should be in thermostat-webapp as that's where
> the conflicting symlink is, not the main thermostat package where the patch
> from comment #1 puts it.

If I modify the %pretrans macro as follows nothing changes. Same conflicts come up using yum or rpm -Uvh --test:

%pretrans webapp -p <lua>

I'm not an expert in using %pretrans, so this is an educated guess. I'll provide scratch builds for you to try yourself later today. Reducing this to a minimal reproducer should be fairly straight forward, FWIW.

Comment 5 Severin Gehwolf 2014-02-18 13:43:40 UTC
Created attachment 864562 [details]
Fix for revision f0be04eeff638eee843c9a13956d7e493278dcb2 in dist-git

Comment 6 Severin Gehwolf 2014-02-18 13:47:24 UTC
Comment 5 adds an updated patch. Like I said before it does not fix the issue. A scratch build for F20 is going on here if you need (S)RPMs to test, Panu:

http://koji.fedoraproject.org/koji/taskinfo?taskID=6542685

Comment 7 Severin Gehwolf 2014-03-21 08:03:14 UTC
I've pushed this to rawhide even though users who upgrade from F20 may run into this issue. A workaround is to erase thermostat-webapp and then install it again. This also works using yum. I believe this is better than not fixing this bug.

Fixed in thermostat-1.0.2-7.fc21

http://koji.fedoraproject.org/koji/taskinfo?taskID=6655642


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