Bug 682331

Summary: subscription-manager --auto not in man page
Product: Red Hat Enterprise Linux 6 Reporter: J.C. Molet <jmolet>
Component: DocumentationAssignee: Deon Ballard <dlackey>
Status: CLOSED CURRENTRELEASE QA Contact: J.C. Molet <jmolet>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 6.1CC: bkearney, jsefler, spandey
Target Milestone: rcKeywords: Documentation
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-06-16 01:50:03 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Bug Depends On:    
Bug Blocks: 568421    
Attachments:
Description Flags
updated manpage
none
even more updated manpage
none
even more updated manpage none

Description J.C. Molet 2011-03-04 21:09:40 UTC
The --auto flag is in the program's help feature, but not in the man page (when using 'man subscripton-manager'):

[root@jmolet-vm3 ~]# subscription-manager subscribe --help
Usage: subscription-manager subscribe [OPTIONS]

subscribe

Options:
  -h, --help            show this help message and exit
  --debug=DEBUG         debug level
  --proxy=PROXY_URL     proxy url in the form of proxy_hostname:proxy_port
  --proxyuser=PROXY_USER
                        user for http proxy with basic authentication
  --proxypassword=PROXY_PASSWORD
                        password for http proxy with basic authentication
  --pool=POOL           subscription pool id
  --auto                automatically subscribe this system to
                        compatible subscriptions.

Version:
subscription-manager-0.95.3

Additional information:
This feature was added as part of bug: 680399

Comment 1 John Sefler 2011-03-04 22:21:54 UTC
The --ondate option of the list module is another new option that needs to get into the subscription-manager man page...

[root@jsefler-onprem03 ~]# subscription-manager list --help
Usage: subscription-manager list [OPTIONS]

list available or consumed Entitlement Pools for this system.

Options:
  -h, --help            show this help message and exit
  --debug=DEBUG         debug level
  --proxy=PROXY_URL     proxy url in the form of proxy_hostname:proxy_port
  --proxyuser=PROXY_USER
                        user for http proxy with basic authentication
  --proxypassword=PROXY_PASSWORD
                        password for http proxy with basic authentication
  --installed           installed
  --available           available
  --ondate=ON_DATE      date to search on, defaults to today's date, only used
                        with --available (example: 2011-03-04 )
  --consumed            consumed
  --all                 if supplied with --available then all subscriptions
                        are returned

Comment 2 John Sefler 2011-03-04 22:35:37 UTC
Background for Comment #1 is: https://bugzilla.redhat.com/show_bug.cgi?id=672562

Comment 3 John Sefler 2011-03-04 22:36:17 UTC
The --force option of the identity module is another new option that needs to get into the subscription-manager man page...

[root@jsefler-onprem03 ~]# subscription-manager identity --help
Usage: subscription-manager identity [OPTIONS]

request a new identity certficate for this machine

Options:
  -h, --help            show this help message and exit
  --debug=DEBUG         debug level
  --proxy=PROXY_URL     proxy url in the form of proxy_hostname:proxy_port
  --proxyuser=PROXY_USER
                        user for http proxy with basic authentication
  --proxypassword=PROXY_PASSWORD
                        password for http proxy with basic authentication
  --username=USERNAME   specify a username
  --password=PASSWORD   specify a password
  --regenerate          request a new certificate be generated
  --force               force certificate regeneration (requires username and
                        password)


Background: https://bugzilla.redhat.com/show_bug.cgi?id=678151

Comment 4 John Sefler 2011-03-04 22:42:53 UTC
The --installed option of the list module is another new option that needs to get
into the subscription-manager man page...

[root@jsefler-onprem03 ~]# subscription-manager list --help
Usage: subscription-manager list [OPTIONS]

list available or consumed Entitlement Pools for this system.

Options:
  -h, --help            show this help message and exit
  --debug=DEBUG         debug level
  --proxy=PROXY_URL     proxy url in the form of proxy_hostname:proxy_port
  --proxyuser=PROXY_USER
                        user for http proxy with basic authentication
  --proxypassword=PROXY_PASSWORD
                        password for http proxy with basic authentication
  --installed           installed
  --available           available
  --ondate=ON_DATE      date to search on, defaults to today's date, only used
                        with --available (example: 2011-03-04 )
  --consumed            consumed
  --all                 if supplied with --available then all subscriptions
                        are returned

Background: https://bugzilla.redhat.com/show_bug.cgi?id=634254

Comment 5 Deon Ballard 2011-03-08 17:05:32 UTC
Created attachment 482958 [details]
updated manpage

I think this adds everything in appropriately. I added the options in the top and then a couple of examples.

Comment 6 Deon Ballard 2011-03-08 17:06:13 UTC
I also need to update the deployment guide; I'll post the link here when it's ready.

Comment 7 John Sefler 2011-03-08 19:12:22 UTC
Deon,
I see something else that is also missing from the man page...  activate module


[root@jsefler-onprem04 tmp]# subscription-manager --help

