You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cloudstack.apache.org by ni...@orange.com on 2014/03/10 17:32:14 UTC

[CS4.1] Error during ip range creation

Hi,

I creates a network using API.
Then, I try to creates a new IP Range associated to this network. I've 
got an error. This is the output logs in this paste [1]

Searching into the Cloudstack code, I find that :

if (vlanId.equals(vlan.getVlanTag()) && 
newVlanSubnet.equals(otherVlanSubnet)) {
     if (NetUtils.ipRangesOverlap(startIP, endIP, otherVlanStartIP, 
otherVlanEndIP)) {
           throw new InvalidParameterValueException("The IP range with 
tag: " + vlan.getVlanTag()
                   + " already has IPs that overlap with the new range. 
Please specify a different start IP/end IP.");
     }
     if (!vlanGateway.equals(otherVlanGateway)) {
          throw new InvalidParameterValueException("The IP range with 
tag: " + vlan.getVlanTag() + " has already been added with gateway " + 
otherVlanGateway
                    + ". Please specify a different tag.");
     }
}

According to database, there is 6 VLANs with same gateway :

mysql> select * from vlan where  vlan_gateway = '10.200.244.129'; 
 

+-----+---------+----------------+-----------------+-------------------------------+----------------+----------------+------------+--------------------------------------+---------------------+-------------+----------+-----------+
| id  | vlan_id | vlan_gateway   | vlan_netmask    | description 
            | vlan_type      | data_center_id | network_id | uuid 
                           | physical_network_id | ip6_gateway | 
ip6_cidr | ip6_range |
+-----+---------+----------------+-----------------+-------------------------------+----------------+----------------+------------+--------------------------------------+---------------------+-------------+----------+-----------+
| 114 | 2046    | 10.200.244.129 | 255.255.255.192 | 
10.200.244.187-10.200.244.190 | DirectAttached |              1 | 
  335 | 9339bbfb-c6e0-43b8-94e1-3b1c0b15d3ed |                 200 | 
NULL        | NULL     | NULL      |
| 117 | 2046    | 10.200.244.129 | 255.255.255.192 | 
10.200.244.187-10.200.244.190 | DirectAttached |              3 | 
  338 | e39717b8-913b-44ba-85cb-449ad5cd8c9a |                 202 | 
NULL        | NULL     | NULL      |
| 141 | 2037    | 10.200.244.129 | 255.255.255.192 | 
10.200.244.154-10.200.244.158 | DirectAttached |              1 | 
  365 | 658b4dbd-295e-4083-9ab2-6a73b324c21a |                 200 | 
NULL        | NULL     | NULL      |
| 144 | 2037    | 10.200.244.129 | 255.255.255.192 | 
10.200.244.186-10.200.244.190 | DirectAttached |              3 | 
  368 | d91846f5-a5c7-40f6-9d59-0a2bc04563c2 |                 202 | 
NULL        | NULL     | NULL      |
| 172 | 2013    | 10.200.244.129 | 255.255.255.192 | 
10.200.244.185-10.200.244.190 | DirectAttached |              1 | 
  396 | f7bd1314-5376-4fa5-b131-89fc37ea480d |                 200 | 
NULL        | NULL     | NULL      |
| 182 | 2013    | 10.200.244.129 | 255.255.255.192 | 
10.200.244.128-10.200.244.128 | DirectAttached |              1 | 
  408 | 8c72cad9-2305-4105-8c26-17cc81af82c9 |                 200 | 
NULL        | NULL     | NULL      |
+-----+---------+----------------+-----------------+-------------------------------+----------------+----------------+------------+--------------------------------------+---------------------+-------------+----------+-----------+
6 rows in set (0.00 sec)

But all theses VLANs are associated to 'DESTROY' networks :


mysql> select * from networks where id in (335,338,365,368,396,408);
+-----+------------------+------------------+--------------+-----------------------+---------------+----------------+-------------------+------+---------------------+---------------------+----------------+-------------------+---------+---------+-----------+------------+------+------+-----------+------------+------------+---------------------+----------------+---------------------+---------------------+--------------------------------------+------------------+-------------------+----------+--------+-------------+----------+
| id  | name             | display_text     | traffic_type | 
broadcast_domain_type | broadcast_uri | gateway        | cidr 
    | mode | network_offering_id | physical_network_id | data_center_id 
| guru_name         | state   | related | domain_id | account_id | dns1 
| dns2 | guru_data | set_fields | guest_type | network_domain      | 
reservation_id | created             | removed             | uuid 
                           | restart_required | specify_ip_ranges | 
acl_type | vpc_id | ip6_gateway | ip6_cidr |
+-----+------------------+------------------+--------------+-----------------------+---------------+----------------+-------------------+------+---------------------+---------------------+----------------+-------------------+---------+---------+-----------+------------+------+------+-----------+------------+------------+---------------------+----------------+---------------------+---------------------+--------------------------------------+------------------+-------------------+----------+--------+-------------+----------+
| 335 | PRS_ITG-ADMIN    | PRS_ITG-ADMIN    | Guest        | Vlan 
            | vlan://2046   | 10.200.244.129 | 10.200.244.128/26 | Dhcp 
|                   7 |                 200 |              1 | 
DirectNetworkGuru | Destroy |     335 |         1 |          1 | NULL | 
NULL | NULL      |          0 | Shared     | admin-dev.cloud.mbs | NULL 
           | 2014-01-13 15:43:35 | 2014-03-05 11:26:26 | 
8ef8ae2b-c563-40ce-9255-cce3f7728e98 |                0 | 
   1 | Domain   |   NULL | NULL        | NULL     |
| 338 | PRS_ITG-ADMIN    | PRS_ITG-ADMIN    | Guest        | Vlan 
            | vlan://2046   | 10.200.244.129 | 10.200.244.128/26 | Dhcp 
|                   7 |                 202 |              3 | 
DirectNetworkGuru | Destroy |     338 |         1 |          1 | NULL | 
NULL | NULL      |          0 | Shared     | admin-dev.cloud.mbs | NULL 
           | 2014-01-13 15:43:36 | 2014-03-05 11:26:26 | 
31e59134-fa3f-4387-ad75-f1006e0517f8 |                0 | 
   1 | Domain   |   NULL | NULL        | NULL     |
| 365 | SARGE_PRP-ADMIN  | SARGE_PRP-ADMIN  | Guest        | Vlan 
            | vlan://2037   | 10.200.244.129 | 10.200.244.128/26 | Dhcp 
|                   7 |                 200 |              1 | 
DirectNetworkGuru | Destroy |     365 |         1 |          1 | NULL | 
NULL | NULL      |          0 | Shared     | admin-prp.cloud.mbs | NULL 
           | 2014-01-15 14:53:51 | 2014-03-05 11:26:08 | 
2f987f74-c8e1-45f9-b1d9-dfa5425a4398 |                0 | 
   1 | Domain   |   NULL | NULL        | NULL     |
| 368 | SARGE_PRP-ADMIN  | SARGE_PRP-ADMIN  | Guest        | Vlan 
            | vlan://2037   | 10.200.244.129 | 10.200.244.128/26 | Dhcp 
|                   7 |                 202 |              3 | 
DirectNetworkGuru | Destroy |     368 |         1 |          1 | NULL | 
NULL | NULL      |          0 | Shared     | admin-prp.cloud.mbs | NULL 
           | 2014-01-15 14:53:52 | 2014-03-05 11:26:08 | 
20a0fbb7-b307-42e8-a44a-42503610e658 |                0 | 
   1 | Domain   |   NULL | NULL        | NULL     |
| 396 | CLOUD_ITG-ADMIN  | CLOUD_ITG-ADMIN  | Guest        | Vlan 
            | vlan://2013   | 10.200.244.129 | 10.200.244.128/26 | Dhcp 
|                   7 |                 200 |              1 | 
DirectNetworkGuru | Destroy |     396 |         1 |          1 | NULL | 
NULL | NULL      |          0 | Shared     | admin-dev.cloud.mbs | NULL 
           | 2014-02-28 15:36:23 | 2014-03-05 11:26:56 | 
9655256c-42aa-4a91-b472-64f67a641f2f |                0 | 
   1 | Domain   |   NULL | NULL        | NULL     |
| 408 | BATMAN_ITG-ADMIN | BATMAN_ITG-ADMIN | Guest        | Vlan 
            | vlan://2013   | 10.200.244.129 | 10.200.244.128/26 | Dhcp 
|                   7 |                 200 |              1 | 
DirectNetworkGuru | Destroy |     408 |         1 |          1 | NULL | 
NULL | NULL      |          0 | Shared     | admin-dev.cloud.mbs | NULL 
           | 2014-03-03 13:25:25 | 2014-03-05 11:23:43 | 
bcfc4684-792f-4843-bae3-2a99d815d570 |                0 | 
   1 | Domain   |   NULL | NULL        | NULL     |
+-----+------------------+------------------+--------------+-----------------------+---------------+----------------+-------------------+------+---------------------+---------------------+----------------+-------------------+---------+---------+-----------+------------+------+------+-----------+------------+------------+---------------------+----------------+---------------------+---------------------+--------------------------------------+------------------+-------------------+----------+--------+-------------+----------+


I don't really understand the error.
Thanks for any help
Regards.


[1] : http://pastebin.com/KfSaH1zM


-- 
Nicolas Lamirault

_________________________________________________________________________________________________________________________

Ce message et ses pieces jointes peuvent contenir des informations confidentielles ou privilegiees et ne doivent donc
pas etre diffuses, exploites ou copies sans autorisation. Si vous avez recu ce message par erreur, veuillez le signaler
a l'expediteur et le detruire ainsi que les pieces jointes. Les messages electroniques etant susceptibles d'alteration,
Orange decline toute responsabilite si ce message a ete altere, deforme ou falsifie. Merci.

This message and its attachments may contain confidential or privileged information that may be protected by law;
they should not be distributed, used or copied without authorisation.
If you have received this email in error, please notify the sender and delete this message and its attachments.
As emails may be altered, Orange is not liable for messages that have been modified, changed or falsified.
Thank you.