Bug 905092 - WARN log is generated by API call errata.create()
Summary: WARN log is generated by API call errata.create()
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Satellite 5
Classification: Red Hat
Component: API
Version: 550
Hardware: Unspecified
OS: Unspecified
low
low
Target Milestone: ---
Assignee: Tomas Lestach
QA Contact: Martin Korbel
URL:
Whiteboard:
Depends On:
Blocks: sat560-lowbug
TreeView+ depends on / blocked
 
Reported: 2013-01-28 15:01 UTC by Dimitar Yordanov
Modified: 2013-10-01 21:56 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
: 908346 (view as bug list)
Environment:
Last Closed: 2013-10-01 21:56:10 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Dimitar Yordanov 2013-01-28 15:01:56 UTC
Description of problem:

WARN log is generated  to catalina.out by  API call errata.create()

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

How reproducible:
100%

Steps to Reproduce:
1. Create Custom Software Channel
2. Push a package(s) to the channel.
3. Create a Errata with API call errata.crate but leave the Url parameter empty in struct Bug.

array:

    struct - bug
        int "id" - Bug Id
        string "summary"
        string "url"


----

  types={ 'BA': 'Bug Fix Advisory',
          'EA': 'Product Enhancement Advisory',
          'SA': 'Security Advisory',
        }
  me = {'synopsis': 'synopsis',
        'advisory_name': 'test',
        'advisory_release': 1,
        'advisory_type': types[BA],
        'product': 'product',
        'topic': 'topic',
        'description': 'description',
        'references': 'references',
        'notes': 'notes',
        'solution': 'solution'}
  mb = ({'id': 123456, 'summary': 'bug 123456 summary'},)
  mk = ('keyword1', 'keyword2')
  PKGID='1,2,3,4'
  mp = re.split(',', PKGID)   # more packages might be provided, separated by ","
  mp_i = []
  for i in mp:
    mp_i.append(int(i))
  mc = (CHANNEL,)
  e = client.errata.create(key, me, mb, mk, mp_i, True, mc)
  
Actual results:
The following log is generated in catalina.out

WARN  com.redhat.rhn.common.hibernate.EmptyVarcharInterceptor - Object com.redhat.rhn.domain.errata.impl.PublishedBug is setting empty string url

Expected results:
No logs.

Additional info:
See Tests: RHN-Tools/spacewalk-clone-by-date

    for ERRATA_CHANN in ${CUSTOM_CHANNEL_1} ${CHILD_CUSTOM_CHANNEL_1} ${CUSTOM_CHANNEL_2} ${CHILD_CUSTOM_CHANNEL_2}; do 
        # Create erattas in every channel
        rlLogInfo "Creating ${PKG_NUM} Erratas in Channel ${ERRATA_CHANN}"
        for ((index=0;index<${PKG_NUM};index++));do
            echo -n "${index}|"
            # All the Errata in channel will have the same Random as the channel
            ERRATA_NAME="errata_${index}_${ERRATA_CHANN##*_}"
            PKG_ID=$( manage-errata.py ${RHN_USER} ${RHN_PASS} https://$RHN_SERVER/rpc/api GETPKGID "test-regular-${index}_${ERRATA_CHANN}|0.2|2||${ARCH}" | tail -n 1 )
            [[ -z "$PKG_ID" ]] && rlDie "Was not able to determine NEW package 'test-regular-${index}_${ERRATA_CHANN}-0.2-2.${ARCH}' ID"
            manage-errata.py ${RHN_USER} ${RHN_PASS} https://${RHN_SERVER}/rpc/api CREATE "${ERRATA_NAME}" "${PKG_ID}" "${ERRATA_CHANN}" &> /dev/null || rlDie "Creation of errata '${ERRATA_NAME}' failed"
        done
    done

Comment 1 Tomas Lestach 2013-01-28 15:17:28 UTC
This has already been fixed in upstream ...

spacewalk.git: 5c940e3b42144eb01bee8754a37cb6a49975222b

Comment 3 Martin Korbel 2013-09-25 11:57:10 UTC
VERIFIED on spacewalk-java-2.0.2-39.el6sat
REPRODUCED on spacewalk-java-1.7.54-119.el6sat

Steps to reproduce:
> python
>>> import xmlrpclib
>>> client = xmlrpclib.Server('http://localhost/rpc/api', verbose=0)
>>> key = client.auth.login('admin','nimda')
>>> client.errata.create(key,{'synopsis':'TEST12:2013','advisory_name':'TEST12:2013','advisory_release':1,'advisory_type':'Bug Fix Advisory','product':'XXX','topic':'XXX','description':'XXX','references':'','solution':'XXX'},[{'id': 123456, 'summary': 'bug 123456 summary'}],[],[],0,[])
> grep "com.redhat.rhn.common.hibernate.EmptyVarcharInterceptor" /var/log/tomcat6/catalina.out

Sat5.5.0:
2013-09-25 07:51:09,562 [TP-Processor2] WARN  com.redhat.rhn.common.hibernate.EmptyVarcharInterceptor - Object com.redhat.rhn.domain.errata.impl.UnpublishedErrata is setting empty string refersTo
2013-09-25 07:51:09,564 [TP-Processor2] WARN  com.redhat.rhn.common.hibernate.EmptyVarcharInterceptor - Object com.redhat.rhn.domain.errata.impl.PublishedBug is setting empty string url

Sat5.6.0:
<nothing>

Comment 4 Clifford Perry 2013-10-01 21:56:10 UTC
Satellite 5.6 has been released. This bug was tracked under the release.  

This bug was either VERIFIED or RELEASE_PENDING (re-verified prior shortly
before release). 

Moving to CLOSED CURRENT_RELEASE. 

Text from Upgrade Erratum follows:

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/RHEA-2013-1395.html


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