Bug 884768

Summary: CCS edits existing objects even using add option
Product: Red Hat Enterprise MRG Reporter: Lubos Trilety <ltrilety>
Component: condor-wallaby-toolsAssignee: Robert Rati <rrati>
Status: CLOSED CURRENTRELEASE QA Contact: Lubos Trilety <ltrilety>
Severity: medium Docs Contact:
Priority: medium    
Version: 2.2CC: ltoscano, matt, rrati
Target Milestone: 2.3Keywords: Regression
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: condor-wallaby-tools-5.0.5-1 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 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:

Description Lubos Trilety 2012-12-06 17:05:44 UTC
Description of problem:
condor_configure_store now changes objects even when '-a' option is used.

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

How reproducible:
100%

Steps to Reproduce:
1. e.g. prepare following parameter in store:
# ccs -a -p PAR
Console Connection Established...
Adding the following parameter: PAR with {}
Modifying the following parameter: PAR with {:kind=>"first", :description=>"first_desc", :default_val=>"first_value", :needsRestart=>false, :level=>0, :must_change=>false}
Modifying the following parameter: PAR with {:annotation=>"test"}

# ccs -l -p PAR
Console Connection Established...
PAR
  kind:  "first"
  default:  "first_value"
  description:  "first_desc"
  must_change:  false
  requires_restart:  false
  visibility_level:  0
  depends:  []
  conflicts:  []
  annotation:  "test"

2. try to add a parameter with the same name to the store, (in editing instead of first use second)
# ccs -a -p PAR
Console Connection Established...
Adding the following parameter: PAR with {}
Couldn't create parameter PAR (Parameter name PAR is already taken)
warning: AddParam returned non-zero
Modifying the following parameter: PAR with {:kind=>"second", :description=>"second_desc", :default_val=>"second_value", :needsRestart=>false, :level=>0, :must_change=>false}
Modifying the following parameter: PAR with {:annotation=>"test"}

3. list the parameter
# ccs -l -p PAR
Console Connection Established...
PAR
  kind:  "second"
  default:  "second_value"
  description:  "second_desc"
  must_change:  false
  requires_restart:  false
  visibility_level:  0
  depends:  []
  conflicts:  []
  annotation:  "test"
  
Actual results:
object (in scenario parameter PAR) was changed

Expected results:
no change, no call of ModifyParam

Additional info:

Comment 2 Robert Rati 2012-12-12 19:00:42 UTC
ccs-add will check the existance of a param before editing.

Fixed upstream on:
BZ884768-check-before-add

Comment 4 Lubos Trilety 2013-01-10 14:48:19 UTC
Tested with:
condor-wallaby-tools-5.0.5-1

Tested on:
RHEL6 i386,x86_64
RHEL5 i386,x86_64

# ccs -a -p PAR
Console Connection Established...
Adding the following parameter: PAR with {}
Modifying the following parameter: PAR with {:kind=>"first", :description=>"first_desc", :default_val=>"first_val", :needsRestart=>false, :level=>0, :must_change=>false}
Modifying the following parameter: PAR with {:annotation=>"test"}

# ccs -a -p PAR
Console Connection Established...
fatal:  Parameter(s) PAR already exist

>>> verified