Description of problem: Trying to set an empty custom property results in an error on the engine: 2013-12-26 09:55:46,700 WARN [org.ovirt.engine.core.bll.network.vm.UpdateVnicProfileCommand] (http-/0.0.0.0:8080-1) [246beb72] CanDoAction of action UpdateVnicProfile failed. Reasons:VAR__TYPE__VNIC_PROFILE,VAR__ACTION__UPDATE,ACTION_TYPE_FAILED_INVALID_CUSTOM_PROPERTIES_INVALID_SYNTAX Version-Release number of selected component (if applicable): How reproducible: Always Steps to Reproduce: 1. Create a custom property allowing an empty value, such as: engine-config -s CustomDeviceProperties="{type=interface;prop={someProp=([a-z0-9A-Z]*)$}}" --cver=3.3 2. Add a network on a 3.3 data center. 3. Add a network profile and on the dialog select your "someProp" property but don't enter any value. 4. Click OK to add the profile. Actual results: You will get an error "Error while executing action: Cannot edit VM network interface profile if custom properties are in invalid format. Please check the input." Expected results: The profile should be saved without error. Additional info: The error comes from a check in org.ovirt.engine.core.utils.customprop.DevicePropertiesUtils.validateProperties(Version, VmDeviceGeneralType, Map<String, String>) This method invokes syntaxErrorInProperties(properties) which is meant for checking the property definition in the configuration, not the actual uasge of the properties and their conformity to the syntax (this check is done later in the validateProperties method). This should probably be fixed also for other usages of custom properties.
Device custom properties syntax is inherited from VM properties syntax, which requires that defined property always has non-empty value. So do we want to allow properties with empty value? If so, should it be allowed for both device and VM properties?
Martin the set of possible values is defined by the regex. If the regex matches an empty string (empty value) we should allow storing empty value.
this is an automated message: moving to Closed CURRENT RELEASE since oVirt 3.4.0 has been released