Bug 761593 - Tomcat Plugin Does Not Compute SHA for Exploded WAR Deployments
Summary: Tomcat Plugin Does Not Compute SHA for Exploded WAR Deployments
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: RHQ Project
Classification: Other
Component: Plugins
Version: 4.3
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: ---
: RHQ 4.3.0
Assignee: Stefan Negrea
QA Contact: Mike Foley
URL:
Whiteboard:
: 602475 (view as bug list)
Depends On:
Blocks: 758753 jon30-sprint10, rhq43-sprint10 788738
TreeView+ depends on / blocked
 
Reported: 2011-12-08 16:54 UTC by Stefan Negrea
Modified: 2013-09-01 10:13 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
: 788738 (view as bug list)
Environment:
Last Closed: 2013-09-01 10:13:01 UTC
Embargoed:


Attachments (Terms of Use)

Description Stefan Negrea 2011-12-08 16:54:55 UTC
Description of problem:
The Tomcat plugin does not compute the SHA for exploded deployments.

How reproducible:
Every time.

Steps to Reproduce:
1. Inventory a Tomcat 6 Server
2. Deploy a new WAR for an existing application (make sure it gets exploded)
3. Check the manifest for the exploded war for the RHQ SHA attribute.
  
Actual results:
The SHA attribute is not present.

Expected results:
The SHA attribute is in the file.


Additional info:
This functionality is not implemented for the Tomcat 6 plugin. The JBoss AS 4 and 5 plugins will also need to be code inspected.

Comment 1 Mike Foley 2012-01-23 20:23:17 UTC
Verification steps for QE



Setup:
1) RHQ server started, RHQ agent running, CLI connected to RHQ server
2) Inventoried Tomcat Server, JBoss AS4 or JBoss EAP5.1
3) Need the ID of a content backed resource, eg. an application resource. The ID can be retrieved from the UI http://localhost:7080/coregui/#Resource/14932, the last portion of the url is the ID of the resource.
4) A sample war application to be deployed to the application server
5) A folder to backup applications from the server

Stimulate:
1) Navigate in the UI to the selected application resource, content tab, history subtab.
2) From the CLI run the following commands:
3) applicationResource = ProxyFactory.getResource(14932)
4) applicationResource.retrieveBackingContent("/resources/backup/original.war")
5) applicationResource.updateBackingContent("/resources/new/newcontent.war", "1.2")
6) applicationResource.retrieveBackingContent("/resources/backup/updated.war")
7) Navigate in the UI to the resource that was just updated to the Content tab

Verification steps:
1) Verify that after Step 1, the Full Package Audit Trail table, version column has either a normal number (eg. 1.2.3) or sha256. The version field should not be empty.
2) Verify that the archive retrieved in Step 3 is the exact archive that was deployed on the server before running the test
3) Verify that after Step 4 the new application has been actually deployed on the application server. Check the file system where the application server deploys content.
4) Verify that after Step 4 the new application has RHQ-Sha256 attribute in the manifest.
5) Verify that after Step 5 the archive downloaded is the application deployed in Step 4
6) Verify the content tab, history subtab has the following:
  a) Full Package Audit Trail table has the correct package information marked as Discovered, including correct version.
  b) Completed Requests table has information regarding the request submitted from the CLI, including submitted version.

Comment 2 Mike Foley 2012-01-23 20:29:42 UTC
2nd verification step for QE



UI Test (applicable to BZ 761593, 767247, 767393, 769986)

Setup:
1) RHQ server started, RHQ agent running
2) Inventoried Tomcat Server, JBoss AS4 or JBoss EAP5.1
3) A sample war application to be deployed to the application server

Stimulate:
1) Navigate in the UI to the selected application resource, content tab, history subtab.
2) Navigate to the New subtab.
3) Upload a new war package for the resource. Follow the guided UI but do change the version field to something unique.
4) Navigate in the UI to the resource that was just updated to the Content tab

Verification steps:
1)  Verify that after Step 1, the Full Package Audit Trail table, version  column has either a normal number (eg. 1.2.3) or sha256. The version  field should not be empty.
2)  Verify after Step 4 the new application has been actually deployed  on the application server. Check the file system where the application  server deploys content.
3) Verify after Step 4 the new application has RHQ-Sha256 attribute in the manifest.
4) Verify after Step 4 the content tab, history subtab has the following:
  a) Full Package Audit Trail table has the correct package information marked as Discovered, including correct version.
  b) Completed Requests table has information regarding the request submitted from the CLI, including submitted version.

Comment 3 Mike Foley 2012-01-23 20:47:18 UTC
adding NeedsTestCase ... there may be opportunities to automate either the CLI or the UI tests ... or failing that ... add this in TCMS

Comment 4 Stefan Negrea 2012-02-07 14:48:36 UTC
*** Bug 602475 has been marked as a duplicate of this bug. ***

Comment 5 Stefan Negrea 2012-02-08 22:30:31 UTC
Some negative test cases for the first test case posted in comment 1 :

1) Step 4, point to an existing file
2) Step 5, point to a non-existing file
3) Step 6, retrieve content twice in two separate files and then compare the
results
4) Step 5, repeat the step with a different version. Observe in the UI that
that version is from the last call and two entries in the deployment log.

Comment 7 Mike Foley 2012-02-08 22:41:58 UTC
Not verifiable in RC3.  wait for RC4, or a build from jenkins 3.01 branch

Comment 8 Libor Zoubek 2012-02-16 20:44:11 UTC
movina back to ON_QA, I've actually verified this on JON 3.0.1 not master

Comment 9 Heiko W. Rupp 2013-09-01 10:13:01 UTC
Bulk closing of items that are on_qa and in old RHQ releases, which are out for a long time and where the issue has not been re-opened since.


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