Bug 664715

Summary: API call "client.configchannel.deleteFiles" does not delete the files correctly.
Product: Red Hat Satellite 5 Reporter: Dimitar Yordanov <dyordano>
Component: APIAssignee: Tomas Lestach <tlestach>
Status: CLOSED ERRATA QA Contact: Pavel Novotny <pnovotny>
Severity: high Docs Contact:
Priority: high    
Version: 540CC: cperry, eliningt, jcapel, jhutar, jpazdziora, mzazrivec, pep, pmutha, pneedle, pnovotny, rdassen, stephan.duehr, xdmoon
Target Milestone: ---Keywords: Regression
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: spacewalk-java-1.2.39-47 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 703380 (view as bug list) Environment:
Last Closed: 2011-06-17 02:29:24 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: 677501, 703380    
Attachments:
Description Flags
Script that reproduce the problem none

Description Dimitar Yordanov 2010-12-21 13:02:35 UTC
Created attachment 469968 [details]
Script that reproduce the problem

Description of problem:
API call client.configchannel.deleteFiles  does not delete the files correctly.

Version-Release number of selected component (if applicable):
Satellite 5.4

How reproducible:
Always

Steps to Reproduce:
1.Create a Configuration Channel via API - configchannel.create
2.Add a file to the channel - configchannel.createOrUpdatePath
3.Delete the file from the channel - configchannel.deleteFiles
4.Try to add the file again
  
Actual results:
Traceback (most recent call last):
  File "/tmp/p.py", line 43, in ?
    client.configchannel.createOrUpdatePath(key, 'RHTS_TEST_LABEL', '/tmp/RHTS_test', False, path_info)
  File "/usr/lib64/python2.4/xmlrpclib.py", line 1096, in __call__
    return self.__send(self.__name, args)
  File "/usr/lib64/python2.4/xmlrpclib.py", line 1383, in __request
    verbose=self.__verbose
  File "/usr/lib64/python2.4/xmlrpclib.py", line 1147, in request
    return self._parse_response(h.getfile(), sock)
  File "/usr/lib64/python2.4/xmlrpclib.py", line 1286, in _parse_response
    return u.close()
  File "/usr/lib64/python2.4/xmlrpclib.py", line 744, in close
    raise Fault(**self._stack[0])
xmlrpclib.Fault: <Fault -1: 'redstone.xmlrpc.XmlRpcFault: unhandled internal exception: No row with the given identifier exists: [com.redhat.rhn.domain.config.ConfigFile#26]'>


Expected results:
The file is added to the Configuration Channel.


Additional info:

Script that reproduce the problem is enclosed.

Comment 12 Tomas Lestach 2011-03-29 09:39:34 UTC
spacewalk.git: ce2ab2d821d57702769c8205ad7d054b1c0f14df

Comment 19 Pavel Novotny 2011-05-02 11:11:35 UTC
Taking QA Contact for bug verification.

Comment 20 Pavel Novotny 2011-05-03 11:55:32 UTC
Verified with reproducer in attachment 469968 [details].

Package version: spacewalk-java-1.2.39-61.el5sat

Add, delete and add again the same file into a config channel works fine now, no traceback.

Comment 22 Milan Zázrivec 2011-06-03 12:25:21 UTC
Verified in stage w/ spacewalk-java-1.2.39-82 -> release pending.

Comment 23 Clifford Perry 2011-06-17 02:29:24 UTC
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

https://rhn.redhat.com/errata/RHSA-2011-0879.html