Public bug reported: In DataSourceOpenNebula, get_mask() and get_network() check keys of CONTEXT Attributes, but doesn't check its values. If CONTEXT Attribute key ETH0_MASK and/or ETH0_NETWORK have no value, their methods should return default values, however actually return empty string('').
The problem occures when OpenNebula creats instances with Virtual Network resources which CONTEXT Attribute of NETWORK_ADDRESS and/or NETWORK_MASK is not defined. It seems that get_ip() also has the same bug. I attached a patch for this problem. ** Affects: cloud-init Importance: Undecided Status: New ** Patch added: "fix_return_empty_string.patch" https://bugs.launchpad.net/bugs/1736750/+attachment/5019348/+files/fix_return_empty_string.patch ** Description changed: In DataSourceOpenNebula, get_mask() and get_network() check keys of CONTEXT Attributes, but doesn't check its values. If CONTEXT Attribute key ETH0_MASK and/or ETH0_NETWORK have no value, their methods should return default values, however actually return empty string(''). - The problem occures when creating instances with Virtual Network - resources which CONTEXT Attribute of NETWORK_ADDRESS and/or NETWORK_MASK - is not defined. + The problem occures when OpenNebula creats instances with Virtual + Network resources which CONTEXT Attribute of NETWORK_ADDRESS and/or + NETWORK_MASK is not defined. It seems that get_ip() also has the same bug. I attached a patch for this problem. -- You received this bug notification because you are a member of Yahoo! Engineering Team, which is subscribed to cloud-init. https://bugs.launchpad.net/bugs/1736750 Title: DataSourceOpenNebula's get_mask() and get_network() return empty string Status in cloud-init: New Bug description: In DataSourceOpenNebula, get_mask() and get_network() check keys of CONTEXT Attributes, but doesn't check its values. If CONTEXT Attribute key ETH0_MASK and/or ETH0_NETWORK have no value, their methods should return default values, however actually return empty string(''). The problem occures when OpenNebula creats instances with Virtual Network resources which CONTEXT Attribute of NETWORK_ADDRESS and/or NETWORK_MASK is not defined. It seems that get_ip() also has the same bug. I attached a patch for this problem. To manage notifications about this bug go to: https://bugs.launchpad.net/cloud-init/+bug/1736750/+subscriptions -- Mailing list: https://launchpad.net/~yahoo-eng-team Post to : yahoo-eng-team@lists.launchpad.net Unsubscribe : https://launchpad.net/~yahoo-eng-team More help : https://help.launchpad.net/ListHelp