Bug 593300 - createOrUpdatePath() creates a new revision for a file if you upload the same file twice
Summary: createOrUpdatePath() creates a new revision for a file if you upload the same...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Satellite 5
Classification: Red Hat
Component: API
Version: 530
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Tomas Lestach
QA Contact: Matej Kollar
URL:
Whiteboard:
Depends On:
Blocks: sat54-blockers
TreeView+ depends on / blocked
 
Reported: 2010-05-18 13:17 UTC by Vishal Gaikwad
Modified: 2018-11-26 19:33 UTC (History)
4 users (show)

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.
Clone Of:
Environment:
Last Closed: 2012-01-31 01:55:58 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
createOrUpdatePath_API_script (831 bytes, application/octet-stream)
2010-05-18 13:17 UTC, Vishal Gaikwad
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2012:0072 0 normal SHIPPED_LIVE Red Hat Network Satellite server spacewalk-java bug fix update 2012-01-31 06:55:07 UTC

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


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