Bug 788738 - Tomcat Plugin Does Not Compute SHA for Exploded WAR Deployments
Tomcat Plugin Does Not Compute SHA for Exploded WAR Deployments
Status: CLOSED CURRENTRELEASE
Product: JBoss Operations Network
Classification: JBoss
Component: Plugin -- Tomcat (Show other bugs)
JON 3.0.0
All All
high Severity high
: ---
: JON 3.0.1
Assigned To: Stefan Negrea
Mike Foley
:
Depends On: 761593
Blocks: jon30-sprint10/rhq43-sprint10 788629
  Show dependency treegraph
 
Reported: 2012-02-08 17:31 EST by Stefan Negrea
Modified: 2014-06-20 12:08 EDT (History)
5 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: 761593
Environment:
Last Closed: 2013-09-11 06:58:29 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Stefan Negrea 2012-02-08 17:31:32 EST
+++ This bug was initially created as a clone of Bug #761593 +++

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.

--- Additional comment from mfoley@redhat.com on 2012-01-23 15:23:17 EST ---

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.

--- Additional comment from mfoley@redhat.com on 2012-01-23 15:29:42 EST ---

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.

--- Additional comment from mfoley@redhat.com on 2012-01-23 15:47:18 EST ---

adding NeedsTestCase ... there may be opportunities to automate either the CLI or the UI tests ... or failing that ... add this in TCMS

--- Additional comment from snegrea@redhat.com on 2012-02-07 09:48:36 EST ---

*** Bug 602475 has been marked as a duplicate of this bug. ***

--- Additional comment from snegrea@redhat.com on 2012-02-08 17:30:31 EST ---

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 2 Mike Foley 2012-02-08 17:42:26 EST
Not verifiable in RC3.  wait for RC4, or a build from jenkins 3.01 branch
Comment 3 Simeon Pinder 2012-02-10 17:44:47 EST
Moving to ON_QA as new RC 4 available to test in:
https://brewweb.devel.redhat.com//buildinfo?buildID=198384

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