DeepthiMachiraju created CLOUDSTACK-9970: --------------------------------------------
Summary: IP's acquired from additional public ranges are retained in the json file post releasing the IP's in VPC VR Key: CLOUDSTACK-9970 URL: https://issues.apache.org/jira/browse/CLOUDSTACK-9970 Project: CloudStack Issue Type: Bug Security Level: Public (Anyone can view this level - this is the default.) Affects Versions: 4.10.0.0 Reporter: DeepthiMachiraju Fix For: 4.10.0.0 Attachments: cloud.log, management-server.log In continuation to bug CLOUDSTACK-9969 , json file are not cleaned up post releasing the public ip's - Create VPC and create multiple tiers . - Acquire IP from additional Public Range and configure the IP for load balancing. ============== rules created after the above step ============================= < eth4 : 10.x.203 , 10.x.204 are the acquired ip > root@r-199-VM:~# ip a 1: lo: <LOOPBACK,UP,LOWER_UP> mtu 16436 qdisc noqueue state UNKNOWN link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00 inet 127.0.0.1/8 scope host lo 2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 1000 link/ether 0e:00:a9:fe:02:5f brd ff:ff:ff:ff:ff:ff inet 169.254.2.95/16 brd 169.254.255.255 scope global eth0 3: eth1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 1000 link/ether 06:3b:84:00:00:0e brd ff:ff:ff:ff:ff:ff inet 10.147.30.113/24 brd 10.147.30.255 scope global eth1 4: eth2: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 1000 link/ether 02:00:06:b4:00:02 brd ff:ff:ff:ff:ff:ff inet 192.168.2.1/24 brd 192.168.2.255 scope global eth2 5: eth3: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 1000 link/ether 02:00:05:12:00:02 brd ff:ff:ff:ff:ff:ff inet 192.168.1.1/24 brd 192.168.1.255 scope global eth3 6: eth4: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 1000 link/ether 06:56:62:00:00:1f brd ff:ff:ff:ff:ff:ff inet 10.147.52.203/24 brd 10.147.52.255 scope global eth4 inet 10.147.52.204/24 brd 10.147.52.255 scope global secondary eth4 <<<<< 203 ip is static enabled >>>>> root@r-199-VM:/etc/cloudstack# cat forwardingrules.json { "10.147.52.203": [ { "internal_ip": "192.168.1.90", "public_ip": "10.147.52.203", "type": "staticnat" } ], "id": "forwardingrules" <<<<<<< 204 ip is configured for load balancing >>>>>>>>>>>> root@r-199-VM:/etc/cloudstack# cat loadbalancer.json { "config": [ { "add_rules": [ "10.147.52.204:300:" ], "configuration": [ "global", "\tlog 127.0.0.1:3914 local0 warning", "\tmaxconn 4096", "\tmaxpipes 1024", "\tchroot /var/lib/haproxy", "\tuser haproxy", "\tgroup haproxy", "\tdaemon", "\t ", "defaults", "\tlog global", "\tmode tcp", "\toption dontlognull", "\tretries 3", "\toption redispatch", "\toption forwardfor", "\toption forceclose", "\ttimeout connect 5000", "\ttimeout client 50000", "\ttimeout server 50000", "\nlisten stats_on_public 10.147.30.113:8081\n\tmode http\n\toption httpclose\n\tstats enable\n\tstats uri /admin?stats\n\tstats realm Haproxy\\ Statistics\n\tstats auth admin1:AdMiN123\n", "\t ", "listen 10_147_52_204-300 10.147.52.204:300", "\tbalance roundrobin", "\tserver 10_147_52_204-300_0 192.168.1.90:300 check", "\t ", "\t " ], "remove_rules": [], "router_ip": "192.168.1.1", "stat_rules": [ "10.147.30.113:8081:0/0:," ], "tmp_cfg_file_name": "haproxy.cfg.new.1497952234542", "tmp_cfg_file_path": "/etc/haproxy/" } ], "id": "loadbalancer" ===================== ips.json ================ root@r-199-VM:/etc/cloudstack# cat ips.json { "eth0": [ { "add": true, "broadcast": "169.254.255.255", "cidr": "169.254.2.95/16", "device": "eth0", "gateway": "None", "netmask": "255.255.0.0", "network": "169.254.0.0/16", "nic_dev_id": "0", "nw_type": "control", "one_to_one_nat": false, "public_ip": "169.254.2.95", "size": "16", "source_nat": false } ], "eth1": [ { "add": true, "broadcast": "10.147.30.255", "cidr": "10.147.30.113/24", "device": "eth1", "first_i_p": true, "gateway": "10.147.30.1", "netmask": "255.255.255.0", "network": "10.147.30.0/24", "new_nic": false, "nic_dev_id": 1, "nw_type": "public", "one_to_one_nat": false, "public_ip": "10.147.30.113", "size": "24", "source_nat": true, "vif_mac_address": "06:3b:84:00:00:0e" } ], "eth2": [ { "add": true, "broadcast": "192.168.2.255", "cidr": "192.168.2.1/24", "device": "eth2", "gateway": "192.168.2.1", "netmask": "255.255.255.0", "network": "192.168.2.0/24", "nic_dev_id": "2", "nw_type": "guest", "one_to_one_nat": false, "public_ip": "192.168.2.1", "size": "24", "source_nat": false } ], "eth3": [ { "add": true, "broadcast": "192.168.1.255", "cidr": "192.168.1.1/24", "device": "eth3", "gateway": "192.168.1.1", "netmask": "255.255.255.0", "network": "192.168.1.0/24", "nic_dev_id": "3", "nw_type": "guest", "one_to_one_nat": false, "public_ip": "192.168.1.1", "size": "24", "source_nat": false } ], "eth4": [ { "add": true, "broadcast": "10.147.52.255", "cidr": "10.147.52.204/24", "device": "eth4", "first_i_p": true, "gateway": "10.147.52.1", "netmask": "255.255.255.0", "network": "10.147.52.0/24", "new_nic": false, "nic_dev_id": 4, "nw_type": "public", "one_to_one_nat": false, "public_ip": "10.147.52.204", "size": "24", "source_nat": true, "vif_mac_address": "06:56:62:00:00:1f" }, { "add": true, "broadcast": "10.147.52.255", "cidr": "10.147.52.203/24", "device": "eth4", "first_i_p": false, "gateway": "10.147.52.1", "netmask": "255.255.255.0", "network": "10.147.52.0/24", "new_nic": false, "nic_dev_id": 4, "nw_type": "public", "one_to_one_nat": true, "public_ip": "10.147.52.203", "size": "24", "source_nat": false, "vif_mac_address": "06:56:62:00:00:1f" } ], "id": "ips" ============================================== - Both the acquired IP's are released from the UI. ============ logs post releasing ========================= root@r-199-VM:/etc/cloudstack# ip a 1: lo: <LOOPBACK,UP,LOWER_UP> mtu 16436 qdisc noqueue state UNKNOWN link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00 inet 127.0.0.1/8 scope host lo 2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 1000 link/ether 0e:00:a9:fe:02:5f brd ff:ff:ff:ff:ff:ff inet 169.254.2.95/16 brd 169.254.255.255 scope global eth0 3: eth1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 1000 link/ether 06:3b:84:00:00:0e brd ff:ff:ff:ff:ff:ff inet 10.147.30.113/24 brd 10.147.30.255 scope global eth1 4: eth2: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 1000 link/ether 02:00:06:b4:00:02 brd ff:ff:ff:ff:ff:ff inet 192.168.2.1/24 brd 192.168.2.255 scope global eth2 5: eth3: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 1000 link/ether 02:00:05:12:00:02 brd ff:ff:ff:ff:ff:ff inet 192.168.1.1/24 brd 192.168.1.255 scope global eth3 <<<< eth4 10.x.204 is not cleaned up in the json file , but how ever IPtables are cleaned up and add is also set to false >>>> root@r-199-VM:/etc/cloudstack# cat ips.json { "eth0": [ { "add": true, "broadcast": "169.254.255.255", "cidr": "169.254.2.95/16", "device": "eth0", "gateway": "None", "netmask": "255.255.0.0", "network": "169.254.0.0/16", "nic_dev_id": "0", "nw_type": "control", "one_to_one_nat": false, "public_ip": "169.254.2.95", "size": "16", "source_nat": false } ], "eth1": [ { "add": true, "broadcast": "10.147.30.255", "cidr": "10.147.30.113/24", "device": "eth1", "first_i_p": true, "gateway": "10.147.30.1", "netmask": "255.255.255.0", "network": "10.147.30.0/24", "new_nic": false, "nic_dev_id": 1, "nw_type": "public", "one_to_one_nat": false, "public_ip": "10.147.30.113", "size": "24", "source_nat": true, "vif_mac_address": "06:3b:84:00:00:0e" } ], "eth2": [ { "add": true, "broadcast": "192.168.2.255", "cidr": "192.168.2.1/24", "device": "eth2", "gateway": "192.168.2.1", "netmask": "255.255.255.0", "network": "192.168.2.0/24", "nic_dev_id": "2", "nw_type": "guest", "one_to_one_nat": false, "public_ip": "192.168.2.1", "size": "24", "source_nat": false } ], "eth3": [ { "add": true, "broadcast": "192.168.1.255", "cidr": "192.168.1.1/24", "device": "eth3", "gateway": "192.168.1.1", "netmask": "255.255.255.0", "network": "192.168.1.0/24", "nic_dev_id": "3", "nw_type": "guest", "one_to_one_nat": false, "public_ip": "192.168.1.1", "size": "24", "source_nat": false } ], "eth4": [ { "add": true, "broadcast": "10.147.52.255", "cidr": "10.147.52.203/24", "device": "eth4", "first_i_p": true, "gateway": "10.147.52.1", "netmask": "255.255.255.0", "network": "10.147.52.0/24", "new_nic": false, "nic_dev_id": 4, "nw_type": "public", "one_to_one_nat": true, "public_ip": "10.147.52.203", "size": "24", "source_nat": true, "vif_mac_address": "06:56:62:00:00:1f" }, { "add": false, "broadcast": "10.147.52.255", "cidr": "10.147.52.204/24", "device": "eth4", "first_i_p": true, "gateway": "10.147.52.1", "netmask": "255.255.255.0", "network": "10.147.52.0/24", "new_nic": false, "nic_dev_id": 4, "nw_type": "public", "one_to_one_nat": false, "public_ip": "10.147.52.204", "size": "24", "source_nat": true, "vif_mac_address": "06:56:62:00:00:1f" } ], "id": "ips" Attached cloud.log and Ms log ************************************************************ Public IP acquired from additional public ranges which is static nat enabled is set to true post releasing the IP in VPC VR. -- This message was sent by Atlassian JIRA (v6.4.14#64029)