Note: This is a public test instance of Red Hat Bugzilla. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback at bugzilla.redhat.com.
Bug 1198055 - subscription-manager --help needs separator spaces
Summary: subscription-manager --help needs separator spaces
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: subscription-manager
Version: 7.0
Hardware: Unspecified
OS: Unspecified
unspecified
low
Target Milestone: rc
: ---
Assignee: candlepin-bugs
QA Contact: John Sefler
URL:
Whiteboard:
Depends On:
Blocks: rhsm-rhel72
TreeView+ depends on / blocked
 
Reported: 2015-03-03 10:10 UTC by Kazuo Moriwaka
Modified: 2015-08-14 02:08 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-08-13 18:36:20 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
env output in linux console (1.78 KB, text/plain)
2015-03-05 02:39 UTC, Kazuo Moriwaka
no flags Details
env output in serial console (370 bytes, text/plain)
2015-03-05 02:40 UTC, Kazuo Moriwaka
no flags Details
reproducer script (970 bytes, text/plain)
2015-03-10 09:41 UTC, Kazuo Moriwaka
no flags Details

Description Kazuo Moriwaka 2015-03-03 10:10:14 UTC
Description of problem:

subscription-manager --help displays modules and descriptions, but there aren't separator spaces between them.

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

subscription-manager-1.10.14-13.el7_0.x86_64


How reproducible:

always

Steps to Reproduce:

# LANG=C subscription-manager --help

Actual Result:
Usage: subscription-manager MODULE-NAME [MODULE-OPTIONS] [--help]

Primary Modules:

  attachAttach a specified subscription to the registered system
  listList subscription and product information for this system
  refreshPull the latest subscription data from the server
  registerRegister this system to the Customer Portal or another subscription management service
  releaseConfigure which operating system release to use
  removeRemove all or specific subscriptions from this system
  statusShow status information for this system's subscriptions and products
  unregisterUnregister this system from the Customer Portal or another subscription management service

Other Modules:

  auto-attachSet if subscriptions are attached on a schedule (default of daily)
  cleanRemove all local system and subscription data without affecting the server
  configList, set, or remove the configuration parameters in use by this system
  environmentsDisplay the environments available for a user
  factsView or update the detected system information
  identityDisplay the identity certificate for this system or request a new one
  importImport certificates which were provided outside of the tool
  orgsDisplay the organizations against which a user can register a system
  pluginsView and configure subscription-manager plugins
  redeemAttempt to redeem a subscription for a preconfigured system
  repo-overrideManage custom content repository settings
  reposList the repositories which this system is entitled to use
  service-levelManage service levels for this system
  subscribeDeprecated, see attach
  unsubscribeDeprecated, see remove
  versionPrint version information

Comment 2 John Sefler 2015-03-04 15:25:08 UTC
I cannot reproduce in my terminal...

[root@10-16-7-197 ~]# cat /etc/redhat-release 
Red Hat Enterprise Linux Server release 7.0 (Maipo)
[root@10-16-7-197 ~]# 
[root@10-16-7-197 ~]# subscription-manager version
server type: This system is currently not registered.
subscription management server: 0.9.26.8-1
subscription-manager: 1.10.14-13.el7_0
python-rhsm: 1.10.12-2.el7
[root@10-16-7-197 ~]# 
[root@10-16-7-197 ~]# LANG=C subscription-manager --help
Usage: subscription-manager MODULE-NAME [MODULE-OPTIONS] [--help]

Primary Modules: 

  attach         Attach a specified subscription to the registered system
  list           List subscription and product information for this system
  refresh        Pull the latest subscription data from the server
  register       Register this system to the Customer Portal or another
                 subscription management service
  release        Configure which operating system release to use
  remove         Remove all or specific subscriptions from this system
  status         Show status information for this system's subscriptions and
                 products
  unregister     Unregister this system from the Customer Portal or another
                 subscription management service

Other Modules:   

  auto-attach    Set if subscriptions are attached on a schedule (default of
                 daily)
  clean          Remove all local system and subscription data without affecting
                 the server
  config         List, set, or remove the configuration parameters in use by
                 this system
  environments   Display the environments available for a user
  facts          View or update the detected system information
  identity       Display the identity certificate for this system or request a
                 new one
  import         Import certificates which were provided outside of the tool
  orgs           Display the organizations against which a user can register a
                 system
  plugins        View and configure subscription-manager plugins
  redeem         Attempt to redeem a subscription for a preconfigured system
  repo-override  Manage custom content repository settings
  repos          List the repositories which this system is entitled to use
  service-level  Manage service levels for this system
  subscribe      Deprecated, see attach
  unsubscribe    Deprecated, see remove
  version        Print version information



Although I cannot reproduce, I don't know why you are setting LANG=C.  Try another language like Italian...
[root@10-16-7-197 ~]# LANG=it_IT.utf8 subscription-manager --help
Utilizzo: subscription-manager NOME-MODULO [OPZIONI-MODULO] [--help]

Moduli primari: 

  attach        Assegnare una sottoscrizioni specifica al sistema registrato
  list          Elencare le informazioni sul prodotto e sulla sottoscrizione per
                questo sistema
  refresh       Ottieni gli ultimissimi dati per la sottoscrizione dal server
  register      Registrare questo sistema con il Portale clienti o con un altro
                servizio di gestione delle sottoscrizioni
  release       Configurare quale release del sistema operativo da usare
  remove        Rimuovere sottoscrizioni specifiche o tutte le sottoscrizioni da
                questo sistema
  status        Mostra le informazioni sullo stato per i prodotti e le
                sottoscrizioni per questo sistema
  unregister    Rimuovere la registrazione di questo sistema dal Portale clienti
                o da un altro servizio di gestione delle sottoscrizioni

