Bug 773061
Summary: | Disk Source Synchronization Results in FileNotFoundException | |||
---|---|---|---|---|
Product: | [Other] RHQ Project | Reporter: | Stefan Negrea <snegrea> | |
Component: | Content | Assignee: | Stefan Negrea <snegrea> | |
Status: | CLOSED CURRENTRELEASE | QA Contact: | Mike Foley <mfoley> | |
Severity: | high | Docs Contact: | ||
Priority: | medium | |||
Version: | 4.3 | CC: | hrupp | |
Target Milestone: | --- | |||
Target Release: | RHQ 4.3.0 | |||
Hardware: | Unspecified | |||
OS: | Unspecified | |||
Whiteboard: | ||||
Fixed In Version: | Doc Type: | Bug Fix | ||
Doc Text: | Story Points: | --- | ||
Clone Of: | ||||
: | 789027 (view as bug list) | Environment: | ||
Last Closed: | 2013-09-01 10:14:36 UTC | Type: | --- | |
Regression: | --- | Mount Type: | --- | |
Documentation: | --- | CRM: | ||
Verified Versions: | Category: | --- | ||
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | ||
Cloudforms Team: | --- | Target Upstream Version: | ||
Embargoed: | ||||
Bug Depends On: | ||||
Bug Blocks: | 758753, 789027 |
Description
Stefan Negrea
2012-01-10 19:40:32 UTC
Updated the code to ignore subfolders inside the repo folder. This will prevent the exception. Traversing the tree of subfolders was not an option because it would have allowed overlapping imports of packages with sub-repos. The set of requirements going forward: - The plugin searches for a subfolder that matches the repo name in the subfolder tree of the disk source root folder. The search process stops once the first folder with the repo name is found. - Once the repo folder is found, the plugin imports only packages in that folder. - Any subfolders in the repo folder are ignored and not traversed. 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] Some negative test cases: 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. master branch commit: http://git.fedorahosted.org/git/?p=rhq/rhq.git;a=commit;h=308f0b8dab812f3cf5c4097256789c1efc35cc85 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. |