← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1177277] Re: quantum port-create can not detect duplicate IP address

 

** Changed in: quantum
       Status: Fix Committed => Fix Released

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

Title:
  quantum port-create can not detect duplicate IP address

Status in OpenStack Quantum (virtual network service):
  Fix Released

Bug description:
  Quantum allows to use the duplicate IP address when creating ports
  with descriptive text after the IP.

  For example :

  quantum net-create test
  quantum subnet-create --ip-version 4 --gateway 10.0.0.1 --disable-dhcp test 10.0.0.0/24
  quantum port-create --fixed-ip subnet_id=f91f4690-1a98-4f4e-ae87-8d9fc82fb62e,ip_address="10.0.0.15 (dup1)" test
  quantum port-create --fixed-ip subnet_id=f91f4690-1a98-4f4e-ae87-8d9fc82fb62e,ip_address="10.0.0.15 (dup2)" test

  The ip_address with dup1 and that with dup2 are the same, BUT this is
  not considered to be same in quantum-server:

      def _check_unique_ip(context, network_id, subnet_id, ip_address):
          #import pdb; pdb.set_trace()
          """Validate that the IP address on the subnet is not in use."""
          ip_qry = context.session.query(models_v2.IPAllocation)
          try:
              ip_qry.filter_by(network_id=network_id,
                               subnet_id=subnet_id,
                               ip_address=ip_address).one()
          except exc.NoResultFound:
              return True
          return False

  NOTICE: ip_address be filtered  is "10.0.0.15 (dup1)" or "10.0.0.15
  (dup2)",  apparently, this two string is the same, so it differs.

  So I think it should take some measures to solve this problems:

  please help check this problem quickly thanks

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