Bug 178489 - up2date-nox --configure changes current value of numeric attribute to Yes/No if 1/0 is selected
Summary: up2date-nox --configure changes current value of numeric attribute to Yes/No ...
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Red Hat Enterprise Linux 4
Classification: Red Hat
Component: up2date
Version: 4.0
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
: ---
Assignee: Clifford Perry
QA Contact: Red Hat Satellite QA List
URL:
Whiteboard:
Depends On:
Blocks: 179647
TreeView+ depends on / blocked
 
Reported: 2006-01-20 22:37 UTC by Beth Nackashi
Modified: 2012-06-20 13:23 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-06-20 13:23:47 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Beth Nackashi 2006-01-20 22:37:24 UTC
+++ This bug was initially created as a clone of Bug #176195 +++

Description of problem:
If a numeric attribute such as headerFetchCount, networkRetries, or
headerCacheSize is changed to 1 (or 0), the resulting current value becomes
"Yes" (or "No").  Once this happens, you can only change the current value
between "No" and "Yes".


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

How reproducible:
always.

Steps to Reproduce:
1.  Run up2date-nox --configure
2.  Choose a numeric attribute such as networkRetries
3.  Change it to 1
4.  <enter> to save and exit
5.  Run up2date-nox --configure again to look at the current value.
  
Actual results:
networkRetries     Yes

Expected results:
networkRetries     1

Additional info:
Once the numeric attribute becomes snagged in the eddy of Yes/No, you can't
change it back to a number.

Here's an example.  Note the networkRetries attribute (#24).  I've snipped out
everything else.

[root@rlx-3-04 tmp]# up2date-nox --configure

24. networkRetries     5

Enter number of item to edit <return to exit, q to quit without saving>: 24
Attribute Name: networkRetries
Comment: Number of attempts to make at network connections before giving up
Current value: 5
    <return for default, enter two spaces and return to clear>
New Value: 1

24. networkRetries     1

Enter number of item to edit <return to exit, q to quit without saving>: <enter,
save>

Run it again:
[root@rlx-3-04 tmp]# up2date-nox --configure

24. networkRetries     Yes   <-- now it says "Yes" instead of 1

Enter number of item to edit <return to exit, q to quit without saving>: 24
Attribute Name: networkRetries
Comment: Number of attempts to make at network connections before giving up
Current value: Yes
New Value: 14
New Value: 1  <-- can't change it back to 1
New Value: 3  <-- can't change it to any number
New Value: No <-- can only change it to "No"

24. networkRetries     No

Enter number of item to edit <return to exit, q to quit without saving>: q



Workaround:  Edit /etc/sysconfig/rhn/up2date manually.

-- Additional comment from alikins on 2006-01-16 13:28 EST --
legit bug, dunno if it's crucial enough to be a blocker though

-- Additional comment from alikins on 2006-01-16 16:15 EST --
looks to be a bug around lines 216in text_config.py

It assumes that things that are 0/1 in the file are booleans, and treats
them as such. Not sure how to fix it without breaking actually boolean stuff.

We could add "types" to the config file/object, but thats not a small change. 
Easiest fix might just to be to hardcode the types that we know are numeric
values to ignore those cases. 

A slightly klugey fix is to just hardcode the numeric non boolean stuff. 

-- Additional comment from alikins on 2006-01-16 16:18 EST --
Created an attachment (id=123262)
patch to hard code cases for numeric values 

patch to hardcode numberRetries, etc to be intrepreted as ints/strings instead
of as bools

-- Additional comment from alikins on 2006-01-17 16:42 EST --
up2date-4.4.49

-- Additional comment from bnackash on 2006-01-20 16:09 EST --
14. networkRetries     Yes

Comment 1 Red Hat Bugzilla 2007-04-12 00:25:59 UTC
User bnackash's account has been closed

Comment 2 Jiri Pallich 2012-06-20 13:23:47 UTC
Thank you for submitting this issue for consideration in Red Hat Enterprise Linux. The release for which you requested us to review is now End of Life. 
Please See https://access.redhat.com/support/policy/updates/errata/

If you would like Red Hat to re-consider your feature request for an active release, please re-open the request via appropriate support channels and provide additional supporting details about the importance of this issue.


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