Usage: subscription-manager [options] MODULENAME --help

Supported modules:


	activate       activate the registered user to a specified product
	clean          removes all local consumer data, does not effect the server
	facts          show information for facts
	identity       request a new identity certficate for this machine
	list           list available or consumer subscriptions for registered user
	refresh        pulls the latest entitlement data from the server
	register       register the client to RHN
	subscribe      subscribe the registered machine to a specified product
	unregister     unregister the client from RHN
	unsubscribe    unsubscribe the registered user from all or specific subscriptions

[root@jsefler-onprem04 tmp]# subscription-manager activate --help
Usage: subscription-manager activate [OPTIONS]

activate

Options:
  -h, --help            show this help message and exit
  --debug=DEBUG         debug level
  --proxy=PROXY_URL     proxy url in the form of proxy_hostname:proxy_port
  --proxyuser=PROXY_USER
                        user for http proxy with basic authentication
  --proxypassword=PROXY_PASSWORD
                        password for http proxy with basic authentication
  --email=EMAIL         optional email address to notify when token activation
                        is complete.
  --locale=LOCALE       optional language to use for email notification when
                        token activation is complete. Used with --email only.
                        Examples: en-us, de-de

Comment 8 John Sefler 2011-03-08 19:14:13 UTC
       --auto Automatically subscribes this system to the best-matched compat-
              ible subscription.
                               ^ (s) might be better since multiple subscriptions could be automatically subscribed.

Comment 9 John Sefler 2011-03-08 19:30:21 UTC
       --name=CONSUMERNAME
              Sets  the  name  of  the  consumer  (machine)  to register. This
              defaults to be the same as the username.

This defaults to the hostname of the system.
                     ^^^^^^^^ THIS IS NOW THE CORRECT DEFAULT

Comment 10 John Sefler 2011-03-08 19:35:43 UTC
    REGISTER OPTIONS

      --force
              Registers the system even if it is already registered. Normally,
              any register operations will fail if the machine is already reg-
              istered. The existing consumer entry and its  subscriptions  are
              deleted.
              ^^^^^^^ THIS IS NOT TECHNICALLY CORRECT.  A BETTER STATEMENT COULD BE:

The existing consumer is unregistered thereby relinquishing his/her consumed subscriptions before initiating a new registration.

Comment 11 John Sefler 2011-03-08 19:50:50 UTC
       If a machine has never been registered  (not  even  during  firstboot),
       then the register command will register the machine with whatever Enti-
       tlement Platform is configured in the  /etc/rhsm/rhsm.conf  file.  This
       command  requires,  at  a  minimum,  the  username  and password for an
       account to connect to the Entitlement Platform.

^^^ Due to new username/password prompting, the last sentence might better be written as:

This command  requires,  at  a  minimum,  the  username  and password for an account to connect to the Entitlement Platform; or if not supplied, subscription-manager will interactively prompt for these credentials.

Comment 12 John Sefler 2011-03-08 20:02:43 UTC
       The  collected  facts can also be overridden by creating a JSON file in
       the /etc/rhsm/facts/ directory. These have simple formats that define a
       fact and value:

Can we add to this paragraph that the JSON file must have a suffix of ".facts".

Comment 13 John Sefler 2011-03-08 20:09:44 UTC
   ENTITLEMENTS AND KICKSTART
       The subscription-manager tool can be run as a  post-install  script  as
       part  of  the  kickstart  installation process. This allows entitlement
       management (registration and subscription) to be automated  along  with
       installation. For example:
              %post --log=/root/ks-post.log
              /usr/sbin/subscription-manager register --username admin --password secret --autosubscribe


^^^^ In this example, I would personally add "--force" as an option to the register call.  Although it should not be needed during a kickstart, supplying it is an extra level of insurance since we really don't want a failure during kickstart.  I welcome a second opinion here whether or not this is a good idea since I am not a kickstart expert.

Comment 14 Deon Ballard 2011-03-08 21:40:02 UTC
Created attachment 483031 [details]
even more updated manpage

I restored the activate stuff (which was stripped for the entitlements beta and I guess I didn't add back) and then the other edits.

Comment 15 Deon Ballard 2011-03-08 21:40:51 UTC
This is also in my repo at https://svn.devel.redhat.com/repos/ecs/dlackey/rhel61-drafts/manpage.

Comment 16 Deon Ballard 2011-03-08 21:42:33 UTC
Created attachment 483032 [details]
even more updated manpage

Comment 17 John Sefler 2011-03-08 23:25:29 UTC
I have verified that all of the comments in this bug have been factored into attachment 483032 [details].

Comment 18 Bryan Kearney 2011-03-09 02:02:11 UTC
Fixed. You will see this in 0.95.5. Git hash: 
bb03d4e8622be513fe5791f9a605114a8513eb0e

Comment 20 J.C. Molet 2011-03-28 18:40:45 UTC
Verified as tested in version:
subscription-manager-0.96.1-1.git.77.e7f7948.el6.x86_64