[
https://issues.apache.org/jira/browse/CLOUDSTACK-2369?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13658190#comment-13658190
]
Jayapal Reddy commented on CLOUDSTACK-2369:
-------------------------------------------
FIrst time adding private gateway is success because of the following reason.
1. For each private gateway we created there are two networks got created one
with private network guru and other with external network guru.
mysql> SELECT id, uuid, name,guru_name,gateway,cidr FROM cloud.networks where
broadcast_uri='vlan://74';
+-----+--------------------------------------+-------------------------+--------------------------+-------------+----------------+
| id | uuid | name |
guru_name | gateway | cidr |
+-----+--------------------------------------+-------------------------+--------------------------+-------------+----------------+
| 231 | 8012931a-dc81-45f2-9dc2-924772ae6438 | vpc-vpc1-privateNetwork |
ExternalGuestNetworkGuru | 10.147.74.1 | 10.147.74.0/24 |
| 232 | 22628a72-7648-4872-934d-8c092f53b74b | vpc-vpc1-privateNetwork |
PrivateNetworkGuru | 10.147.74.1 | 10.147.74.0/24 |
+-----+--------------------------------------+-------------------------+--------------------------+-------------+----------------+
2. When creating same private gateway again,
It is getting the network of the vlan and cidd. It returned network 232
it is searching for the existence of the private gateway with networked 231.
So the null is retuned for the private_ip_address table.
3. So it is going and adding the duplicate private gateway.
mysql> SELECT * FROM cloud.private_ip_address;
+----+---------------+------------+----------------+-------------+--------+---------------------+------------+
| id | ip_address | network_id | reservation_id | mac_address | vpc_id |
taken | source_nat |
+----+---------------+------------+----------------+-------------+--------+---------------------+------------+
| 20 | 10.147.74.100 | 231 | NULL | 133 | 12 |
2013-05-15 09:05:19 | 0 |
+----+---------------+------------+----------------+-------------+--------+---------------------+------------+
> NTier: Same Private Gateway NIC IP can be added multiple times to the same
> VPC VR
> ---------------------------------------------------------------------------------
>
> Key: CLOUDSTACK-2369
> URL: https://issues.apache.org/jira/browse/CLOUDSTACK-2369
> Project: CloudStack
> Issue Type: Bug
> Security Level: Public(Anyone can view this level - this is the
> default.)
> Components: Management Server
> Affects Versions: 4.2.0
> Reporter: Chandan Purushothama
> Assignee: Jayapal Reddy
> Priority: Critical
> Fix For: 4.2.0
>
> Attachments: management-server.zip
>
>
> ===============
> Steps to Reproduce:
> ===============
> 1. Create a VPC.
> 2. Add a Private Gateway to the VPC VR.
> 3. Add the same Private Gateway to the VPC VR again.
> ===========
> Observations:
> ===========
> root@r-4-NATONPRVGW:~# ifconfig
> eth0 Link encap:Ethernet HWaddr 0e:00:a9:fe:00:02
> inet addr:169.254.0.2 Bcast:169.254.255.255 Mask:255.255.0.0
> inet6 addr: fe80::c00:a9ff:fefe:2/64 Scope:Link
> UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
> RX packets:479 errors:0 dropped:0 overruns:0 frame:0
> TX packets:397 errors:0 dropped:0 overruns:0 carrier:0
> collisions:0 txqueuelen:1000
> RX bytes:51626 (50.4 KiB) TX bytes:62122 (60.6 KiB)
> eth1 Link encap:Ethernet HWaddr 06:25:78:00:00:0d
> inet addr:10.223.136.132 Bcast:10.223.136.191 Mask:255.255.255.192
> inet6 addr: fe80::425:78ff:fe00:d/64 Scope:Link
> UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
> RX packets:98 errors:0 dropped:0 overruns:0 frame:0
> TX packets:93 errors:0 dropped:0 overruns:0 carrier:0
> collisions:0 txqueuelen:1000
> RX bytes:7078 (6.9 KiB) TX bytes:7414 (7.2 KiB)
> eth2 Link encap:Ethernet HWaddr 06:f2:bc:00:00:25
> inet addr:10.223.60.30 Bcast:10.223.60.63 Mask:255.255.255.192
> inet6 addr: fe80::4f2:bcff:fe00:25/64 Scope:Link
> UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
> RX packets:11 errors:0 dropped:0 overruns:0 frame:0
> TX packets:6 errors:0 dropped:0 overruns:0 carrier:0
> collisions:0 txqueuelen:1000
> RX bytes:714 (714.0 B) TX bytes:444 (444.0 B)
> eth3 Link encap:Ethernet HWaddr 06:81:40:00:00:26
> inet addr:10.223.60.30 Bcast:10.223.60.63 Mask:255.255.255.192
> inet6 addr: fe80::481:40ff:fe00:26/64 Scope:Link
> UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
> RX packets:5 errors:0 dropped:0 overruns:0 frame:0
> TX packets:5 errors:0 dropped:0 overruns:0 carrier:0
> collisions:0 txqueuelen:1000
> RX bytes:378 (378.0 B) TX bytes:402 (402.0 B)
> lo Link encap:Local Loopback
> inet addr:127.0.0.1 Mask:255.0.0.0
> inet6 addr: ::1/128 Scope:Host
> UP LOOPBACK RUNNING MTU:16436 Metric:1
> RX packets:8 errors:0 dropped:0 overruns:0 frame:0
> TX packets:8 errors:0 dropped:0 overruns:0 carrier:0
> collisions:0 txqueuelen:0
> RX bytes:1104 (1.0 KiB) TX bytes:1104 (1.0 KiB)
> root@r-4-NATONPRVGW:~#
> mysql> select
> id,ip4_address,netmask,gateway,vlan_tag,type,vpc_id,created,state,removed,source_nat
> from vpc_gateways;
> +----+--------------+-----------------+-------------+----------+---------+--------+---------------------+----------+---------------------+------------+
> | id | ip4_address | netmask | gateway | vlan_tag | type |
> vpc_id | created | state | removed | source_nat |
> +----+--------------+-----------------+-------------+----------+---------+--------+---------------------+----------+---------------------+------------+
> | 1 | 10.223.60.30 | 255.255.255.192 | 10.223.60.1 | 600 | Private |
> 1 | 2013-05-07 22:00:33 | Deleting | 2013-05-07 23:01:42 | 0 |
> | 2 | 10.223.60.30 | 255.255.255.192 | 10.223.60.1 | 600 | Private |
> 1 | 2013-05-07 23:02:32 | Deleting | 2013-05-07 23:02:48 | 0 |
> | 3 | 10.223.60.30 | 255.255.255.192 | 10.223.60.1 | 600 | Private |
> 1 | 2013-05-07 23:03:38 | Deleting | 2013-05-07 23:06:09 | 1 |
> | 4 | 10.223.60.30 | 255.255.255.192 | 10.223.60.1 | 600 | Private |
> 1 | 2013-05-07 23:07:15 | Deleting | 2013-05-07 23:55:38 | 1 |
> | 5 | 10.223.60.30 | 255.255.255.192 | 10.223.60.1 | 600 | Private |
> 1 | 2013-05-07 23:56:15 | Ready | NULL | 0 |
> | 6 | 10.223.60.30 | 255.255.255.192 | 10.223.60.1 | 600 | Private |
> 1 | 2013-05-07 23:56:43 | Ready | NULL | 0 |
> +----+--------------+-----------------+-------------+----------+---------+--------+---------------------+----------+---------------------+------------+
> 6 rows in set (0.00 sec)
> mysql> select id,instance_id,ip4_address,state,vm_type,created,removed from
> nics where instance_id=4;
> +----+-------------+----------------+----------+--------------+---------------------+---------+
> | id | instance_id | ip4_address | state | vm_type | created
> | removed |
> +----+-------------+----------------+----------+--------------+---------------------+---------+
> | 14 | 4 | 169.254.0.2 | Reserved | DomainRouter | 2013-05-07
> 23:15:47 | NULL |
> | 15 | 4 | 10.223.136.132 | Reserved | DomainRouter | 2013-05-07
> 23:15:47 | NULL |
> | 16 | 4 | 10.223.60.30 | Reserved | DomainRouter | 2013-05-07
> 23:56:15 | NULL |
> | 17 | 4 | 10.223.60.30 | Reserved | DomainRouter | 2013-05-07
> 23:56:43 | NULL |
> +----+-------------+----------------+----------+--------------+---------------------+---------+
> 4 rows in set (0.00 sec)
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira