Bug 789023 - Content Repository Syncing Does Not Use SHA256 for Checksum and Version
Content Repository Syncing Does Not Use SHA256 for Checksum and Version
Status: CLOSED CURRENTRELEASE
Product: RHQ Project
Classification: Other
Component: Content (Show other bugs)
4.3
Unspecified Unspecified
high Severity high (vote)
: ---
: JON 3.0.1
Assigned To: Stefan Negrea
Mike Foley
:
Depends On: 772722
Blocks: 788629
  Show dependency treegraph
 
Reported: 2012-02-09 11:01 EST by Stefan Negrea
Modified: 2013-09-03 11:07 EDT (History)
1 user (show)

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


Attachments (Terms of Use)
verify CSP sync (72.15 KB, image/png)
2012-02-13 15:10 EST, Mike Foley
no flags Details
verify RHQ_PACKAGE_VERSION (63.39 KB, image/png)
2012-02-13 15:14 EST, Mike Foley
no flags Details
2nd verification image (22.53 KB, image/png)
2012-02-13 15:28 EST, Mike Foley
no flags Details
another verification image for 2nd set of verification steps (76.11 KB, image/png)
2012-02-13 15:28 EST, Mike Foley
no flags Details

  None (edit)
Description Stefan Negrea 2012-02-09 11:01:36 EST
+++ This bug was initially created as a clone of Bug #772722 +++

Description of problem:
The content repository syncing plugins do not use SHA256 consistently as a checksum. Display version and version are not correctly set and do not follow agent side discovery conventions.

How reproducible:
Everytime.

Steps to Reproduce:
1. Attempt to sync RHQ with a remote package repository. 
2. Observe the version and display version for each package version synchronized.

  
Actual results:
MD5 is used as the checksum and version of packages.

Expected results:
The display version and version use the same format as the agent side plugins that discover content. The version format: [sha256=aaa1234..]


Additional info:
There are five server side plugins available for remote repository syncing. This BZ should focus on consistency with regards to version, display version and SHA256 as the checksum.

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


Setup:
1) JON server started
2) CSP URL: https://access.redhat.com/jbossnetwork/restricted/feed/software.html?product=all&downloadType=all&flavor=rss&version=&jonVersion=2.0

Stimulate:
1) Navigate to Administration -> Content -> Content Sources -> JBoss CP Patch Feed -> Edit
2) Select Yes from Active radio buttons
3) Type RedHat Network credentials
4) Save
5) Synchronize the repository

Verification steps:
1) Verify that after Step 6 there are packages in the synchornized repository
2) Look in the database, rhq_package_version and check display version and version fields. Display version should have the old version content, version should have the following format [sha256=abcd1234]

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

2nd verification steps



Setup:
1) RHQ server started
2) Two sample war archives (eg. sample1.war, sample2.war)

Stimulate:
1) Create the following folder tree:
      /rhqsources    <- folder
      /rhqsources/testrepo    <- folder
      /rhqsources/testrepo/subfolder    <- folder
      /rhqsources/testrepo/sample1.war    <- file
      /rhqsources/testrepo/subfolder/sample2.war    <-file
2) Navigate to Administration -> Content -> Content Sources -> Create New -> Local Disk Storage 
3) Fill in the fields required with the following info:
    a) Name of the sources should be testrepo
    b) Root directory should be /rhqsources
    c) Package type: JBossAS5 - Web Application (WAR) - WAR File
    d) Resource type: JBossAS5 - Web Application (WAR)
4) Save
5) Synchronize the repository

Verification steps:
1) Verify that after Step 6 there are packages in the synchornized repository
    a) only sample1.war is present
    b) sample2.war was not discovered
    c) there are no synchronization errors
2)  Look in the database, rhq_package_version and check display version and  version fields. Display version should have the old version content,  version should have the following format [sha256=abcd1234]

--- Additional comment from snegrea@redhat.com on 2012-02-09 11:00:08 EST ---

Some negative test cases for the second test case presented here:

1) Step 1, create /rhqresources/testrepo but leave it empty. No packages should be discovered for the repo. 
2) Step 1, create two subfolders underneath /rhqresources/testrepo. Add subpackages in each subfolder. Only packages directly underneath testrepo folder should be discovered.
3) Step 3, name the resource testrepo3. There should be no packages discovered since testrepo3 is not in the subdirectory structure of rhqresources.
Comment 2 Simeon Pinder 2012-02-10 17:44:48 EST
Moving to ON_QA as new RC 4 available to test in:
https://brewweb.devel.redhat.com//buildinfo?buildID=198384
Comment 3 Mike Foley 2012-02-13 15:10:15 EST
partial verification ... as follows.

i completed these steps ... and attached image to document the verification.

Setup:
1) JON server started
2) CSP URL:
https://access.redhat.com/jbossnetwork/restricted/feed/software.html?product=all&downloadType=all&flavor=rss&version=&jonVersion=2.0

Stimulate:
1) Navigate to Administration -> Content -> Content Sources -> JBoss CP Patch
Feed -> Edit
2) Select Yes from Active radio buttons
3) Type RedHat Network credentials
4) Save
5) Synchronize the repository

Verification steps:
1) Verify that after Step 6 there are packages in the synchornized repository
2) Look in the database, rhq_package_version and check display version and
version fields. Display version should have the old version content, version
should have the following format [sha256=abcd1234]
Comment 4 Mike Foley 2012-02-13 15:10:49 EST
Created attachment 561660 [details]
verify CSP sync
Comment 5 Mike Foley 2012-02-13 15:13:49 EST
attaching an image that documents verification step #2 in comment #3 above.
Comment 6 Mike Foley 2012-02-13 15:14:32 EST
Created attachment 561663 [details]
verify RHQ_PACKAGE_VERSION
Comment 7 Mike Foley 2012-02-13 15:27:32 EST
attaching 2 images to document 2nd set of verification steps ... repo sync and local repo
Comment 8 Mike Foley 2012-02-13 15:28:11 EST
Created attachment 561668 [details]
2nd verification image
Comment 9 Mike Foley 2012-02-13 15:28:56 EST
Created attachment 561669 [details]
another verification image for 2nd set of verification steps
Comment 10 Heiko W. Rupp 2013-09-03 11:07:52 EDT
Bulk closing of old issues in VERIFIED state.

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