Bug 593300

Summary: createOrUpdatePath() creates a new revision for a file if you upload the same file twice
Product: Red Hat Satellite 5 Reporter: Vishal Gaikwad <vgaikwad>
Component: APIAssignee: Tomas Lestach <tlestach>
Status: CLOSED ERRATA QA Contact: Matej Kollar <mkollar>
Severity: medium Docs Contact:
Priority: medium    
Version: 530CC: clasohm, cperry, mkollar, stephan.duehr
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: spacewalk-java-1.2.39-110 Doc Type: Bug Fix
Doc Text:
Consequence: New configuration revision was created every time a configuration file was uploaded via API, even if the file (meta) content didn't change at all. Result: New configuration revision will be created only if the new revision would differ from the actual one, when uploading configuration files via API.
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-01-31 01:55:58 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: 715348    
Attachments:
Description Flags
createOrUpdatePath_API_script none

Description Vishal Gaikwad 2010-05-18 13:17:48 UTC
Created attachment 414846 [details]
createOrUpdatePath_API_script

Description of problem:
Configuration files uploaded through API keep incrementing the version number though the file and file contents are the same.

Version-Release number of selected component (if applicable):
RHNS 530

How reproducible:
Always

Steps to Reproduce:
1. Modify the Satellite's FQDN, username, password and systemid from the attached script
2. Execute it on a RHN Satellite server
3. See the Revesion number from WebUI under Systems -> System in question -> SDC -> Configuration -> View/Modify Files -> Locally-Managed Files
  
Actual results:
File revision changes

Expected results:
File revision should not change if the file is not changed.

Additional info:
Files added using the WebUI works correctly and the revision doesn't change.

Comment 5 Tomas Lestach 2011-10-31 10:27:17 UTC
spacewalk.git: e23d86a2bf8df74a960e5d151d0cbf912f20dac2

Comment 6 Tomas Lestach 2011-11-04 13:53:37 UTC
handle also directory and symlink config revision comparism ...

spacewalk.git: 888603756256c5f374899bf085914ff768bb0642

Comment 9 Tomas Lestach 2012-01-04 16:08:54 UTC
    Technical note added. If any revisions are required, please edit the "Technical Notes" field
    accordingly. All revisions will be proofread by the Engineering Content Services team.
    
    New Contents:
Consequence:
New configuration revision was created every time a configuration file was uploaded via API, even if the file (meta) content didn't change at all.

Result:
New configuration revision will be created only if the new revision would differ from the actual one, when uploading configuration files via API.

Comment 12 errata-xmlrpc 2012-01-31 01:55:58 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

http://rhn.redhat.com/errata/RHBA-2012-0072.html