not update request_spec.request_networks after attach or detach interface

Bug #1754543 reported by yangyegang
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Invalid
Undecided
Deepak Mourya

Bug Description

i attach a port to vm ,but request_spec.request_networks did not update. port_id of request_spec.request_networks is null.

"request_networks": {
   "nova_object.version": "1.1",
   "nova_object.changes": ["objects"],
   "nova_object.name": "NetworkRequestList",
   "nova_object.data": {
    "objects": [{
     "nova_object.version": "1.2",
     "nova_object.changes": ["network_id", "pci_request_id", "tag", "port_id", "address"],
     "nova_object.name": "NetworkRequest",
     "nova_object.data": {
      "network_id": "90ba0584-b2b7-4f6a-b862-f77864d8626f",
      "pci_request_id": null,
      "tag": null,
      "port_id": null,
      "address": null
     },
     "nova_object.namespace": "nova"
    }]
   },
   "nova_object.namespace": "nova"
  },

Changed in nova:
assignee: nobody → Deepak Mourya (mourya007)
Revision history for this message
Deepak Mourya (mourya007) wrote :

hi, after created instance and attach interface using servers/{server_id}/os-interface api i could not any information related with the request_networks in the request_specs table (nova_api database).
Can you help me to reproduce the same ??

Revision history for this message
yangyegang (yang-yegang) wrote :

i hope request_spec.request_networks.network_id is null after detach all port.but ,now the network_id still exist.
you can detach all ports of instance to reproduce it.

Revision history for this message
Deepak Mourya (mourya007) wrote :

i have detached all the ports from the instance , but where did you find the request_spec.request_networks.network_id .

 openstack server list
+--------------------------------------+---------+--------+----------+--------------------------+---------+
| ID | Name | Status | Networks | Image | Flavor |
+--------------------------------------+---------+--------+----------+--------------------------+---------+
| 7d746637-57ef-4fa8-a9f0-aba500229bb3 | test_vm | ACTIVE | | cirros-0.3.5-x86_64-disk | m1.tiny |
+--------------------------------------+---------+--------+----------+--------------------------+---------+
for this result , yes network is removed.

can you locate me the request_spec.request_networks ?

Revision history for this message
yangyegang (yang-yegang) wrote :

you can see the network_id in the value spec of request_specs table( nova-api database). after detach all port the network_id should be null i think,but it not change.

Revision history for this message
Deepak Mourya (mourya007) wrote :

Steps i have performed for the same :

1. created Vm and then detach all ports from the same.
2. use nova_api database ;
3. use request_specs table

But i could not get anything term related with network_id , port etc.

Note : i have checked this in Queen and Pike both.

Revision history for this message
yangyegang (yang-yegang) wrote :

