Bug 972891 - DBCHANGE needed to support Satellite5.6-Beta2
Summary: DBCHANGE needed to support Satellite5.6-Beta2
Alias: None
Product: Red Hat Network
Classification: Retired
Component: RHN/API
Version: MR51 (AMS)
Hardware: Unspecified
OS: Unspecified
Target Milestone: ---
Assignee: Derek Brown
QA Contact: Nicole Yancey
URL: https://url.corp.redhat.com/chg1953
Whiteboard: CHG1953
Depends On:
TreeView+ depends on / blocked
Reported: 2013-06-10 18:25 UTC by vikas kumar
Modified: 2013-11-18 00:48 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 2013-06-27 16:08:21 UTC

Attachments (Terms of Use)

Description vikas kumar 2013-06-10 18:25:57 UTC
Description of problem:

Satellite-5.6-Beta2 is going to be allowed to activate against Hosted. This process requires coordination between AMS, Satellite, and GCA-DB. This BZ is to track the SQL changes necessary.

Please add mapping product to channel for those products.

The satellite channels will be named:


(only x86_64 and s390 are supported)

Channels for Satellite/RHEL6 exist in rhn.qa.redhat.com; a ticket has been submitted to RCM to create the RHEL5 versions, as of 7-JUN-2013.

You can test Satellite5.6beta activation with certificate:


and using:
rhn-satellite-activate --rhn-cert cert5.6 --ignore-version-mismatch

Current output:
[root@xn--ufuk-xpa16d5h ~]# rhn-satellite-activate --rhn-cert cert5.6 --ignore-version-mismatch
RHN_PARENT: xmlrpc.rhn.qa.redhat.com
Error reported from RHN: <Fault -211: 'Invalid channel'>
ERROR: unhandled XMLRPC fault upon remote activation: <Fault -211: 'Invalid channel'>

Expected output:
flawless activation

The DBCHANGE required is:

To Add/Change/Commit:
1 - Add 5.6beta product versions:

INSERT INTO rhnChannelProduct (id, product, version, beta) VALUES
(rhn_channelprod_id_seq.NEXTVAL, 'RHN Satellite', '5.6beta', 'N');

INSERT INTO rhnChannelProduct (id, product, version, beta) VALUES
(rhn_channelprod_id_seq.NEXTVAL, 'RHN Proxy', '5.6beta', 'N');

2 - Add Satellite 5.6beta mappings to this new product version:

UPDATE rhnChannel SET channel_product_id = (SELECT id FROM
rhnChannelProduct WHERE product = 'RHN Satellite' AND version = '5.6beta')
WHERE label in (

To Verify:

SELECT * FROM rhnChannelProduct where product = 'RHN Satellite' and
version = '5.6beta';

should have 1 row selected with a valid ID and BETA equal to 'N'



each should have 4 rows selected with a valid ID and CHANNEL_PRODUCT_ID
equal to the ID value of the first test query.

Satellite-5.6-BETA2 is slated to be made available to customers on 27-JUN-2013; this change will need to make its way to PROD on or before that date.

Sorry for the late notice - let me know if there are any questions!


(NOTE: This change was already run in RHNQA to make testing beta2-activation possible.) 

Additional info:

Needed by 27-JUN, 2013.

refer INC0059776

Comment 1 Derek Brown 2013-06-11 15:12:08 UTC
Spoke to Grant and made two changes to the queries.

1) We set beta flag to Y instead of N.
2) removed insert for RHN Proxy,  That isn't part of the beta.

Comment 2 Jonathon Turel 2013-06-11 15:21:07 UTC
dbchange looks good!

Comment 3 Jonathon Turel 2013-06-11 15:22:38 UTC
Testing Steps Quick Reference

1) create new user
2) grant-sku.cgi: MCT0370 qty 1
3) generate sat cert in portal UI
4) ssh to am-satellite, register system to new account/env and activate the satellite (see: 'history' command)

Activation should pass.

Comment 5 Jonathon Turel 2013-06-18 18:40:06 UTC
We need to include the 5.6beta version in the getVersions API.

I've made the code change, pending review.

Comment 6 Derek Brown 2013-06-19 14:48:13 UTC
Code review complete


Use the following command on am-rhn2.devlab.phx1.redhat.com:

python /git/rhn-hosted/java/rhn/xml_rpc_api/callAnyMethod.py dev2 public.satellite.getVersions rhn-noc redhat

This is ready to test.

Comment 8 Nicole Yancey 2013-06-19 16:58:37 UTC
verified on ams-dev2

Link to test run - https://tcms.engineering.redhat.com/run/66827/

Comment 9 Nicole Yancey 2013-06-24 18:57:20 UTC
Do not understand why must generate certificate with account that has MCT0370 first, then upload certificate after user is granted SKU SYS1192 or SYS0962.  

Steps to Reproduce:
1. Create new login - ny_0624q1
2. Grant the following SKUs to user: MCT0370, SYS1192 and SYS0062
3. Register system - rhnreg_ks --serverUrl http://xmlrpc.rhn.qa.redhat.com/XMLRPC --username ny_0624q1  --password redhat --force
4. Generate satellite certificate - python callAnyMethod.py qa public.satellite.generateCertificate ITENGRHNUSER redhat 6567000 5.6beta '{@2902367 : 1}' > certificate.xml

Expected result - certificate should be generated successfully

Actual result - Traceback (most recent call last):
  File "callAnyMethod.py", line 157, in <module>
  File "callAnyMethod.py", line 149, in main
    res = obj(*rpc_args)
  File "/usr/lib64/python2.6/xmlrpclib.py", line 1199, in __call__
    return self.__send(self.__name, args)
  File "/usr/lib64/python2.6/xmlrpclib.py", line 1489, in __request
  File "/usr/lib64/python2.6/xmlrpclib.py", line 1253, in request
    return self._parse_response(h.getfile(), sock)
  File "/usr/lib64/python2.6/xmlrpclib.py", line 1392, in _parse_response
    return u.close()
  File "/usr/lib64/python2.6/xmlrpclib.py", line 838, in close
    raise Fault(**self._stack[0])
xmlrpclib.Fault: <Fault 10064: 'Tried to generate certificate for Multi Satellite Org: '>

Executed above test with following logins: ny_0621q2 and ny_0621qqq.

***Workaround - Grant user MCT0370 only, then generated the certificate.  After certificate is generated, grant the user the skus - SYS0962 and SYS1198.  Now user can successfully upload the certificate.


NOTE: In dev2, 5.6 beta certificate is generated and activated for account that has MCT0370, SYS1192 and SYS0062.  Login=ny_0624d22

Comment 10 Nicole Yancey 2013-06-25 16:56:28 UTC
verified on qa

SKU configuration.  In QA should only use 1 of the SKUs - SYS0962 or SYS1198.

Comment 11 Brooks 2013-06-27 16:08:21 UTC
Pushed to production 06/27

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