2024-10-30 13:52:40 |
Alejandro Santoyo Gonzalez |
bug |
|
|
added bug |
2024-10-30 13:59:29 |
Alejandro Santoyo Gonzalez |
description |
When you create a port via OS::Nova::Server, if you only specify a network ID then the extra properties you pass in the template are ignored as per the code below:
heat/engine/resources/openstack/nova/server.py:
handle_create()
\_ _build_nics()
\_ if there's a port in the template then that's used
|_ if there's a subnet in the template then _create_internal_port() is called and the extra props are passed to Neutron
|_ if only a network ID is passed in the template then the port extra properties ni the template (if any) are ignored and the defaults are passed.
Reproducer:
-----------
heat_template_version: 2021-04-16
resources:
server_test:
type: OS::Nova::Server
properties:
name: server_test
config_drive: true
flavor: m1.small
image: "focal"
networks:
- network: test_net
port_extra_properties:
binding:vnic_type: direct
Here is the request body for the API call sent from Heat to Neutron for the above template the network_id is there but not the extra property passed:
/var/log/neutron/neutron-server.log:2024-10-30 12:10:38.439 246121 DEBUG neutron.api.v2.base [req-5ea6e086-cf63-4441-a19a-e785fbcea5dc 3e23d2d4716f972bd4eff30931e2a797fa5b0e355ef4d5b05bee2212e156b40a e964739be53f40d0b3862aad6cff8732 - 198a7a588d7c4edb880789e342ec3d03 198a7a588d7c4edb880789e342ec3d03] Request body: {'port': {'device_id': '6bdf1f2b-fc39-4c56-bde6-beffd08ff0e6', 'network_id': '78637385-b2cc-41ae-8d5c-0ed94ccd12df', 'admin_state_up': True, 'tenant_id': 'e964739be53f40d0b3862aad6cff8732'}} prepare_request_body /usr/lib/python3/dist-packages/neutron/api/v2/base.py:730 |
When you create a port via OS::Nova::Server, if you only specify a network ID then the extra properties you pass in the template are ignored as per the code below:
heat/engine/resources/openstack/nova/server.py:
handle_create()
\_ _build_nics()
\_ if there's a port in the template then that's used
|_ if there's a subnet in the template then _create_internal_port() is called and the extra props are passed to Neutron
|_ if only a network ID is passed in the template then the port extra properties ni the template (if any) are ignored and the defaults are passed.
Reproducer:
-----------
heat_template_version: 2021-04-16
resources:
server_test:
type: OS::Nova::Server
properties:
name: server_test
config_drive: true
flavor: m1.small
image: "focal"
networks:
- network: test_net
port_extra_properties:
binding:vnic_type: direct
Here is the request body for the API call sent from Heat to Neutron for the above template the network_id is there but not the extra property passed:
/var/log/neutron/neutron-server.log:2024-10-30 12:10:38.439 246121 DEBUG neutron.api.v2.base [req-5ea6e086-cf63-4441-a19a-e785fbcea5dc 3e23d2d4716f972bd4eff30931e2a797fa5b0e355ef4d5b05bee2212e156b40a e964739be53f40d0b3862aad6cff8732 - 198a7a588d7c4edb880789e342ec3d03 198a7a588d7c4edb880789e342ec3d03] Request body: {'port': {'device_id': '6bdf1f2b-fc39-4c56-bde6-beffd08ff0e6', 'network_id': '78637385-b2cc-41ae-8d5c-0ed94ccd12df', 'admin_state_up': True, 'tenant_id': 'e964739be53f40d0b3862aad6cff8732'}} prepare_request_body /usr/lib/python3/dist-packages/neutron/api/v2/base.py:730
I believe we should be calling _create_internal_port() when only a network ID is passed in the templates, as we already do when a subnet is passed. The rationale is that either way we're creating a port so I see no reason why we should not follow the same path. |
|
2024-10-30 14:12:25 |
Arif Ali |
bug |
|
|
added subscriber Arif Ali |
2024-10-30 16:17:30 |
Alejandro Santoyo Gonzalez |
description |
When you create a port via OS::Nova::Server, if you only specify a network ID then the extra properties you pass in the template are ignored as per the code below:
heat/engine/resources/openstack/nova/server.py:
handle_create()
\_ _build_nics()
\_ if there's a port in the template then that's used
|_ if there's a subnet in the template then _create_internal_port() is called and the extra props are passed to Neutron
|_ if only a network ID is passed in the template then the port extra properties ni the template (if any) are ignored and the defaults are passed.
Reproducer:
-----------
heat_template_version: 2021-04-16
resources:
server_test:
type: OS::Nova::Server
properties:
name: server_test
config_drive: true
flavor: m1.small
image: "focal"
networks:
- network: test_net
port_extra_properties:
binding:vnic_type: direct
Here is the request body for the API call sent from Heat to Neutron for the above template the network_id is there but not the extra property passed:
/var/log/neutron/neutron-server.log:2024-10-30 12:10:38.439 246121 DEBUG neutron.api.v2.base [req-5ea6e086-cf63-4441-a19a-e785fbcea5dc 3e23d2d4716f972bd4eff30931e2a797fa5b0e355ef4d5b05bee2212e156b40a e964739be53f40d0b3862aad6cff8732 - 198a7a588d7c4edb880789e342ec3d03 198a7a588d7c4edb880789e342ec3d03] Request body: {'port': {'device_id': '6bdf1f2b-fc39-4c56-bde6-beffd08ff0e6', 'network_id': '78637385-b2cc-41ae-8d5c-0ed94ccd12df', 'admin_state_up': True, 'tenant_id': 'e964739be53f40d0b3862aad6cff8732'}} prepare_request_body /usr/lib/python3/dist-packages/neutron/api/v2/base.py:730
I believe we should be calling _create_internal_port() when only a network ID is passed in the templates, as we already do when a subnet is passed. The rationale is that either way we're creating a port so I see no reason why we should not follow the same path. |
When you create a port via OS::Nova::Server, if you only specify a network ID then the extra properties you pass in the template are ignored as per the code below:
heat/engine/resources/openstack/nova/server.py:
handle_create()
\_ _build_nics()
\_ if there's a port in the template then that's used
|_ if there's a subnet in the template then _create_internal_port() is called and the extra props are passed to Neutron
|_ if only a network ID is passed in the template then the port extra properties ni the template (if any) are ignored and the defaults are passed.
Reproducer:
-----------
heat_template_version: 2021-04-16
resources:
server_test:
type: OS::Nova::Server
properties:
name: server_test
config_drive: true
flavor: m1.small
image: "focal"
networks:
- network: test_net
port_extra_properties:
binding:vnic_type: direct
Here is the request body for the API call sent from Heat to Neutron for the above template the network_id is there but not the extra property passed:
/var/log/neutron/neutron-server.log:2024-10-30 12:10:38.439 246121 DEBUG neutron.api.v2.base [req-5ea6e086-cf63-4441-a19a-e785fbcea5dc 3e23d2d4716f972bd4eff30931e2a797fa5b0e355ef4d5b05bee2212e156b40a e964739be53f40d0b3862aad6cff8732 - 198a7a588d7c4edb880789e342ec3d03 198a7a588d7c4edb880789e342ec3d03] Request body: {'port': {'device_id': '6bdf1f2b-fc39-4c56-bde6-beffd08ff0e6', 'network_id': '78637385-b2cc-41ae-8d5c-0ed94ccd12df', 'admin_state_up': True, 'tenant_id': 'e964739be53f40d0b3862aad6cff8732'}} prepare_request_body /usr/lib/python3/dist-packages/neutron/api/v2/base.py:730
I believe we should be calling _create_internal_port() when only a network ID is passed in the templates, as we already do when a subnet is passed. The rationale is that either way we're creating a port wth no IP, so I see no reason why we should not follow the same path. |
|
2024-10-30 16:17:44 |
Alejandro Santoyo Gonzalez |
description |
When you create a port via OS::Nova::Server, if you only specify a network ID then the extra properties you pass in the template are ignored as per the code below:
heat/engine/resources/openstack/nova/server.py:
handle_create()
\_ _build_nics()
\_ if there's a port in the template then that's used
|_ if there's a subnet in the template then _create_internal_port() is called and the extra props are passed to Neutron
|_ if only a network ID is passed in the template then the port extra properties ni the template (if any) are ignored and the defaults are passed.
Reproducer:
-----------
heat_template_version: 2021-04-16
resources:
server_test:
type: OS::Nova::Server
properties:
name: server_test
config_drive: true
flavor: m1.small
image: "focal"
networks:
- network: test_net
port_extra_properties:
binding:vnic_type: direct
Here is the request body for the API call sent from Heat to Neutron for the above template the network_id is there but not the extra property passed:
/var/log/neutron/neutron-server.log:2024-10-30 12:10:38.439 246121 DEBUG neutron.api.v2.base [req-5ea6e086-cf63-4441-a19a-e785fbcea5dc 3e23d2d4716f972bd4eff30931e2a797fa5b0e355ef4d5b05bee2212e156b40a e964739be53f40d0b3862aad6cff8732 - 198a7a588d7c4edb880789e342ec3d03 198a7a588d7c4edb880789e342ec3d03] Request body: {'port': {'device_id': '6bdf1f2b-fc39-4c56-bde6-beffd08ff0e6', 'network_id': '78637385-b2cc-41ae-8d5c-0ed94ccd12df', 'admin_state_up': True, 'tenant_id': 'e964739be53f40d0b3862aad6cff8732'}} prepare_request_body /usr/lib/python3/dist-packages/neutron/api/v2/base.py:730
I believe we should be calling _create_internal_port() when only a network ID is passed in the templates, as we already do when a subnet is passed. The rationale is that either way we're creating a port wth no IP, so I see no reason why we should not follow the same path. |
When you create a port via OS::Nova::Server, if you only specify a network ID then the extra properties you pass in the template are ignored as per the code below:
heat/engine/resources/openstack/nova/server.py:
handle_create()
\_ _build_nics()
\_ if there's a port in the template then that's used
|_ if there's a subnet in the template then _create_internal_port() is called and the extra props are passed to Neutron
|_ if only a network ID is passed in the template then the port extra properties ni the template (if any) are ignored and the defaults are passed.
Reproducer:
-----------
heat_template_version: 2021-04-16
resources:
server_test:
type: OS::Nova::Server
properties:
name: server_test
config_drive: true
flavor: m1.small
image: "focal"
networks:
- network: test_net
port_extra_properties:
binding:vnic_type: direct
Here is the request body for the API call sent from Heat to Neutron for the above template the network_id is there but not the extra property passed:
/var/log/neutron/neutron-server.log:2024-10-30 12:10:38.439 246121 DEBUG neutron.api.v2.base [req-5ea6e086-cf63-4441-a19a-e785fbcea5dc 3e23d2d4716f972bd4eff30931e2a797fa5b0e355ef4d5b05bee2212e156b40a e964739be53f40d0b3862aad6cff8732 - 198a7a588d7c4edb880789e342ec3d03 198a7a588d7c4edb880789e342ec3d03] Request body: {'port': {'device_id': '6bdf1f2b-fc39-4c56-bde6-beffd08ff0e6', 'network_id': '78637385-b2cc-41ae-8d5c-0ed94ccd12df', 'admin_state_up': True, 'tenant_id': 'e964739be53f40d0b3862aad6cff8732'}} prepare_request_body /usr/lib/python3/dist-packages/neutron/api/v2/base.py:730
I believe we should be calling _create_internal_port() when only a network ID is passed in the templates, as we already do when a subnet is passed. The rationale is that either way we're creating a port with no IP, so I see no reason why we should not follow the same path. |
|
2024-10-31 11:29:04 |
Brian Haley |
bug |
|
|
added subscriber Brian Haley |