network_id should be null after detach all ports.but it is not.
"nova_object.data": {
                          "network_id": "90ba0584-b2b7-4f6a-b862-f77864d8626f",

Revision history for this message
Deepak Mourya (mourya007) wrote :

Can you please share me your environment details where you are suing this (openstack version). ?

Revision history for this message
yangyegang (yang-yegang) wrote :

my openstack version is pike

Revision history for this message
Deepak Mourya (mourya007) wrote :

I have performed some steps to reproduce the same , correct me where something is missing:

Note : pike version

1. Detach port from the VM.
 +--------------------------------------+------+--------+----------+--------------------------+---------+
| ID | Name | Status | Networks | Image | Flavor |
+--------------------------------------+------+--------+----------+--------------------------+---------+
| 2d95e803-744f-4910-9b52-e7725b4e9d8e | test | ACTIVE | | cirros-0.3.5-x86_64-disk | m1.tiny |
+--------------------------------------+------+--------+----------+--------------------------+---------+

2. Select * from request_specs ;
I could not get the requisite network object here. I have attached the output of my table.

Revision history for this message
Deepak Mourya (mourya007) wrote :

I have use Pike Version of openstack and the checked the same but request_specs table cannot include requested_network .

 request_specs
[RequestSpec(availability_zone=None,flavor=Flavor(6),force_hosts=None,force_nodes=None,id=12,ignore_hosts=None,image=ImageMeta(8913ec9e-0378-4284-a795-165536d9d986),instance_group=None,instance_uuid=a2db5724-fc08-467b-922d-60e9d86fdf24,limits=SchedulerLimits,num_instances=1,numa_topology=None,pci_requests=InstancePCIRequests,project_id='cb4b235dc1b94e65b3f99a15f5418a7e',requested_destination=None,retry=None,scheduler_hints={},security_groups=SecurityGroupList)]

May be this is why network is not there.

Revision history for this message
yangyegang (yang-yegang) wrote :
Download full text (4.4 KiB)

i reproduce it,after i detach posrt, spec of request_sepcs table still have information of network_id(e2a254e5-7cbc-4cd5-8766-d3403156a937). i think network_id should be null after all ports of net be detached.

nova interface-list testyj
+------------+--------------------------------------+--------------------------------------+--------------+-------------------+
| Port State | Port ID | Net ID | IP addresses | MAC Addr |
+------------+--------------------------------------+--------------------------------------+--------------+-------------------+
| ACTIVE | 25dcdba2-61e7-4430-8abe-0f9a715e608a | e2a254e5-7cbc-4cd5-8766-d3403156a937 | 192.168.0.3 | fa:16:3e:68:f4:34 |
+------------+--------------------------------------+--------------------------------------+--------------+-------------------+

nova interface-detach 789691df-64af-4bf1-a4b6-269bbf63d991 25dcdba2-61e7-4430-8abe-0f9a715e608a

spec of
{"nova_object.version": "1.10", "nova_object.changes": ["instance_uuid", "requested_destination", "retry", "num_instances", "pci_requests", "limits", "availability_zone", "force_nodes", "image", "instance_group", "force_hosts", "project_id", "numa_topology", "server_group", "flavor", "request_networks", "scheduler_hints", "security_groups", "ignore_hosts"], "nova_object.name": "RequestSpec", "nova_object.data": {"requested_destination": null, "instance_uuid": "789691df-64af-4bf1-a4b6-269bbf63d991", "project_id": "378c52f097cb4823868fdcc3321d0717", "retry": null, "num_instances": 1, "pci_requests": {"nova_object.version": "1.1", "nova_object.changes": ["requests"], "nova_object.name": "InstancePCIRequests", "nova_object.data": {"requests": []}, "nova_object.namespace": "nova"}, "limits": {"nova_object.version": "1.0", "nova_object.changes": ["vcpu", "memory_mb", "numa_topology", "disk_gb"], "nova_object.name": "SchedulerLimits", "nova_object.data": {"vcpu": null, "memory_mb": null, "disk_gb": null, "numa_topology": null}, "nova_object.namespace": "nova"}, "availability_zone": null, "force_nodes": null, "image": {"nova_object.version": "1.8", "nova_object.changes": ["status", "name", "container_format", "created_at", "disk_format", "updated_at", "properties", "owner", "min_ram", "checksum", "min_disk", "id", "size"], "nova_object.name": "ImageMeta", "nova_object.data": {"status": "active", "created_at": "2018-03-16T02:26:59Z", "name": "cgsl_qga", "container_format": "bare", "min_ram": 0, "disk_format": "raw", "updated_at": "2018-03-16T02:27:31Z", "id": "b6a89463-f719-4daf-aeed-9e69c7b57f41", "min_disk": 0, "checksum": "75bee65da50a730a8f6c8f7cbe4edd55", "owner": "378c52f097cb4823868fdcc3321d0717", "properties": {"nova_object.version": "1.23", "nova_object.name": "ImageMetaProps", "nova_object.data": {}, "nova_object.namespace": "nova"}, "size": 2810445824}, "nova_object.namespace": "nova"}, "instance_group": null, "force_hosts": null, "ignore_hosts": null, "numa_topology": null, "server_group": null, "flavor": {"nova_object.version": "1.2", "nova_object.name": "Flavor", "nova_object.data": {"disabled": false, "root_gb": 40, "description": null, "flavorid": "61b4e182-0305-4273-b...

Read more...

Revision history for this message
Deepak Mourya (mourya007) wrote :
Download full text (3.9 KiB)

I have done the following steps for reproducing it :

Configurations :
Devstack pike setup .

Steps for reproducing :

1. nova interface-list a28341e8-76a5-4c8c-9a31-6d2c66a3a685

2. nova interface-detach a28341e8-76a5-4c8c-9a31-6d2c66a3a685 c9c2c8a2-c055-4f78-9271-e225a714a17d

3. openstack server list
+--------------------------------------+----------+--------+----------+--------------------------+---------+
| ID | Name | Status | Networks | Image | Flavor |
+--------------------------------------+----------+--------+----------+--------------------------+---------+
| a28341e8-76a5-4c8c-9a31-6d2c66a3a685 | test_vm7 | ACTIVE | | cirros-0.3.5-x86_64-disk | m1.tiny |

4. mysql request_specs table

| 2018-03-19 04:08:32 | NULL | 13 | a28341e8-76a5-4c8c-9a31-6d2c66a3a685 | {"nova_object.version": "1.8", "nova_object.changes": ["requested_destination", "instance_uuid", "retry", "num_instances", "pci_requests", "limits", "availability_zone", "force_nodes", "image", "instance_group", "force_hosts", "numa_topology", "ignore_hosts", "flavor", "project_id", "security_groups", "scheduler_hints"], "nova_object.name": "RequestSpec", "nova_object.data": {"requested_destination": null, "instance_uuid": "a28341e8-76a5-4c8c-9a31-6d2c66a3a685", "retry": null, "num_instances": 1, "pci_requests": {"nova_object.version": "1.1", "nova_object.changes": ["requests"], "nova_object.name": "InstancePCIRequests", "nova_object.data": {"requests": []}, "nova_object.namespace": "nova"}, "limits": {"nova_object.version": "1.0", "nova_object.changes": ["vcpu", "memory_mb", "disk_gb", "numa_topology"], "nova_object.name": "SchedulerLimits", "nova_object.data": {"vcpu": null, "memory_mb": null, "disk_gb": null, "numa_topology": null}, "nova_object.namespace": "nova"}, "availability_zone": null, "force_nodes": null, "image": {"nova_object.version": "1.8", "nova_object.changes": ["status", "name", "container_format", "created_at", "disk_format", "updated_at", "id", "min_disk", "min_ram", "checksum", "owner", "properties", "size"], "nova_object.name": "ImageMeta", "nova_object.data": {"status": "active", "created_at": "2018-03-15T10:41:29Z", "name": "cirros-0.3.5-x86_64-disk", "container_format": "bare", "min_ram": 0, "disk_format": "qcow2", "updated_at": "2018-03-15T10:41:30Z", "id": "8913ec9e-0378-4284-a795-165536d9d986", "min_disk": 0, "checksum": "f8ab98ff5e73ebab884d80c9dc9c7290", "owner": "cb4b235dc1b94e65b3f99a15f5418a7e", "properties": {"nova_object.version": "1.19", "nova_object.name": "ImageMetaProps", "nova_object.data": {}, "nova_object.namespace": "nova"}, "size": 13267968}, "nova_object.namespace": "nova"}, "instance_group": null, "force_hosts": null, "numa_topology": null, "ignore_hosts": null, "flavor": {"nova_object.version": "1.1", "nova_object.name": "Flavor", "nova_object.data": {"disabled": false, "root_gb": 1, "name": "m1.tiny", "flavorid": "1", "deleted": false, "created_at": "2018-03-15T10:42:34Z", "ephemeral_gb": 0, "updated_at": null, "memory_mb": 512, "vcpus": 1, "extra_specs": {}, "swap": 0, "rxtx_factor": 1.0, "is_public": true, "deleted_at": null, "vcpu_weight": 0, "id": 6}...

Read more...

Revision history for this message
yangyegang (yang-yegang) wrote :

I checked Pike version andthe version of my environment. the pike really have no request_network。You can ignore this problem。 I'm sorry

Revision history for this message
Matt Riedemann (mriedem) wrote :

The request spec is to track the initial server create request, not to be a complete mirror of everything that has ever happened to the instance, like when volumes and ports are attached to it.

I don't see how this is a bug - what end-user issue do you have as a result of this?

Changed in nova:
status: New → Invalid
Revision history for this message
Deepak Mourya (mourya007) wrote :

Yes , recently i have also checked this bug on the master branch but could not find the result as per the issue specified here.

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.