Can't create nova server with subnet and fixed_ip

Bug #1533074 reported by huangtianhua
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Heat
Fix Released
Medium
huangtianhua

Bug Description

1. create a stack with nova server:
*********************
heat_template_version: 2013-05-23
parameters:
  sub_id:
    type: string
    default: d7dbb50b-93b8-4100-8598-035cfbfaa15a
resources:
  myserver:
    type: OS::Nova::Server
    properties:
      flavor: "m1.tiny"
      image: cirros-0.3.0-x86_64-disk
      name: instance_test
      networks:
        - subnet: {get_param: sub_id}
          fixed_ip: '172.24.4.44'
*********************

2. stack create failed: BadRequest: Specified Fixed IP '172.24.4.44' cannot be used with port '6fccc688-7350-4137-ab01-4ec9653e70db': port already has a Fixed IP allocated.
The details: http://paste.openstack.org/show/483526/

3. to delete the stack, then the internal port residue

So , there are two problems, I will fix them.

Changed in heat:
importance: Undecided → Medium
assignee: nobody → huangtianhua (huangtianhua)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to heat (master)

Fix proposed to branch: master
Review: https://review.openstack.org/266756

Changed in heat:
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

Fix proposed to branch: master
Review: https://review.openstack.org/267350

Changed in heat:
milestone: none → mitaka-2
Revision history for this message
huangtianhua (huangtianhua) wrote :
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix proposed to heat (master)

Related fix proposed to branch: master
Review: https://review.openstack.org/268956

Changed in heat:
milestone: mitaka-2 → mitaka-3
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix merged to heat (master)

Reviewed: https://review.openstack.org/268956
Committed: https://git.openstack.org/cgit/openstack/heat/commit/?id=2fb51e122c2a647dd44b4befdcaeaa6a9065c3fa
Submitter: Jenkins
Branch: master

commit 2fb51e122c2a647dd44b4befdcaeaa6a9065c3fa
Author: huangtianhua <email address hidden>
Date: Mon Jan 18 17:40:04 2016 +0800

    Attempt to delete internal resources if create server fail

    Attempt to delete queue/user/internal_ports if server hasn't
    been created successful yet, to avoid some infos residue.

    Change-Id: I9d0dababc996cce559a48d4334d835b4f866df3a
    Closes-Bug: #1535227
    Related-Bug: #1533074

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix proposed to heat (stable/liberty)

Related fix proposed to branch: stable/liberty
Review: https://review.openstack.org/270566

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to heat (master)

Reviewed: https://review.openstack.org/266756
Committed: https://git.openstack.org/cgit/openstack/heat/commit/?id=39a2438f7f75594987f7f70cddbaa96483698e38
Submitter: Jenkins
Branch: master

commit 39a2438f7f75594987f7f70cddbaa96483698e38
Author: huangtianhua <email address hidden>
Date: Wed Jan 13 15:47:34 2016 +0800

    Don't allow specify fixed_ip and port at the same time

    Nova doesn't allow specify fixed_ip and port when create
    server, so add the validation in heat.

    Change-Id: Ifeddb816edabcdaae98c3c7f3531967b38d90f76
    Partial-Bug: #1533074

Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

Reviewed: https://review.openstack.org/267350
Committed: https://git.openstack.org/cgit/openstack/heat/commit/?id=84564a3665b07c13b4e3909a7d7949388c1f5c6c
Submitter: Jenkins
Branch: master

commit 84564a3665b07c13b4e3909a7d7949388c1f5c6c
Author: huangtianhua <email address hidden>
Date: Wed Jan 13 17:24:32 2016 +0800

    Do not pass both port-id and fixed-ip to create server

    Nova doesn't allow specify port-id and fixed-ip at the same
    time when create server. This patch to avoid this problem
    when create internal port by subnet.

    Also, this change adds integration test for create server
    with subnet and fixed_ip.

    Change-Id: Ib16d7f90a4eb488a853f9c2093280596fc4d783b
    Partial-Bug: #1533074

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to heat (master)

Fix proposed to branch: master
Review: https://review.openstack.org/273324

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to heat (stable/liberty)

Fix proposed to branch: stable/liberty
Review: https://review.openstack.org/274306

