waza-ari opened a new issue #2711: Storage IP addresses are not released correctly when there are overlapping IP addresses in different ranges URL: https://github.com/apache/cloudstack/issues/2711 ##### ISSUE TYPE * Bug Report ##### COMPONENT NAME ~~~ Cloudstack Core, Storage Networking ~~~ ##### CLOUDSTACK VERSION ~~~ I think all current versions are affected ~~~ ##### CONFIGURATION Cloudstack with Basic networking (KVM Hosts) and NFS storage ##### OS / ENVIRONMENT CentOS/RHEL 6, but not relevant ##### SUMMARY It looks like the release of storage IP addresses is not working proberly, as the `releaseIpAddress` method of `StorageNetworkIpAddressDaoImpl` does not take the range id into account ##### STEPS TO REPRODUCE - Create a basic zone and assign an IP address pool for storage traffic. This should create an entry in `cloud.dc_storage_network_ip_range` and one entry per IP address in range in `cloud.op_dc_storage_network_ip_address` - Delete that zone again - Create another zone and assign the same IP address pool for storage traffic. This will create a new range and create the IP addresses again with the new range - No add/delete some SSVMs or KVM hosts taking a storage IP address ##### EXPECTED RESULTS In the `cloud.op_dc_storage_network_ip_address` table, only the IP addresses of the second range should be used both when adding or deleting SSVMs (obtaining and releasing IPs) ##### ACTUAL RESULTS When obtaining IP addresses, the correct pool is queried for free IP addresses and the `taken` field is set correctly. When releasing an IP address however, the range_id is not taken into account, only the IP address itself is used. In our setup this leads to the problem that only the IP address in the first (unused) pool is released (`taken` is set to `null`), such that after a few iterations now new VMs can be spawned, even though enough IP addresses are available. We suspect the problem in https://github.com/apache/cloudstack/blob/893a88d225276e45f12f9490e6af2c94a81c2965/engine/schema/src/main/java/com/cloud/dc/dao/StorageNetworkIpAddressDaoImpl.java#L99-L105 as it is not taking the range_id into consideration.
---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: [email protected] With regards, Apache Git Services
