Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 879276

Summary: CCS/CCP re-edit put '- {}' to the yaml edit block
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: high Docs Contact:
Priority: low    
Version: DevelopmentCC: ltoscano, matt, rrati
Target Milestone: 2.3Keywords: Regression
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: condor-wallaby-tools-5.0.4-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:
Bug Depends On:    
Bug Blocks: 802510    

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