Bug 1070737

Summary: Unable to create zip file of system information: No option 'ca_cert_dir' in section: 'server'
Product: Red Hat Enterprise Linux 7 Reporter: John Sefler <jsefler>
Component: subscription-managerAssignee: Carter Kozak <ckozak>
Status: CLOSED CURRENTRELEASE QA Contact: John Sefler <jsefler>
Severity: high Docs Contact:
Priority: unspecified    
Version: 7.0CC: bkearney, ckozak, jgalipea
Target Milestone: rcKeywords: Regression
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-06-13 12:03:07 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 863175, 1055664, 1070921    

Description John Sefler 2014-02-27 13:28:49 UTC
Description of problem:
rhsm-debug system throws a traceback

Version-Release number of selected component (if applicable):
[root@ibm-z10-74 ~]# subscription-manager version
server type: Red Hat Subscription Management
subscription management server: Unknown
subscription-manager: 1.10.14-3.el7
python-rhsm: 1.10.12-1.el7


How reproducible:


Steps to Reproduce:
[root@ibm-z10-74 ~]# subscription-manager register --username=rhel7beta --serverurl=subscription.rhn.stage.redhat.com:443/subscription
Password: 
The system has been registered with ID: 8130985c-68cf-47b5-8439-5a0d1e07d72b 

[root@ibm-z10-74 ~]# rhsm-debug system
No option 'ca_cert_dir' in section: 'server'

[root@ibm-z10-74 ~]# tail -f /var/log/rhsm/rhsm.log
2014-02-27 08:20:37,035 [ERROR] rhsm-debug @managercli.py:156 - Unable to create zip file of system information: No option 'ca_cert_dir' in section: 'server'
2014-02-27 08:20:37,035 [ERROR] rhsm-debug @managercli.py:157 - No option 'ca_cert_dir' in section: 'server'
Traceback (most recent call last):
  File "/usr/share/rhsm/rhsm_debug/debug_commands.py", line 135, in _do_command
    if defaults['ca_cert_dir'] != cfg.get('server', 'ca_cert_dir') or not sos:
  File "/usr/lib64/python2.7/site-packages/rhsm/config.py", line 126, in get
    raise er
NoOptionError: No option 'ca_cert_dir' in section: 'server'


Actual results:
above

Expected results:


Additional info:

Comment 2 John Sefler 2014-02-27 16:05:56 UTC
Additional Info...
ca_cert_dir is a configuration of section rhsm, not section server...


[root@ibm-z10-74 ~]# cat /etc/rhsm/rhsm.conf 
# Red Hat Subscription Manager Configuration File:

# Unified Entitlement Platform Configuration
[server]
# Server hostname:
hostname=subscription.rhn.stage.redhat.com

# Server prefix:
prefix=/subscription

# Server port:
port=443

# Set to 1 to disable certificate validation:
insecure = 0

# Set the depth of certs which should be checked
# when validating a certificate
ssl_verify_depth = 3

# an http proxy server to use
proxy_hostname =

# port for http proxy server
proxy_port =

# user name for authenticating to an http proxy, if needed
proxy_user =

# password for basic http proxy auth, if needed
proxy_password =

[rhsm]
# Content base URL:
baseurl=https://cdn.rcm-qa.redhat.com

# Server CA certificate location:
ca_cert_dir=/etc/rhsm/ca/

# Default CA cert to use when generating yum repo configs:
repo_ca_cert = %(ca_cert_dir)sredhat-uep.pem

# Where the certificates should be stored
productCertDir=/etc/pki/product
entitlementCertDir=/etc/pki/entitlement
consumerCertDir=/etc/pki/consumer

# Manage generation of yum repositories for subscribed content:
manage_repos = 1

# Refresh repo files with server overrides on every yum command
full_refresh_on_yum = 0

# If set to zero, the client will not report the package profile to
# the subscription management service.
report_package_profile = 1

# The directory to search for subscription manager plugins
pluginDir=/usr/share/rhsm-plugins

# The directory to search for plugin configuration files
pluginConfDir=/etc/rhsm/pluginconf.d

[rhsmcertd]
# Interval to run cert check (in minutes):
certCheckInterval = 240
# Interval to run auto-attach (in minutes):
autoAttachInterval = 1440

Comment 3 Carter Kozak 2014-02-28 15:26:23 UTC
commit 1755322585fbdf536da133fbe55ab88a0ec1b2fc
Author: ckozak <ckozak>
Date:   Thu Feb 27 10:34:32 2014 -0500

    1070737: correct config section for ca_cert_dir

Comment 6 John Sefler 2014-03-04 22:48:58 UTC
Verifying Version....
[root@jsefler-7 ~]# subscription-manager version
server type: This system is currently not registered.
subscription management server: 0.9.4-1
subscription-manager: 1.10.14-4.el7
python-rhsm: 1.10.12-1.el7

[root@jsefler-7 ~]# subscription-manager register --username=rhel7beta --serverurl=subscription.rhn.stage.redhat.com:443/subscription
Password: 
The system has been registered with ID: f08bfc31-9924-44d6-a6ad-e27f0cdd3f59 

[root@jsefler-7 ~]# rhsm-debug system
Wrote: /tmp/rhsm-debug-system-20140304-619200.tar.gz


VERIFIED: rhsm-debug system is working again.

Comment 7 Ludek Smid 2014-06-13 12:03:07 UTC
This request was resolved in Red Hat Enterprise Linux 7.0.

Contact your manager or support representative in case you have further questions about the request.