This service will be undergoing maintenance at 00:00 UTC, 2016-09-28. It is expected to last about 1 hours
Bug 176195 - up2date-nox --configure changes current value of numeric attribute to Yes/No if 1/0 is selected
up2date-nox --configure changes current value of numeric attribute to Yes/No ...
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 3
Classification: Red Hat
Component: up2date (Show other bugs)
3.0
All Linux
medium Severity medium
: ---
: ---
Assigned To: Adrian Likins
Beth Nackashi
:
Depends On:
Blocks: 168424 169775
  Show dependency treegraph
 
Reported: 2005-12-19 18:21 EST by Beth Nackashi
Modified: 2007-11-30 17:07 EST (History)
0 users

See Also:
Fixed In Version: RHBA-2006-0105
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2006-03-15 10:38:18 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)
patch to hard code cases for numeric values (1.12 KB, patch)
2006-01-16 16:18 EST, Adrian Likins
no flags Details | Diff

  None (edit)
Description Beth Nackashi 2005-12-19 18:21:18 EST
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.
Comment 1 Adrian Likins 2006-01-16 13:28:14 EST
legit bug, dunno if it's crucial enough to be a blocker though
Comment 2 Adrian Likins 2006-01-16 16:15:49 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. 
Comment 3 Adrian Likins 2006-01-16 16:18:29 EST
Created attachment 123262 [details]
patch to hard code cases for numeric values 

patch to hardcode numberRetries, etc to be intrepreted as ints/strings instead
of as bools
Comment 4 Adrian Likins 2006-01-17 16:42:57 EST
up2date-4.4.49
Comment 5 Beth Nackashi 2006-01-20 16:09:24 EST
14. networkRetries     Yes
Comment 6 Adrian Likins 2006-01-24 09:04:11 EST
doh, typoed the networkRetries option as numberRetries... I'll
rev it when I get a chance.
Comment 7 Bret McMillan 2006-01-27 15:47:37 EST
4.4.65-3 should contain the fix.
Comment 8 Beth Nackashi 2006-01-27 17:58:10 EST
This is only fixed for networkRetries.  Other numeric attributes need to be
fixed as well, such as headerCacheSize and headerFetchCount.
Comment 9 Adrian Likins 2006-01-27 18:46:11 EST
up2date-4.4.67-3

should fix issues for networkRetries, headerCacheSize, and headerFetchCount. If
there are other numeric entries, I don't see them.
Comment 10 Beth Nackashi 2006-01-27 19:07:48 EST
passes_qa on i386, ia64, and x86_64
Comment 11 Red Hat Bugzilla 2006-03-15 10:38:19 EST
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on the solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHBA-2006-0105.html

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