[Openstack] Additional port is created when launch the 1st VM

Danny Choi (dannchoi) dannchoi at cisco.com
Tue Oct 7 17:05:33 UTC 2014


Hi,

I used devstack to deploy Juno OpenStack.

By default, devstack created 2 users: admin (with role “admin”) and demo;
and 2 networks: public (tenant = admin) and private (tenant = demo)

In CLI as user demo, there is one port created (attached to the Neutron router):


localadmin at qa4:~/devstack$ source openrc demo demo

localadmin at qa4:~/devstack$

localadmin at qa4:~/devstack$ neutron port-list

+--------------------------------------+------+-------------------+---------------------------------------------------------------------------------+

| id                                   | name | mac_address       | fixed_ips                                                                       |

+--------------------------------------+------+-------------------+---------------------------------------------------------------------------------+

| 8b747b8d-eb66-4cb9-92ef-c150078c50c7 |      | fa:16:3e:77:21:79 | {"subnet_id": "d05e862a-6fd1-4586-89ae-03dfa52cbf44", "ip_address": "10.0.0.1"} |

+--------------------------------------+------+-------------------+---------------------------------------------------------------------------------+

Launch a VM and attach the private network.


localadmin at qa4:~/devstack$ nova net-list

+--------------------------------------+---------+------+

| ID                                   | Label   | CIDR |

+--------------------------------------+---------+------+

| 0afb2bd6-38c7-401d-966e-857dd02ba322 | private | None |

| bc6e1c7d-6eca-419a-af93-47bb894e8789 | public  | None |

+--------------------------------------+---------+------+

localadmin at qa4:~/devstack$ nova boot --image cirros-0.3.2-x86_64-uec --flavor 1 --nic net-id=0afb2bd6-38c7-401d-966e-857dd02ba322 vm1

+--------------------------------------+----------------------------------------------------------------+

| Property                             | Value                                                          |

+--------------------------------------+----------------------------------------------------------------+

| OS-DCF:diskConfig                    | MANUAL                                                         |

| OS-EXT-AZ:availability_zone          | nova                                                           |

| OS-EXT-STS:power_state               | 0                                                              |

| OS-EXT-STS:task_state                | -                                                              |

| OS-EXT-STS:vm_state                  | building                                                       |

| OS-SRV-USG:launched_at               | -                                                              |

| OS-SRV-USG:terminated_at             | -                                                              |

| accessIPv4                           |                                                                |

| accessIPv6                           |                                                                |

| adminPass                            | BDLgcrfCLV9h                                                   |

| config_drive                         |                                                                |

| created                              | 2014-10-07T16:35:07Z                                           |

| flavor                               | m1.tiny (1)                                                    |

| hostId                               |                                                                |

| id                                   | 38ed7d4c-26f9-4d27-8f50-8f85c680771b                           |

| image                                | cirros-0.3.2-x86_64-uec (0c56933c-1d35-41cc-8771-3c0aa4d7562f) |

| key_name                             | -                                                              |

| metadata                             | {}                                                             |

| name                                 | vm1                                                            |

| os-extended-volumes:volumes_attached | []                                                             |

| progress                             | 0                                                              |

| security_groups                      | default                                                        |

| status                               | BUILD                                                          |

| tenant_id                            | 8eba682471404f389ce727bcbaa41ed2                               |

| updated                              | 2014-10-07T16:35:07Z                                           |

| user_id                              | 2a90bd89402945b2986f0ddd97c13303                               |

+--------------------------------------+----------------------------------------------------------------+

localadmin at qa4:~/devstack$ nova list

+--------------------------------------+------+--------+------------+-------------+------------------+

| ID                                   | Name | Status | Task State | Power State | Networks         |

+--------------------------------------+------+--------+------------+-------------+------------------+

| 38ed7d4c-26f9-4d27-8f50-8f85c680771b | vm1  | ACTIVE | -          | Running     | private=10.0.0.2 |

+--------------------------------------+------+--------+------------+-------------+—————————+


Note that port with fixed IP 10.0.0.2 is created for the VM.


However, an additional port with fixed IP 10.0.0.3 is also created.


localadmin at qa4:~/devstack$ neutron port-list

+--------------------------------------+------+-------------------+---------------------------------------------------------------------------------+

| id                                   | name | mac_address       | fixed_ips                                                                       |

+--------------------------------------+------+-------------------+---------------------------------------------------------------------------------+

| 136c049f-dcfd-4c39-a3c8-3bb6dab6ac09 |      | fa:16:3e:6e:d8:a2 | {"subnet_id": "d05e862a-6fd1-4586-89ae-03dfa52cbf44", "ip_address": "10.0.0.3"} |   <<<???

| 8324a907-2693-4f8f-9299-e57947f91cb6 |      | fa:16:3e:8d:62:40 | {"subnet_id": "d05e862a-6fd1-4586-89ae-03dfa52cbf44", "ip_address": "10.0.0.2"} |

| 8b747b8d-eb66-4cb9-92ef-c150078c50c7 |      | fa:16:3e:77:21:79 | {"subnet_id": "d05e862a-6fd1-4586-89ae-03dfa52cbf44", "ip_address": "10.0.0.1"} |