tags: added: liberty-backport-potential
Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

Fix proposed to branch: stable/liberty
Review: https://review.openstack.org/274307

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to heat (master)

Reviewed: https://review.openstack.org/273324
Committed: https://git.openstack.org/cgit/openstack/heat/commit/?id=967df0e92dc6cf3f733a204f097a8e3283881c82
Submitter: Jenkins
Branch: master

commit 967df0e92dc6cf3f733a204f097a8e3283881c82
Author: huangtianhua <email address hidden>
Date: Thu Jan 28 11:08:39 2016 +0800

    Adds validation to support 'port' only if using neutron

    If not using neutron, nova doesn't allow to specify
    'port' parameter when create server. This patch adds
    validation to support 'port' only when using neutron.

    Also, this patch fixes another problem:
    the commit 84564a3665b07c13b4e3909a7d7949388c1f5c6c
    has been merged, there is a problem in the case: user
    specify 'network', 'fixed_ip' and 'port' in nova-network,
    the ip will be ignored, and then nova will raise exception:
    https://github.com/openstack/nova/blob/master/nova/api/openstack/compute/servers.py#L460-L465.

    Change-Id: I1c1cc236e2f2b6d50cc15034e5854de429bf8be0
    Closes-Bug: #1538407
    Partial-Bug: #1533074

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to heat (stable/liberty)

Reviewed: https://review.openstack.org/274306
Committed: https://git.openstack.org/cgit/openstack/heat/commit/?id=f85060566bb9be935272b20c58f5ac23edc3f416
Submitter: Jenkins
Branch: stable/liberty

commit f85060566bb9be935272b20c58f5ac23edc3f416
Author: huangtianhua <email address hidden>
Date: Wed Jan 13 15:47:34 2016 +0800

    Don't allow specify fixed_ip and port at the same time

    Nova doesn't allow specify fixed_ip and port when create
    server, so add the validation in heat.

    Change-Id: Ifeddb816edabcdaae98c3c7f3531967b38d90f76
    Partial-Bug: #1533074
    (cherry picked from commit 39a2438f7f75594987f7f70cddbaa96483698e38)

tags: added: in-stable-liberty
Changed in heat:
milestone: mitaka-3 → mitaka-rc1
Revision history for this message
Sergey Kraynev (skraynev) wrote :

Fix was merged in master during m3

Changed in heat:
milestone: mitaka-rc1 → mitaka-3
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

Reviewed: https://review.openstack.org/274307
Committed: https://git.openstack.org/cgit/openstack/heat/commit/?id=a1fb865086841ad9197c3927166666a51039ba48
Submitter: Jenkins
Branch: stable/liberty

commit a1fb865086841ad9197c3927166666a51039ba48
Author: huangtianhua <email address hidden>
Date: Wed Jan 13 17:24:32 2016 +0800

    Do not pass both port-id and fixed-ip to create server

    Nova doesn't allow specify port-id and fixed-ip at the same
    time when create server. This patch to avoid this problem
    when create internal port by subnet.

    Also, this change adds integration test for create server
    with subnet and fixed_ip.

    Change-Id: Ib16d7f90a4eb488a853f9c2093280596fc4d783b
    Partial-Bug: #1533074
    (cherry picked from commit 84564a3665b07c13b4e3909a7d7949388c1f5c6c)

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix merged to heat (stable/liberty)

Reviewed: https://review.openstack.org/270566
Committed: https://git.openstack.org/cgit/openstack/heat/commit/?id=cd3abc743b7de24d41eece0be1d092885430bcd4
Submitter: Jenkins
Branch: stable/liberty

commit cd3abc743b7de24d41eece0be1d092885430bcd4
Author: huangtianhua <email address hidden>
Date: Mon Jan 18 17:40:04 2016 +0800

    Attempt to delete internal resources if create server fail

    Attempt to delete queue/user/internal_ports if server hasn't
    been created successful yet, to avoid some infos residue.

    Change-Id: I9d0dababc996cce559a48d4334d835b4f866df3a
    Closes-Bug: #1535227
    Related-Bug: #1533074
    (cherry picked from commit 2fb51e122c2a647dd44b4befdcaeaa6a9065c3fa)

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.