← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1884532] [NEW] inconsistent data in ipamallocations

 

Public bug reported:

Sometimes I saw database is not consistent for some reasons,

for example, as shown below

MariaDB [neutron]> select * from ipamsubnets where neutron_subnet_id='9a8fd2b0-743c-4500-8978-9e5bf9b38347'    
    -> ;
+--------------------------------------+--------------------------------------+
| id                                   | neutron_subnet_id                    |
+--------------------------------------+--------------------------------------+
| 85e7171c-2648-4447-ada6-a37c3c113686 | 9a8fd2b0-743c-4500-8978-9e5bf9b38347 |
+--------------------------------------+--------------------------------------+
1 row in set (0.00 sec)

MariaDB [neutron]> select * from ipamallocations where  ipam_subnet_id = '85e7171c-2648-4447-ada6-a37c3c113686' \G
*************************** 1. row ***************************
    ip_address: 10.13.45.1
        status: ALLOCATED
ipam_subnet_id: 85e7171c-2648-4447-ada6-a37c3c113686
*************************** 2. row ***************************
    ip_address: 10.13.45.2
        status: ALLOCATED
ipam_subnet_id: 85e7171c-2648-4447-ada6-a37c3c113686
*************************** 3. row ***************************
    ip_address: 10.13.45.3
        status: ALLOCATED
ipam_subnet_id: 85e7171c-2648-4447-ada6-a37c3c113686
*************************** 4. row ***************************
    ip_address: 10.13.45.4
        status: ALLOCATED
ipam_subnet_id: 85e7171c-2648-4447-ada6-a37c3c113686
*************************** 5. row ***************************
    ip_address: 10.13.45.5
        status: ALLOCATED
ipam_subnet_id: 85e7171c-2648-4447-ada6-a37c3c113686
*************************** 6. row ***************************
    ip_address: 10.13.45.6
        status: ALLOCATED
ipam_subnet_id: 85e7171c-2648-4447-ada6-a37c3c113686
6 rows in set (0.00 sec)

MariaDB [neutron]> select * from ipamallocations where  ipam_subnet_id =
'85e7171c-2648-4447-ada6-a37c3c113686' \G


MariaDB [neutron]> select * from ipallocations where subnet_id='9a8fd2b0-743c-4500-8978-9e5bf9b38347' 
    -> ;
+--------------------------------------+------------+--------------------------------------+--------------------------------------+
| port_id                              | ip_address | subnet_id                            | network_id                           |
+--------------------------------------+------------+--------------------------------------+--------------------------------------+
| 0ae2630a-76d9-47b1-bf2f-012c2356df75 | 10.13.45.1 | 9a8fd2b0-743c-4500-8978-9e5bf9b38347 | c3ea28cd-e76a-4e49-b538-cc05c0173b83 |
| 83b4683a-fb57-4844-9e1d-55b111fa0e19 | 10.13.45.2 | 9a8fd2b0-743c-4500-8978-9e5bf9b38347 | c3ea28cd-e76a-4e49-b538-cc05c0173b83 |
| 7f0224dd-c49b-42a8-8c8a-bd3aa6c24223 | 10.13.45.3 | 9a8fd2b0-743c-4500-8978-9e5bf9b38347 | c3ea28cd-e76a-4e49-b538-cc05c0173b83 |
| f53b335e-535b-42ce-be53-0d6cee48cf28 | 10.13.45.4 | 9a8fd2b0-743c-4500-8978-9e5bf9b38347 | c3ea28cd-e76a-4e49-b538-cc05c0173b83 |
+--------------------------------------+------------+--------------------------------------+--------------------------------------+
4 rows in set (0.00 sec)


MariaDB [neutron]> 

apparently ipam is not consitent with real ip allocations, when this
happens some IP address is not allocatible although openstack port list
cannot find it.

We are using mariadb for production, and I haven't seen problem like
this using MySQL.

** Affects: neutron
     Importance: Undecided
         Status: New

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to neutron.
https://bugs.launchpad.net/bugs/1884532

Title:
  inconsistent data in ipamallocations

