Bug 613595

Summary: not handled exceptions in remote configuration
Product: Red Hat Enterprise MRG Reporter: Lubos Trilety <ltrilety>
Component: wallaby-utilsAssignee: Robert Rati <rrati>
Status: CLOSED ERRATA QA Contact: Lubos Trilety <ltrilety>
Severity: medium Docs Contact:
Priority: low    
Version: DevelopmentCC: matt
Target Milestone: 1.3   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
output none

Description Lubos Trilety 2010-07-12 11:28:07 UTC
Description of problem:
Text editor is used for editing or creating objects for wallaby tools. Problem is when some bad input is given to wallaby tool from this editor, many of these bad inputs are not properly handled.
E.g. make these in editor
1. For parameter object type some parameter which does not exists in conflict field
2. For feature object type some parameter without colon and value in params field
3. For any object remove any line
4. For any object change name to existent object (it edits the other one)
5. For parameter object type bad level value (e.g. characters instead of number, minus number...)
6. For parameter object type bad value of must_change or restart field (not true or false)

Version-Release number of selected component (if applicable):
condor-wallaby-tools-3.0-1

How reproducible:
100%

Steps to Reproduce:
1. run 'condor_configure_store -a -n NEW_PARAM'
2. edit conflict field add some non-existent parameter here 
  
Actual results:
The script fails to run with some not handled exception 

Expected results:
The script prints error and stops

Additional info:
There is examples of condor_configure_store output in attachment

Comment 1 Lubos Trilety 2010-07-12 11:29:03 UTC
Created attachment 431144 [details]
output

Comment 2 Robert Rati 2010-07-13 20:30:41 UTC
Depending on the error, 1 of 2 things will happen:
1) An error will be printed and the user will be allowed to re-do the edits
2) The edits will be ignored

Fixed in:
condor-wallaby-tools-3.1-1

Comment 3 Lubos Trilety 2010-08-12 15:38:51 UTC
Tested with (version):
condor-wallaby-tools-3.3-1

During testing I found another bad input which produce not properly handled error:
For feature object type some parameter with number (or true, false) as value

Comment 4 Lubos Trilety 2010-08-12 15:55:07 UTC
Scenario:
1. create parameter NEW_PARAM in store
2. create feature New_Feature in store
3. try to add NEW_PARAM to the New_Feature with true as value (don't use apostrophes or quotation marks)
i.e.
--- !Feature
name: New_Feature
params:
  NEW_PARAM: true
conflicts: []
depends: []
includes: []

4. see traceback:
Traceback (most recent call last):
  File "/usr/sbin/condor_configure_store", line 556, in ?
    sys.exit(main())
  File "/usr/sbin/condor_configure_store", line 465, in main
    edited.store_validate(config_store)
  File "/usr/lib/python2.4/site-packages/wallabyclient/WallabyTypes.py", line 90, in store_validate
    if self.params[p] != None and self.params[p].strip() == '':
AttributeError: 'bool' object has no attribute 'strip'

Comment 5 Robert Rati 2010-08-16 19:10:49 UTC
Fixed in:
condor-wallaby-tools-3.4-2

Comment 6 Lubos Trilety 2010-10-01 14:09:03 UTC
Tested with (version):
condor-wallaby-tools-3.6-5
condor-wallaby-client-3.6-5
wallaby-utils-0.9.18-2
wallaby-0.9.18-2
condor-wallaby-base-db-1.4-5
ruby-wallaby-0.9.18-2
python-wallabyclient-3.6-5

Tested on:
RHEL5 x86_64,i386  - passed

>>> VERIFIED