+--------------------------------------+------+-------------------+---------------------------------------------------------------------------------+

This port remains after deleting the VM.


localadmin at qa4:~/devstack$ nova delete vm1

Request to delete server vm1 has been accepted.

localadmin at qa4:~/devstack$ nova list

+----+------+--------+------------+-------------+----------+

| ID | Name | Status | Task State | Power State | Networks |

+----+------+--------+------------+-------------+----------+

+----+------+--------+------------+-------------+----------+

localadmin at qa4:~/devstack$ neutron port-list

+--------------------------------------+------+-------------------+---------------------------------------------------------------------------------+

| id                                   | name | mac_address       | fixed_ips                                                                       |

+--------------------------------------+------+-------------------+---------------------------------------------------------------------------------+

| 136c049f-dcfd-4c39-a3c8-3bb6dab6ac09 |      | fa:16:3e:6e:d8:a2 | {"subnet_id": "d05e862a-6fd1-4586-89ae-03dfa52cbf44", "ip_address": "10.0.0.3"} |   <<<???

| 8b747b8d-eb66-4cb9-92ef-c150078c50c7 |      | fa:16:3e:77:21:79 | {"subnet_id": "d05e862a-6fd1-4586-89ae-03dfa52cbf44", "ip_address": "10.0.0.1"} |

+--------------------------------------+------+-------------------+---------------------------------------------------------------------------------+

Now create another VM.  Note that there is only one new port created; no additional port is created as before during the first VM creation.


localadmin at qa4:~/devstack$ nova boot --image cirros-0.3.2-x86_64-uec --flavor 1 --nic net-id=0afb2bd6-38c7-401d-966e-857dd02ba322 vm2

+--------------------------------------+----------------------------------------------------------------+

| Property                             | Value                                                          |

+--------------------------------------+----------------------------------------------------------------+

| OS-DCF:diskConfig                    | MANUAL                                                         |

| OS-EXT-AZ:availability_zone          | nova                                                           |

| OS-EXT-STS:power_state               | 0                                                              |

| OS-EXT-STS:task_state                | scheduling                                                     |

| OS-EXT-STS:vm_state                  | building                                                       |

| OS-SRV-USG:launched_at               | -                                                              |

| OS-SRV-USG:terminated_at             | -                                                              |

| accessIPv4                           |                                                                |

| accessIPv6                           |                                                                |

| adminPass                            | sNAwwHE5AwMw                                                   |

| config_drive                         |                                                                |

| created                              | 2014-10-07T16:54:52Z                                           |

| flavor                               | m1.tiny (1)                                                    |

| hostId                               |                                                                |

| id                                   | c699003a-c88e-48b0-a494-6759399e7fcc                           |

| image                                | cirros-0.3.2-x86_64-uec (0c56933c-1d35-41cc-8771-3c0aa4d7562f) |

| key_name                             | -                                                              |

| metadata                             | {}                                                             |

| name                                 | vm2                                                            |

| os-extended-volumes:volumes_attached | []                                                             |

| progress                             | 0                                                              |

| security_groups                      | default                                                        |

| status                               | BUILD                                                          |

| tenant_id                            | 8eba682471404f389ce727bcbaa41ed2                               |

| updated                              | 2014-10-07T16:54:52Z                                           |

| user_id                              | 2a90bd89402945b2986f0ddd97c13303                               |

+--------------------------------------+----------------------------------------------------------------+

localadmin at qa4:~/devstack$ nova list

+--------------------------------------+------+--------+------------+-------------+------------------+

| ID                                   | Name | Status | Task State | Power State | Networks         |

+--------------------------------------+------+--------+------------+-------------+------------------+

| c699003a-c88e-48b0-a494-6759399e7fcc | vm2  | ACTIVE | -          | Running     | private=10.0.0.4 |

+--------------------------------------+------+--------+------------+-------------+------------------+

localadmin at qa4:~/devstack$ neutron port-list

+--------------------------------------+------+-------------------+---------------------------------------------------------------------------------+

| id                                   | name | mac_address       | fixed_ips                                                                       |

+--------------------------------------+------+-------------------+---------------------------------------------------------------------------------+

| 136c049f-dcfd-4c39-a3c8-3bb6dab6ac09 |      | fa:16:3e:6e:d8:a2 | {"subnet_id": "d05e862a-6fd1-4586-89ae-03dfa52cbf44", "ip_address": "10.0.0.3"} |   <<<???

| 1c00f2ee-43dd-4d47-9844-d40afa7e1e61 |      | fa:16:3e:1c:79:6a | {"subnet_id": "d05e862a-6fd1-4586-89ae-03dfa52cbf44", "ip_address": "10.0.0.4"} |

| 8b747b8d-eb66-4cb9-92ef-c150078c50c7 |      | fa:16:3e:77:21:79 | {"subnet_id": "d05e862a-6fd1-4586-89ae-03dfa52cbf44", "ip_address": "10.0.0.1"} |

+--------------------------------------+------+-------------------+---------------------------------------------------------------------------------+


Is this expected behavior?

Thanks,
Danny
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstack.org/pipermail/openstack/attachments/20141007/d08e311a/attachment.html>


More information about the Openstack mailing list