This forum has been archived. Please start a new discussion on GitHub.

Slashes in property values kills icegridadmin

I have a handful of objects with slashes in their names. These used to be well known objects registerred with the icegridregistry, but I've been moving them into their respective spots within the object adapters within icegridadmin.

Long story short: IceGridAdmin doesn't allow you to use slashes within property values under a server. If you enter the values manually, it just silently removes them when you click Apply. HOwever, if you edit the XML directly and attempt to save it to the registry, the registry just crashes and IceGridAdmin gives connection refused errors.

I first though this might be due to '/' having significance within XML, but it's no problem to use object names with '/' in them in the same XML descriptor file. I don't know if it's intentional to not allow '/' within property values, but it took a bit of analyzing to figure out why I couldn't get things updating properly.



  • bernard
    bernard Jupiter, FL
    Hi Caleb,

    Property values can include any character, including spaces, /, and even non-ASCII characters. I've just fired up the 3.2.0 simple IceGrid demo, and I had no problem creating a property value with a '/'.

    Within an adapter descriptor, you can describe well-known objects (and allocatable objects); one field is "Property", and corresponds to the name of a property generated by IceGrid with the well-known/allocatable object identity as value. Here again, no problem with '/'.

    The Identity column of a well-known/allocatable object is a stringified identity:

    and '/' represents the separator between the category and name part of the identity.

    In my experiment with the IceGrid Admin GUI, one unescaped '/' in Identity works well, but not two ... I get instead a stack on the console, so it's definitely a bug (the GUI should catch and report Ice.IdentityParseException).

    Can you confirm that's the bug you're seeing? Could you post the XML you used to crash the IceGrid registry?

  • benoit
    benoit Rennes, France

    Could you post an XML descriptor where the problem shows up?


  • I'm playing with it now, and the behavior is strange.

    I'm using IceGridAdmin 3.2.0, for the record.

    It's inconsistent. Sometimes I can get the name/value pair to stay, and sometimes I cannot.

    If under the Properties for a server I enter the following items:

    Name: Saftronics.Device1.AdapterName
    Value: MotorControl/ProcessWater_30HPPump

    And immediately click "Apply" without hitting enter after entering the value, the property/name value stays.

    However, if after I enter the value I hit enter, then go down and click Apply, the property name/value disappears.

    You may have to try it a few times in order to see it disappear. Try a few different spots entering the data.

    When I found this out, I had entered about 20 or so of these properties by hand, and when I went back and clicked apply, all of the ones with "/" in the value disappeared. All of the other ones stayed.

    As for the data I tried to import, what I did was connect to the registry and save it to a file. Then I added these lines (attached at the bottom) to the server properties I was interested in. I opened that file, and tried to save it to the registry.
    	       <property name="Saftronics.Device1.AdapterName" value="MotorControl/ProcessWater_30HPPump"/>
           	       <property name="Saftronics.Device1.PortName" value="RS485_1"/>
    	       <property name="Saftronics.Device1.Address" value="9"/>
    	       <property name="Saftronics.Device1.Direction" value="Reverse"/>
           	       <property name="Saftronics.Device2.AdapterName" value="MotorControl/ProcessWater_50HPPump"/>
           	       <property name="Saftronics.Device2.PortName" value="RS485_1"/>
    	       <property name="Saftronics.Device2.Address" value="10"/>
    	       <property name="Saftronics.Device3.AdapterName" value="MotorControl/CoolingTower_SouthWaterPump"/>
           	       <property name="Saftronics.Device3.PortName" value="RS485_1"/>
    	       <property name="Saftronics.Device3.Address" value="5"/>
    	       <property name="Saftronics.Device4.AdapterName" value="MotorControl/CoolingTower_NorthWaterPump"/>
           	       <property name="Saftronics.Device4.PortName" value="RS485_1"/>
    	       <property name="Saftronics.Device4.Address" value="6"/>
    	       <property name="Saftronics.Device5.AdapterName" value="MotorControl/CoolingTower_SouthFan"/>
           	       <property name="Saftronics.Device5.PortName" value="RS485_1"/>
    	       <property name="Saftronics.Device5.Address" value="7"/>	       
    	       <property name="Saftronics.Device5.Direction" value="Reverse"/>	       
           	       <property name="Saftronics.Device6.AdapterName" value="MotorControl/CoolingTower_NorthFan"/>
           	       <property name="Saftronics.Device6.PortName" value="RS485_1"/>
    	       <property name="Saftronics.Device6.Address" value="8"/>	     
                   <property name="Saftronics.Device7.AdapterName" value="MotorControl/FuelPump_Red"/>
           	       <property name="Saftronics.Device7.PortName" value="RS485_1"/>
    	       <property name="Saftronics.Device7.Address" value="20"/>	
                   <property name="Saftronics.Device8.AdapterName" value="MotorControl/FuelPump_Yellow"/>
           	       <property name="Saftronics.Device8.PortName" value="RS485_1"/>
    	       <property name="Saftronics.Device8.Address" value="151"/>	 
                   <property name="Saftronics.Device9.AdapterName" value="MotorControl/FuelPump_Green"/>
           	       <property name="Saftronics.Device9.PortName" value="RS485_1"/>
    	       <property name="Saftronics.Device9.Address" value="152"/>	 
                   <property name="Saftronics.Device10.AdapterName" value="MotorControl/FuelPump_Blue"/>
           	       <property name="Saftronics.Device10.PortName" value="RS485_1"/>
    	       <property name="Saftronics.Device10.Address" value="153"/>
    	       <property name="Saftronics.Device11.AdapterName" value="MotorControl/CombustionAir_Fan"/>
           	       <property name="Saftronics.Device11.PortName" value="RS485_1"/>
    	       <property name="Saftronics.Device11.Address" value="60"/>	 
    	       <property name="Saftronics.Device11.Direction" value="Reverse"/>
    	       <property name="Saftronics.Device12.AdapterName" value="MotorControl/Cell_1_IntakeAir"/>
           	       <property name="Saftronics.Device12.PortName" value="RS485_1"/>
    	       <property name="Saftronics.Device12.Address" value="12"/>	
    	       <property name="Saftronics.Device13.AdapterName" value="MotorControl/Cell_1_ExhaustAir"/>
           	       <property name="Saftronics.Device13.PortName" value="RS485_1"/>
    	       <property name="Saftronics.Device13.Address" value="13"/>
    	       <property name="Saftronics.Device14.AdapterName" value="MotorControl/Cell_2_IntakeAir"/>
           	       <property name="Saftronics.Device14.PortName" value="RS485_1"/>
    	       <property name="Saftronics.Device14.Address" value="22"/>	
    	       <property name="Saftronics.Device15.AdapterName" value="MotorControl/Cell_2_ExhaustAir"/>
           	       <property name="Saftronics.Device15.PortName" value="RS485_1"/>
    	       <property name="Saftronics.Device15.Address" value="23"/>
    	       <property name="Saftronics.Device16.AdapterName" value="MotorControl/Cell_3_IntakeAir"/>
           	       <property name="Saftronics.Device16.PortName" value="RS485_1"/>
    	       <property name="Saftronics.Device16.Address" value="32"/>	
    	       <property name="Saftronics.Device17.AdapterName" value="MotorControl/Cell_3_ExhaustAir"/>
           	       <property name="Saftronics.Device17.PortName" value="RS485_1"/>
    	       <property name="Saftronics.Device17.Address" value="33"/>
    	       <property name="Saftronics.Device18.AdapterName" value="MotorControl/Cell_4_IntakeAir"/>
           	       <property name="Saftronics.Device18.PortName" value="RS485_1"/>
    	       <property name="Saftronics.Device18.Address" value="42"/>	
    	       <property name="Saftronics.Device19.AdapterName" value="MotorControl/Cell_4_ExhaustAir"/>
           	       <property name="Saftronics.Device19.PortName" value="RS485_1"/>
    	       <property name="Saftronics.Device19.Address" value="43"/>
    	       <property name="Saftronics.Device20.AdapterName" value="MotorControl/Cell_5_IntakeAir"/>
           	       <property name="Saftronics.Device20.PortName" value="RS485_1"/>
    	       <property name="Saftronics.Device20.Address" value="52"/>	
    	       <property name="Saftronics.Device21.AdapterName" value="MotorControl/Cell_5_ExhaustAir"/>
           	       <property name="Saftronics.Device21.PortName" value="RS485_1"/>
    	       <property name="Saftronics.Device21.Address" value="53"/>	       
    	       <property name="Saftronics.Device22.AdapterName" value="MotorControl/Cell_6_IntakeAir"/>
           	       <property name="Saftronics.Device22.PortName" value="RS485_1"/>
    	       <property name="Saftronics.Device22.Address" value="62"/>
    	       <property name="Saftronics.Device23.AdapterName" value="MotorControl/Cell_6_ExhaustAir"/>
           	       <property name="Saftronics.Device23.PortName" value="RS485_1"/>
    	       <property name="Saftronics.Device23.Address" value="63"/>
    	       <property name="Saftronics.Device24.AdapterName" value="MotorControl/Cell_7_IntakeAir"/>
           	       <property name="Saftronics.Device24.PortName" value="RS485_1"/>
    	       <property name="Saftronics.Device24.Address" value="72"/>	
    	       <property name="Saftronics.Device25.AdapterName" value="MotorControl/Cell_7_ExhaustAir"/>
           	       <property name="Saftronics.Device25.PortName" value="RS485_1"/>
    	       <property name="Saftronics.Device25.Address" value="73"/>
    	       <property name="Saftronics.Device26.AdapterName" value="MotorControl/Cell_8_IntakeAir"/>
           	       <property name="Saftronics.Device26.PortName" value="RS485_1"/>
    	       <property name="Saftronics.Device26.Address" value="82"/>	
    	       <property name="Saftronics.Device27.AdapterName" value="MotorControl/Cell_8_ExhaustAir"/>
           	       <property name="Saftronics.Device27.PortName" value="RS485_1"/>
    	       <property name="Saftronics.Device27.Address" value="83"/>
    	       <property name="Saftronics.Device28.AdapterName" value="MotorControl/Cell_9_IntakeAir"/>
           	       <property name="Saftronics.Device28.PortName" value="RS485_1"/>
    	       <property name="Saftronics.Device28.Address" value="92"/>
    	       <property name="Saftronics.Device29.AdapterName" value="MotorControl/Cell_9_ExhaustAir"/>
           	       <property name="Saftronics.Device29.PortName" value="RS485_1"/>
    	       <property name="Saftronics.Device29.Address" value="93"/>
    	       <property name="Saftronics.Device30.AdapterName" value="MotorControl/Cell_10_IntakeAir"/>
           	       <property name="Saftronics.Device30.PortName" value="RS485_1"/>
    	       <property name="Saftronics.Device30.Address" value="102"/>	
    	       <property name="Saftronics.Device31.AdapterName" value="MotorControl/Cell_10_ExhaustAir"/>
           	       <property name="Saftronics.Device31.PortName" value="RS485_1"/>
    	       <property name="Saftronics.Device31.Address" value="103"/>		       
  • It looks like there might be another force at play here. What looks to be happening is either IceGridAdmin is moving or complaining about conflicting properties set at the server level and properties set with well-known object identities.

    All of the properties I'm setting with slashes are defined well known objects. None of these well known objects had a "Property" value set. I wanted to custom defined them within the Property/Name fields of the server, because my application reads that information from the config file in a certain way.

    But now I'm seeing that some of the well-known objects have properties set, matching what I typed before.

    So, does icegridadmin take a property/value pair and if the value matches up with a well known object identity, then move that over into the well-known object table and set the property there?
  • bernard
    bernard Jupiter, FL
    Hi Caleb,

    I can't reproduce the property-entering issue on Windows (even after trying various combinations!). The underlying code is also quite simple, and does not treat '/' (or any other character) in a special way.

    The only rows that are silently discarded when you press 'apply' are rows with an empty property name (or only whitespace for the property name).

  • Yep, that's what's happening. The minute I enter a property value at the server level that corresponds to a well known object identity, icegridadmin moves that over to the corresponding spot on the well-known object table.

    Very interesting. :)

    Though, if I re-enter the same property/value it allows it to stay. I'm not sure what happens if you have conflicting information in the property/value table and in the well-known object table. Don't want to try on my active icegrid.

    I'm still not sure why the registry crashed on my data import, though it might be related to trying to import properties with values whose names correspond to well-known identities. The slash thing is probably just a coincidence.

    Unfortunately, I can't risk another crash right now to test it as our registry isn't yet replicated. But I will post my findings if I can recreate the crash when our systems are not running.
  • bernard
    bernard Jupiter, FL
    ctennis wrote: »
    So, does icegridadmin take a property/value pair and if the value matches up with a well known object identity, then move that over into the well-known object table and set the property there?

    Yes, that's what's happening, and it's actually just a matter of presentation: IceGrid Admin shows these properties in the "well-known object table" and hides them in the regular properties display.
    In the underlying data, it's just a list of properties associated with the server.

    Maybe it would be clearer not to hide the properties that appear on other forms (well-known object identity, object adapter endpoints etc.)?

  • bernard wrote: »
    Maybe it would be clearer not to hide the properties that appear on other forms (well-known object identity, object adapter endpoints etc.)?

    I actually like how it's being done now, but it was a shock to see the properties I entered disappear like they did without knowing ahead of time they just silently moved to another spot that better suited them.

    I don't know anyway to circumvent that though. I dunno if a popup asking if you would like for icegridadmin to move them for you would suffice or not?

    The only problem I have with the property moving on me is that if I have a group of properties for a particular object, eg:

    Saftronics.Device1.Name MotorControl/BlahFoo
    Saftronics.Device1.Address 9
    Saftronics.Device1.OtherProperty SomeMagicalValue

    Then when I look at the property list for the server, all of the object identity information has been moved to the well known object table. This makes it tricky when looking at the normal property table to known which object Device1 matches to when looking at the other properties.

    But I admit, this is probably a special case in how we use Ice Properties and is not a major hassle to workaround at all.