Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Delete L2 Failed: no matching network device was found #85

Closed
youyk opened this issue Jul 31, 2015 · 2 comments
Closed

Delete L2 Failed: no matching network device was found #85

youyk opened this issue Jul 31, 2015 · 2 comments
Labels
Milestone

Comments

@youyk
Copy link
Contributor

youyk commented Jul 31, 2015

QueryL2Network uuid=124d53061a6c4a62b78d7ed972af0bac
{
"inventories": [
{
"attachedClusterUuids": [
"f7d1ab2513b140d4a9977e25860d87d4",
"9d116a837f024c09b686aff0a4820e00"
],
"createDate": "Jul 31, 2015 12:19:34 PM",
"description": "guest l2 vlan network 2",
"lastOpDate": "Jul 31, 2015 12:19:34 PM",
"name": "vlan-test-port-forwarding",
"physicalInterface": "eth0",
"type": "L2VlanNetwork",
"uuid": "124d53061a6c4a62b78d7ed972af0bac",
"vlan": 22,
"zoneUuid": "2659582934fa43048eafa20312d7d664"
}
],
"success": true
}

2015-07-31 19:48:05,186 DEBUG [apibinding.api] async call[url: http://10.0.101.20:8080/zstack/api/, request: {"org.zstack.header.network.l2.APIDeleteL2NetworkMsg": {"session": {"uuid": "da4f23f5f2914880abcd16336bebf6b8"}, "sessionUuid": "da4f23f5f2914880abcd16336bebf6b8", "timeout": 300000, "uuid": "124d53061a6c4a62b78d7ed972af0bac"}}]
2015-07-31 19:48:44,432 DEBUG [apibinding.api] async call[url: http://10.0.101.20:8080/zstack/api/, response: {"org.zstack.header.network.l2.APIDeleteL2NetworkEvent":{"success":false,"error":{"code":"SYS.1004","description":"Unable to delete a resource","details":"operation failed: no matching network device was found","cause":{"code":"SYS.1006","description":"An operation failed","details":"operation failed: no matching network device was found"}}}}] after 39000ms

2015-07-31 19:48:44,238 DEBUG SimpleFlowChain [FlowChain: detachNic-vm-3d71505bec144000b2889a069e280ccb-nic-1ad83c79ef8941c1b21a8da6736e06f0] start to rollback
2015-07-31 19:48:44,238 DEBUG SimpleFlowChain [FlowChain: detachNic-vm-3d71505bec144000b2889a069e280ccb-nic-1ad83c79ef8941c1b21a8da6736e06f0] start to rollback flow[VmDetachNicOnHypervisorFlow]
2015-07-31 19:48:44,238 DEBUG SimpleFlowChain [FlowChain: detachNic-vm-3d71505bec144000b2889a069e280ccb-nic-1ad83c79ef8941c1b21a8da6736e06f0] rolled back all flows because errorErrorCode [code = SYS.1006, description = An operation failed, details = operation failed: no matching network device was found]
2015-07-31 19:48:44,239 TRACE CloudBusImpl2 [msg send]: {"org.zstack.header.vm.DetachNicFromVmReply":{"success":false,"error":{"code":"SYS.1006","description":"An operation failed","details":"operation failed: no matching network device was found"},"headers":{"isReply":"true","correlationId":"699fd1fa65984d4286df09766455d6c4","schema":{}},"id":"bad9c837c0a34148974fc9627f52cb1f","serviceId":"zstack.message.cloudbus.127b3926e5c042ef98f8362148253563","creatingTime":1438343285268}}
2015-07-31 19:48:44,239 TRACE CloudBusImpl2 [msg received]: {"org.zstack.header.vm.DetachNicFromVmReply":{"success":false,"error":{"code":"SYS.1006","description":"An operation failed","details":"operation failed: no matching network device was found"},"headers":{"isReply":"true","correlationId":"699fd1fa65984d4286df09766455d6c4","schema":{}},"id":"bad9c837c0a34148974fc9627f52cb1f","serviceId":"zstack.message.cloudbus.127b3926e5c042ef98f8362148253563","creatingTime":1438343285268}}

@youyk youyk added the bug label Jul 31, 2015
@youyk youyk added this to the 0.8 milestone Jul 31, 2015
@youyk
Copy link
Contributor Author

youyk commented Jul 31, 2015

More logs from zstack-kvm.log, when delete L2 (it looks like the net device was tried to be detached for several times and the last time was failed because of previous detach success. But the last failed detach action raise exception to zstack and cause delete l2 failed.):

2015-07-31 23:06:35,811 DEBUG [vm_plugin] detaching nic:

DEBUG:vm_plugin:detaching nic:

2015-07-31 23:06:55,051 DEBUG [vm_plugin] detaching nic:

DEBUG:vm_plugin:detaching nic:

2015-07-31 23:06:55,311 DEBUG [zstacklib.utils.http] async http call[task uuid: c37198384f83465481c10712e1745fe2], body: {}
2015-07-31 23:06:55,311 DEBUG [zstacklib.utils.http] async http call[task uuid: c37198384f83465481c10712e1745fe2], body: {}
2015-07-31 23:06:55,311 DEBUG [zstacklib.utils.http] async http call[task uuid: c37198384f83465481c10712e1745fe2], body: {}
DEBUG:zstacklib.utils.http:async http call[task uuid: c37198384f83465481c10712e1745fe2], body: {}
INFO:urllib3.connectionpool:Starting new HTTP connection (1): 10.0.101.20
2015-07-31 23:06:55,316 INFO [zstacklib.utils.http] 10.1.101.20 - - [31/Jul/2015:23:06:55] "POST /host/ping HTTP/1.1" 200 - "" "Java/1.7.0_75"
2015-07-31 23:06:55,316 INFO [zstacklib.utils.http] 10.1.101.20 - - [31/Jul/2015:23:06:55] "POST /host/ping HTTP/1.1" 200 - "" "Java/1.7.0_75"
2015-07-31 23:06:55,316 INFO [zstacklib.utils.http] 10.1.101.20 - - [31/Jul/2015:23:06:55] "POST /host/ping HTTP/1.1" 200 - "" "Java/1.7.0_75"
INFO:zstacklib.utils.http:10.1.101.20 - - [31/Jul/2015:23:06:55] "POST /host/ping HTTP/1.1" 200 - "" "Java/1.7.0_75"
DEBUG:urllib3.connectionpool:"POST /zstack/asyncrest/callback HTTP/1.1" 200 0
2015-07-31 23:06:55,328 DEBUG [zstacklib.utils.http] async http call[task uuid: eef0e16083914a8e9ba9a67674d6a4e1], body: {}
2015-07-31 23:06:55,328 DEBUG [zstacklib.utils.http] async http call[task uuid: eef0e16083914a8e9ba9a67674d6a4e1], body: {}
2015-07-31 23:06:55,328 DEBUG [zstacklib.utils.http] async http call[task uuid: eef0e16083914a8e9ba9a67674d6a4e1], body: {}
DEBUG:zstacklib.utils.http:async http call[task uuid: eef0e16083914a8e9ba9a67674d6a4e1], body: {}
2015-07-31 23:06:55,330 INFO [zstacklib.utils.http] 10.1.101.20 - - [31/Jul/2015:23:06:55] "POST /vm/vmsync HTTP/1.1" 200 - "" "Java/1.7.0_75"
2015-07-31 23:06:55,330 INFO [zstacklib.utils.http] 10.1.101.20 - - [31/Jul/2015:23:06:55] "POST /vm/vmsync HTTP/1.1" 200 - "" "Java/1.7.0_75"
2015-07-31 23:06:55,330 INFO [zstacklib.utils.http] 10.1.101.20 - - [31/Jul/2015:23:06:55] "POST /vm/vmsync HTTP/1.1" 200 - "" "Java/1.7.0_75"
INFO:zstacklib.utils.http:10.1.101.20 - - [31/Jul/2015:23:06:55] "POST /vm/vmsync HTTP/1.1" 200 - "" "Java/1.7.0_75"
INFO:urllib3.connectionpool:Starting new HTTP connection (1): 10.0.101.20
DEBUG:urllib3.connectionpool:"POST /zstack/asyncrest/callback HTTP/1.1" 200 0
2015-07-31 23:07:00,063 DEBUG [vm_plugin] detaching nic:

DEBUG:vm_plugin:detaching nic:

2015-07-31 23:07:05,070 WARNING [kvmagent.kvmagent] operation failed: no matching network device was found
Traceback (most recent call last):
File "/var/lib/zstack/virtualenv/kvm/lib/python2.6/site-packages/kvmagent/kvmagent.py", line 134, in wrap
return func(_args, *_kwargs)
File "/var/lib/zstack/virtualenv/kvm/lib/python2.6/site-packages/kvmagent/plugins/vm_plugin.py", line 1317, in detach_nic
vm.detach_nic(cmd)
File "/var/lib/zstack/virtualenv/kvm/lib/python2.6/site-packages/kvmagent/plugins/vm_plugin.py", line 992, in detach_nic
self._detach_nic(cmd)
File "/var/lib/zstack/virtualenv/kvm/lib/python2.6/site-packages/zstacklib/utils/linux.py", line 62, in inner
raise exception
libvirtError: operation failed: no matching network device was found

args:[(<vm_plugin.VmPlugin object at 0x2944190>,
{'body': '{"vmUuid":"91359006ac7a46c79b91f271e4f01455","nic":{"mac":"fa:2b:17:75:97:00","bridgeName":"br_eth0_22","nicInternalName":"vnic26.0","deviceId":0,"metaData":"22","useVirtio":true}}',

@zxwing
Copy link
Contributor

zxwing commented Aug 1, 2015

fixed in 843161f

@zxwing zxwing closed this as completed Aug 1, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants