Bug 879276 - CCS/CCP re-edit put '- {}' to the yaml edit block
CCS/CCP re-edit put '- {}' to the yaml edit block
Product: Red Hat Enterprise MRG
Classification: Red Hat
Component: condor-wallaby-tools (Show other bugs)
Unspecified Unspecified
low Severity high
: 2.3
: ---
Assigned To: Robert Rati
Lubos Trilety
: Regression
Depends On:
Blocks: 802510
  Show dependency treegraph
Reported: 2012-11-22 08:51 EST by Lubos Trilety
Modified: 2013-03-19 12:41 EDT (History)
3 users (show)

See Also:
Fixed In Version: condor-wallaby-tools-5.0.4-1
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed:
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Lubos Trilety 2012-11-22 08:51:34 EST
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):

How reproducible:

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 16:32:16 EST
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 13:49:19 EST
Fixed upstream on branch:
Comment 5 Lubos Trilety 2012-12-18 08:37:31 EST
tested with:

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.