Altri moduli:   

  auto-attach   Impostato se le sottoscrizioni sono assegnate ad una
                programmazione (default giornaliero)
  clean         Rimuovere tutti i dati della sottoscrizione ed il sistema locale
                senza interessare il server
  config        Elencare, impostare o rimuovere i parametri di configurazione
                usati da questo sistema
  environments  Mostra gli ambienti disponibili per un utente
  facts         Visualizza o aggiorna le informazioni rilevate del sistema
  identity      Mostrare il certificato di identità per questo sistema o
                richiederne uno nuovo
  import        Importa i certificati forniti esternamente dal pool
  orgs          Mostrare le organizzazioni con le quali un utente può eseguire
                la registrazione del sistema
  plugins       Visualizza e configura i plugin del subscription-manager
  redeem        Tentativo di redimere una sottoscrizione per un sistema
                pre-configurato.
  repo-override Gestisci impostazioni repositorio del contenuto personalizzato
  repos         Elencare i repositori utilizzabili da questo sistema
  service-level Gestisci i livelli di servizio per questo sistema
  subscribe     Deprecato, consultare attach
  unsubscribe   Deprecato, consultare remove
  version       Stampa le informazioni sulla versione

Comment 3 Kazuo Moriwaka 2015-03-05 02:39:43 UTC
Created attachment 998136 [details]
env output in linux console

Comment 4 Kazuo Moriwaka 2015-03-05 02:40:24 UTC
Created attachment 998137 [details]
env output in serial console

Comment 5 Kazuo Moriwaka 2015-03-05 02:42:38 UTC
I checked LANG=it_IT.utf8, same problem caused, too.

My environment versions:
[root@localhost ~]# subscription-manager version
server type: Red Hat Subscription Management
subscription management server: 0.9.26.8-1
subscription-manager: 1.10.14-13.el7_0
python-rhsm: 1.10.12-2.el7


I checked my environment, I found this problem is happen on virsh serial console environment but not happen on linux console.

Reproducer: 

1. clean install rhel7 VM in kvm
2. enable serial console with adding "console=ttyS0 console=tty0" to kernel command line of /etc/sysconfig/grub
3. connect serial console with "virsh console rhel7"
4. "subscription-manager --help" cause missing spaces.
5. in virt-manager graphical console, subscription-manager --help works well as you show in comment #2


To avoid any serial console's problem(for example sometimes it is drop 
spaces, etc.), I also checked subscription-manager --help output with hexdump.
I can see "attach" and its description are concatenated without spaces 
in 00000050 line. 

[root@localhost ~]# subscription-manager --help|hexdump -C
00000000  55 73 61 67 65 3a 20 73  75 62 73 63 72 69 70 74  |Usage: subscript|
00000010  69 6f 6e 2d 6d 61 6e 61  67 65 72a 20 4d 4f 44 55  |ion-manager MODU|
00000020  4c 45 2d 4e 41 4d 45 20  5b 4d 4f 44 55 4c 45 2d  |LE-NAME [MODULE-|
00000030  4f 50 54 49 4f 4e 53 5d  20 5b 2d 2d 68 65 6c 70  |OPTIONS] [--help|
00000040  5d 0a 0d 0a 50 72 69 6d  61 72 79 20 4d 6f 64 75  |]...Primary Modu|
00000050  6c 65 73 3a 0a 0a 20 20  61 74 74 61 63 68 41 74  |les:..  attachAt| <==
00000060  74 61 63 68 20 61 20 73  70 65 63 69 66 69 65 64  |tach a specified|
00000070  20 73 75 62 73 63 72 69  70 74 69 6f 6e 20 74 6f  | subscription to|
00000080  20 74 68 65 20 72 65 67  69 73 74 65 72 65 64 20  | the registered |
00000090  73 79 73 74 65 6d 0a 20  20 6c 69 73 74 4c 69 73  |system.  listLis|
000000a0  74 20 73 75 62 73 63 72  69 70 74 69 6f 6e 20 61  |t subscription a|
000000b0  6e 64 20 70 72 6f 64 75  63 74 20 69 6e 66 6f 72  |nd product infor|
000000c0  6d 61 74 69 6f 6e 20 66  6f 72 20 74 68 69 73 20  |mation for this |
000000d0  73 79 73 74 65 6d 0a 20  20 72 65 66 72 65 73 68  |system.  refresh|
000000e0  50 75 6c 6c 20 74 68 65  20 6c 61 74 65 73 74 20  |Pull the latest |
(cut followings)

"env" command outputs in both terminal are attached to this case.

Comment 6 Kazuo Moriwaka 2015-03-10 09:40:46 UTC
In virsh console environment, subscription_manager.utils.get_terminal_width() returns 0.  This seems to be cause of this problem.

With virsh console:

[root@localhost ~]# tty
/dev/ttyS0
[root@localhost ~]# python gettermtest.py 
0


With ssh login:
[root@localhost ~]# tty
/dev/pts/0
[root@localhost ~]# python gettermtest.py 
80


I'm not familiar with tty ioctls, but this result shows ttyS0 doesn't work well with the ioctls.  
I suggest to set default terminal width 80 when ioctl doesn't work well.

Comment 7 Kazuo Moriwaka 2015-03-10 09:41:48 UTC
Created attachment 999793 [details]
reproducer script

Comment 8 William Poteat 2015-08-13 18:36:20 UTC
The issue is within virsh serial console environment. We do not know what setting would affect this. It is out of scope for subscription-manager and the code we maintain has no ability to modify what you are seeing here.

Comment 9 Kazuo Moriwaka 2015-08-14 02:08:05 UTC
I think this problem is not limited to virsh serial console.  It is happen by tty ioctl returns 0 width.
I don't have hardwares and tests, but it will affect all serial console environments.


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