[SRU] tomcat8-instance-create fails to update control port

Bug #1827090 reported by Stefan E. Funk
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
tomcat8 (Ubuntu)
Invalid
High
Unassigned
Bionic
Fix Released
Undecided
Unassigned

Bug Description

[Impact]

 * During Bionic's OpenJDK 11 transition the tomcat8 package was updated to the newest version. As the update was done in bionic-security there were concerns with updating conffiles, which could cause the package to now be updated by unattended-upgrades. Thus any such changes were rolled back to keep conffiles the same. Unfortunately one script (debian/tomcat8-instance-create) was not properly rolled back. This causes the script to fail to update the server.xml configuration when creating a new instance, making it a bit useless.
 * Since only Bionic's tomcat8 had the conffiles rolled back, no other release has been affected - ie. Cosmic and later releases shipped with a tomcat8 that already included the conffile changes.

[Test Case]

1. Install tomcat8
 $ apt install tomcat8
2. Create a new instance
 $ tomcat8-instance-create -p 8888 -c 9999 instance-name
3. Verify that conf/server.xml has been updated with the right connector (-p argument) and control ports (-c argument)

In the non-patched tomcat8, in step #3, the control ports won't be changed and will still be set to the default setting (8080 and 8005).

[Regression Potential]

 * Since this effectively introduces a required rollback so the tomcat8-instance-create can work on the default server.xml conffile no regressions are expected.

[Other Info]

 * Affects only Bionic (see Impact for details).

[Original Description]
The parameter -c (controlport) is not used anymore. I tried

tomcat8-instance-create -c 9999 -p 8888 instance-name

In conf/server.xml the controlport still set to 8005 (default) value.

The reason is located in line 120 of tomcat8-instance-create.

There is:

sed -i -e "s/Connector port=\"8080\"/Connector port=\"${HPORT}\"/;s/Server port=\"-1\" shutdown=\"SHUTDOWN\"/Server port=\"${CPORT}\" shutdown=\"${CWORD}\"/" "${TARGET}/conf/server.xml"

...and there should be:

sed -i -e "s/Connector port=\"8080\"/Connector port=\"${HPORT}\"/;s/Server port=\"8005\" shutdown=\"SHUTDOWN\"/Server port=\"${CPORT}\" shutdown=\"${CWORD}\"/" "${TARGET}/conf/server.xml"

Thanks a lot and have a nice weekend!
Stefan.

description: updated
summary: - "-1" instead of "8005" in tomcat8-instance-create
+ [SRU] tomcat8-instance-create fails to update connector and control
+ ports
tags: added: bionic
description: updated
Changed in tomcat8 (Ubuntu):
importance: Undecided → High
status: New → Confirmed
Revision history for this message
Łukasz Zemczak (sil2100) wrote : Please test proposed package

Hello Stefan, or anyone else affected,

Accepted tomcat8 into bionic-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/tomcat8/8.5.39-1ubuntu1~18.04.2 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested and change the tag from verification-needed-bionic to verification-done-bionic. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-bionic. In either case, without details of your testing we will not be able to proceed.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance for helping!

N.B. The updated package will be released to -updates after the bug(s) fixed by this package have been verified and the package has been in -proposed for a minimum of 7 days.

Changed in tomcat8 (Ubuntu Bionic):
status: New → Fix Committed
tags: added: verification-needed verification-needed-bionic
Changed in tomcat8 (Ubuntu):
status: Confirmed → Invalid
Revision history for this message
Ubbo (ubbo-veentjer) wrote : Re: [SRU] tomcat8-instance-create fails to update connector and control ports

I can confirm that this is fixed with the package tomcat8-user 8.5.39-1ubuntu1~18.04.2 installed from the bionic-proposed repository.
Thanks a lot
ubbo

tags: added: verification-done-bionic
removed: verification-needed-bionic
summary: - [SRU] tomcat8-instance-create fails to update connector and control
- ports
+ [SRU] tomcat8-instance-create fails to update control port
description: updated
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package tomcat8 - 8.5.39-1ubuntu1~18.04.2

---------------
tomcat8 (8.5.39-1ubuntu1~18.04.2) bionic; urgency=medium

  * debian/tomcat8-instance-create: update regex to account for the fact that
    the shutdown port is set to 8005 as default. LP: #1827090.

 -- Tiago Stürmer Daitx <email address hidden> Thu, 09 May 2019 13:50:49 +0000

Changed in tomcat8 (Ubuntu Bionic):
status: Fix Committed → Fix Released
Revision history for this message
Steve Langasek (vorlon) wrote : Update Released

The verification of the Stable Release Update for tomcat8 has completed successfully and the package has now been released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regressions.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.