Bug 879276 - CCS/CCP re-edit put '- {}' to the yaml edit block
Summary: CCS/CCP re-edit put '- {}' to the yaml edit block
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Enterprise MRG
Classification: Red Hat
Component: condor-wallaby-tools
Version: Development
Hardware: Unspecified
OS: Unspecified
low
high
Target Milestone: 2.3
: ---
Assignee: Robert Rati
QA Contact: Lubos Trilety
URL:
Whiteboard:
Depends On:
Blocks: 802510
TreeView+ depends on / blocked
 
Reported: 2012-11-22 13:51 UTC by Lubos Trilety
Modified: 2013-03-19 16:41 UTC (History)
3 users (show)

Fixed In Version: condor-wallaby-tools-5.0.4-1
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed:
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Lubos Trilety 2012-11-22 13:51:34 UTC
Description of problem:
When re-edit is invoked the tools add '- {}' line to the object list, which leads to error:
fatal:  undefined method `name' for {}:Hash

Version-Release number of selected component (if applicable):
condor-wallaby-tools-5.0.3-2

How reproducible:
100%

Steps to Reproduce:
1. e.g. run 'condor-configure-store -a -n node'
2. remove line with the name and end editing, by that re-edit is invoked
Error: Corrupted object list.  Press <Enter> to re-edit the objects from scratch
3. end editing without any change

  
Actual results:
The re-edited objects look as follows:
---
- {}

- !ruby/object:Mrg::Grid::SerializedConfigs::Node
  annotation: ""
  membership: []

  name: node

There is '- {}', it should not be there.

The command ends with (even when the '- {}' line is removed):
fatal:  undefined method `name' for {}:Hash


Expected results:
The command ends successfully

Additional info:

Comment 1 Robert Rati 2012-11-26 21:32:16 UTC
Nuking the name field causes an empty object in the entities list.  The entities list is a hash, and lookup of hash[nil] creates a new entry.

Comment 2 Robert Rati 2012-11-27 18:49:19 UTC
Fixed upstream on branch:
BZ879276-reedit-empty-obj

Comment 5 Lubos Trilety 2012-12-18 13:37:31 UTC
tested with:
condor-wallaby-tools-5.0.4-1

tested on:
RHEL6 i386,x86_64
RHEL5 i386,x86_64

re-edit run correctly

>>> verified


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