Bug 1087603 - RFE - "rhn-migrate-classic-to-rhsm" migration script to accept the expected parameter either via standard input or the equivalent of an "answer" file"
Summary: RFE - "rhn-migrate-classic-to-rhsm" migration script to accept the expected p...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: subscription-manager
Version: 5.11
Hardware: x86_64
OS: Linux
unspecified
medium
Target Milestone: rc
: ---
Assignee: Bryan Kearney
QA Contact: John Sefler
URL:
Whiteboard:
Depends On: 912375
Blocks: rhsm-rhel511
TreeView+ depends on / blocked
 
Reported: 2014-04-14 19:02 UTC by John Sefler
Modified: 2014-09-16 00:22 UTC (History)
9 users (show)

Fixed In Version:
Doc Type: Enhancement
Doc Text:
Clone Of: 912375
Environment:
Last Closed: 2014-09-16 00:22:23 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2014:1225 0 normal SHIPPED_LIVE subscription-manager bug fix and enhancement update 2014-09-16 04:15:23 UTC

Comment 1 Carter Kozak 2014-04-29 13:48:57 UTC
Fixed in subscription-manager-1.11.3-2.el5

Comment 3 John Sefler 2014-05-22 19:58:13 UTC
Verifying Version...
[root@jsefler-5 ~]# rpm -q subscription-manager-migration
subscription-manager-migration-1.11.3-3.el5


[root@jsefler-5 ~]# rhn-migrate-classic-to-rhsm --help
Usage: rhn-migrate-classic-to-rhsm [OPTIONS]

options:
  -h, --help            show this help message and exit
  -f, --force           ignore channels not available on RHSM
  -g, --gui             launch the GUI tool to attach subscriptions, instead
                        of auto-attaching
  -n, --no-auto         don't execute the auto-attach option while registering
                        with subscription manager
  -s SERVICELEVEL, --servicelevel=SERVICELEVEL
                        service level to follow when attaching subscriptions,
                        for no service level use --servicelevel=""
  --serverurl=SERVERURL
                        specify the subscription management server to migrate
                        to
  --redhat-user=REDHATUSER
                        specify the Red Hat user name
  --redhat-password=REDHATPASSWORD
                        specify the Red Hat password
  --subscription-service-user=SUBSERVICEUSER
                        specify the subscription service user name
  --subscription-service-password=SUBSERVICEPASSWORD
                        specify the subscription service password
  --no-proxy            don't use RHN proxy settings with subscription
                        management server
  --org=ORG             organization to register to
  --environment=ENVIRONMENT
                        environment to register to
[root@jsefler-5 ~]# 

^^^ VERIFIED: Notice the command line options to specify --redhat-user=REDHATUSER --redhat-password=REDHATPASSWORD --subscription-service-user=SUBSERVICEUSER --subscription-service-password=SUBSERVICEPASSWORD --org=ORG --environment=ENVIRONMENT which can all be used to satisfy the request in comment 0.





[root@jsefler-5 ~]# rhnreg_ks --serverUrl=https://xmlrpc.rhn.code.stage.redhat.com/XMLRPC --username=qa --password=*** --force --norhnsd --nohardware --nopackages --novirtinfo
[root@jsefler-5 ~]# rhn-migrate-classic-to-rhsm --redhat-user=qa --redhat-password=*** --subscription-service-user=stage_test_12 --subscription-service-password=*** --org=7065298 --no-auto --serverurl=subscription.rhn.stage.redhat.com:443/subscription

Retrieving existing RHN Classic subscription information...

+-----------------------------------------------------+
System is currently subscribed to these RHN Classic Channels:
+-----------------------------------------------------+
rhel-x86_64-server-5

+-----------------------------------------------------+
Installing product certificates for these RHN Classic channels:
+-----------------------------------------------------+
rhel-x86_64-server-5

Product certificates installed successfully to /tmp/sm-productCertDir.

Preparing to unregister system from RHN Classic...
System successfully unregistered from RHN Classic.

Attempting to register system to Red Hat Subscription Management...
The system has been registered with ID: 5ac0d250-94de-4f86-be65-9254cd47d7ca 
System 'jsefler-5.usersys.redhat.com' successfully registered to Red Hat Subscription Management.

[root@jsefler-5 ~]# 



^^^ VERIFIED: the migration script can be run with options to avoid interactive prompting.  (Note: I did not specify --environment because the hosted stage subscription management server does not support environments, but a katello server does and should only be required when more than one environment is available to the Subscription Service credentials.

Comment 6 errata-xmlrpc 2014-09-16 00:22:23 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-2014-1225.html


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