Status in neutron:
  New

Bug description:
  Sometimes I saw database is not consistent for some reasons,

  for example, as shown below

  MariaDB [neutron]> select * from ipamsubnets where neutron_subnet_id='9a8fd2b0-743c-4500-8978-9e5bf9b38347'    
      -> ;
  +--------------------------------------+--------------------------------------+
  | id                                   | neutron_subnet_id                    |
  +--------------------------------------+--------------------------------------+
  | 85e7171c-2648-4447-ada6-a37c3c113686 | 9a8fd2b0-743c-4500-8978-9e5bf9b38347 |
  +--------------------------------------+--------------------------------------+
  1 row in set (0.00 sec)

  MariaDB [neutron]> select * from ipamallocations where  ipam_subnet_id = '85e7171c-2648-4447-ada6-a37c3c113686' \G
  *************************** 1. row ***************************
      ip_address: 10.13.45.1
          status: ALLOCATED
  ipam_subnet_id: 85e7171c-2648-4447-ada6-a37c3c113686
  *************************** 2. row ***************************
      ip_address: 10.13.45.2
          status: ALLOCATED
  ipam_subnet_id: 85e7171c-2648-4447-ada6-a37c3c113686
  *************************** 3. row ***************************
      ip_address: 10.13.45.3
          status: ALLOCATED
  ipam_subnet_id: 85e7171c-2648-4447-ada6-a37c3c113686
  *************************** 4. row ***************************
      ip_address: 10.13.45.4
          status: ALLOCATED
  ipam_subnet_id: 85e7171c-2648-4447-ada6-a37c3c113686
  *************************** 5. row ***************************
      ip_address: 10.13.45.5
          status: ALLOCATED
  ipam_subnet_id: 85e7171c-2648-4447-ada6-a37c3c113686
  *************************** 6. row ***************************
      ip_address: 10.13.45.6
          status: ALLOCATED
  ipam_subnet_id: 85e7171c-2648-4447-ada6-a37c3c113686
  6 rows in set (0.00 sec)

  MariaDB [neutron]> select * from ipamallocations where  ipam_subnet_id
  = '85e7171c-2648-4447-ada6-a37c3c113686' \G

  
  MariaDB [neutron]> select * from ipallocations where subnet_id='9a8fd2b0-743c-4500-8978-9e5bf9b38347' 
      -> ;
  +--------------------------------------+------------+--------------------------------------+--------------------------------------+
  | port_id                              | ip_address | subnet_id                            | network_id                           |
  +--------------------------------------+------------+--------------------------------------+--------------------------------------+
  | 0ae2630a-76d9-47b1-bf2f-012c2356df75 | 10.13.45.1 | 9a8fd2b0-743c-4500-8978-9e5bf9b38347 | c3ea28cd-e76a-4e49-b538-cc05c0173b83 |
  | 83b4683a-fb57-4844-9e1d-55b111fa0e19 | 10.13.45.2 | 9a8fd2b0-743c-4500-8978-9e5bf9b38347 | c3ea28cd-e76a-4e49-b538-cc05c0173b83 |
  | 7f0224dd-c49b-42a8-8c8a-bd3aa6c24223 | 10.13.45.3 | 9a8fd2b0-743c-4500-8978-9e5bf9b38347 | c3ea28cd-e76a-4e49-b538-cc05c0173b83 |
  | f53b335e-535b-42ce-be53-0d6cee48cf28 | 10.13.45.4 | 9a8fd2b0-743c-4500-8978-9e5bf9b38347 | c3ea28cd-e76a-4e49-b538-cc05c0173b83 |
  +--------------------------------------+------------+--------------------------------------+--------------------------------------+
  4 rows in set (0.00 sec)

  
  MariaDB [neutron]> 

  apparently ipam is not consitent with real ip allocations, when this
  happens some IP address is not allocatible although openstack port
  list cannot find it.

  We are using mariadb for production, and I haven't seen problem like
  this using MySQL.

To manage notifications about this bug go to:
https://bugs.launchpad.net/neutron/+bug/1884532/+subscriptions


Follow ups