Empty string doesn't set fields when using ini-config:localrc_set

Bug #1687063 reported by Michael Turek
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
devstack
Triaged
Low
Unassigned

Bug Description

This could be intended behavior but I figured I'd still open the bug.

If an empty string is passed as the value of a field, it does not indicate such in the local.conf

For example:

localrc_set /home/stack/devstack/local.conf ML2_L3_PLUGIN ''

cat /home/stack/devstack/local.conf | grep ML2_L3_PLUGIN

The value isn't there. A workaround is to use ' ' as the argument. Let me know if you'd like more info.

Revision history for this message
Dr. Jens Harbott (j-harbott) wrote :

It looks to me as if this is working as designed, please explain your use case in more detail if you think otherwise.

Changed in devstack:
status: New → Invalid
Revision history for this message
Michael Turek (mjturek) wrote :

Hello j-harbott,

So it's obviously been a while since we hit this, but I believe the rationale was that we were trying to override the default value of the ML2_L3_PLUGIN to be empty as we did not want to load any ML2 plugin. It was causing the creation of some neutron resources that we didn't want [0].

So we decided to use localrc_set in our pre-test-hook to wipe out the value. An empty string seemed like an appropriate value to do this, but instead we needed a single space.

Let me know if you need more info. Thanks!

[0] https://etherpad.openstack.org/p/IronicThirdPartyGateDebugging

Revision history for this message
Dr. Jens Harbott (j-harbott) wrote :

The reason for this seems that there is this guard against empty arguments here:

http://git.openstack.org/cgit/openstack-dev/devstack/tree/inc/ini-config#n406

So from looking at that code this is the expected behaviour. Is there some problem with using a space or similar value as parameter? Or do you just think that this behaviour should be better documented?

Revision history for this message
Dr. Jens Harbott (j-harbott) wrote :

Actually I think that we could place a check into localrc_set to generate a warning or maybe an error there.

Changed in devstack:
importance: Undecided → Low
status: Invalid → Triaged
Revision history for this message
Michael Turek (mjturek) wrote :

Sounds good to me! But unless what we did was not valid (empty value for an option), I would like if there was a documented way of providing empty values for options.

Thanks!

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.