Bug 754378 - The command config --remove cannot remove configuration entry
Summary: The command config --remove cannot remove configuration entry
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: subscription-manager
Version: 5.8
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: beta
: ---
Assignee: William Poteat
QA Contact: IDM QE LIST
URL:
Whiteboard:
Depends On: 752854
Blocks: 715031
TreeView+ depends on / blocked
 
Reported: 2011-11-16 10:17 UTC by yu zheng
Modified: 2012-05-29 19:04 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-05-29 19:04:38 UTC
Target Upstream Version:


Attachments (Terms of Use)

Description yu zheng 2011-11-16 10:17:34 UTC
Description of problem:
Subscription-manager config --remove can't remove configuration entry's current value.

Version-Release number of selected component (if applicable):
subscription-manager-gnome-0.98.2-1.el5
subscription-manager-0.98.2-1.el5
subscription-manager-firstboot-0.98.2-1.el5
python-rhsm-0.98.2-1.el5

How reproducible:
always

Steps to Reproduce:
1.Change the value of server.insecure(default value 0).
[root@localhost ~]# subscription-manager config --server.insecure=1
2.Check the config file.
[root@localhost ~]# 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 = 1
^^^^^^^^^^^^modification is successful
......
3.Remove current value of server.insecure.
[root@localhost ~]# subscription-manager config --remove server.insecure
  
Actual results:
Current value isn't removed and an error msg "Section server and name insecure cannot be removed" displays.

Expected results:
The default value of server.insecure should be set.

Comment 1 William Poteat 2011-11-16 18:01:48 UTC
Has been fixed as part of 752854.

Will be in build 0.98.3

Comment 2 Shwetha Kallesh 2011-11-24 07:27:14 UTC
Moving the bug to verified..

RPM used:

[root@tiger ~]# rpm -qa | grep subscription-manager
subscription-manager-gnome-0.98.3-1.git.16.14460bc.el5_7
subscription-manager-firstboot-0.98.3-1.git.16.14460bc.el5_7
subscription-manager-migration-0.98.3-1.git.16.14460bc.el5_7
subscription-manager-0.98.3-1.git.16.14460bc.el5_7


Steps to reproduce:


[root@tiger ~]# cat /etc/rhsm/rhsm.conf
# Red Hat Subscription Manager Configuration File:

# Unified Entitlement Platform Configuration
[server]
# Server hostname:
hostname = 10.65.193.169

# Server prefix:
prefix =/candlepin

# Server port:
port = 8443

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

[root@tiger ~]# subscription-manager config --remove server.insecure
You have removed the value for section server and name insecure.
The default value for insecure will now be used.

[root@tiger ~]# cat /etc/rhsm/rhsm.conf
# Red Hat Subscription Manager Configuration File:

# Unified Entitlement Platform Configuration
[server]
# Server hostname:
hostname = 10.65.193.169

# Server prefix:
prefix =/candlepin

# Server port:
port = 8443

# Set to 1 to disable certificate validation:

# Set the depth of certs which should be checked

Comment 4 Shwetha Kallesh 2011-11-25 06:48:11 UTC
Verified against brew build

RPM used:
[root@tiger ~]# rpm -qa | grep subscription-manager 
subscription-manager-firstboot-0.98.3-1.el5
subscription-manager-0.98.3-1.el5
subscription-manager-gnome-0.98.3-1.el5
subscription-manager-debuginfo-0.98.3-1.el5
subscription-manager-migration-0.98.3-1.el5



[root@tiger ~]# cat /etc/rhsm/rhsm.conf
# Red Hat Subscription Manager Configuration File:

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

# Server prefix:
prefix = /subscription

# Server port:
port = 443

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


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

[root@tiger ~]# subscription-manager config --remove server.insecure
You have removed the value for section server and name insecure.
The default value for insecure will now be used.

[root@tiger ~]# cat /etc/rhsm/rhsm.conf
# Red Hat Subscription Manager Configuration File:

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

# Server prefix:
prefix = /subscription

# Server port:
port = 443

# Set to 1 to disable certificate validation:


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


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