You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by GitBox <gi...@apache.org> on 2021/11/04 15:14:53 UTC

[GitHub] [cloudstack] div8cn opened a new issue #5499: Failed to add NIC to VM concurrently

div8cn opened a new issue #5499:
URL: https://github.com/apache/cloudstack/issues/5499


   <!--
   Verify first that your issue/request is not already reported on GitHub.
   Also test if the latest release and main branch are affected too.
   Always add information AFTER of these HTML comments, but no need to delete the comments.
   -->
   
   ##### ISSUE TYPE
   <!-- Pick one below and delete the rest -->
    * Bug Report
   
   
   ##### COMPONENT NAME
   <!--
   Categorize the issue, e.g. API, VR, VPN, UI, etc.
   -->
   ~~~
   NIC
   ~~~
   
   ##### CLOUDSTACK VERSION
   <!--
   New line separated list of affected versions, commit ID for issues on main branch.
   -->
   
   ~~~
   4.15.0.0
   ~~~
   
   ##### CONFIGURATION
   <!--
   Information about the configuration if relevant, e.g. basic network, advanced networking, etc.  N/A otherwise
   -->
   
   
   ##### OS / ENVIRONMENT
   <!--
   Information about the environment if relevant, N/A otherwise
   -->
   
   
   ##### SUMMARY
   <!-- Explain the problem/feature briefly -->
   
   Add multiple ShareNetwork to VM at the same time, only the first job can execute successfully;
   
   All subsequent addition of nic job shows that the execution is successful, but it is not actually added to the VM NICS
   
   
   ##### STEPS TO REPRODUCE
   <!--
   For bugs, show exactly how to reproduce the problem, using a minimal test-case. Use Screenshots if accurate.
   
   For new features, show how the feature would be used.
   -->
   
   <!-- Paste example playbooks or commands between quotes below -->
   ~~~
   1. create l3 sharenetwork,name=L3-network-01
   2. create l3 sharenetwork,name=L3-network-02
   3. create l3 sharenetwork,name=L3-network-03
   4. deploy vm use L3-network-01, VM NAME=VM1
   5. wait for vm status = RUNNING
   6. use api addNicToVirtualMachine to add L3-network-02 and L3-network-03 to VM1 (concurrently)
   ~~~
   
   <!-- You can also paste gist.github.com links for larger files -->
   
   ##### EXPECTED RESULTS
   <!-- What did you expect to happen when running the steps above? -->
   
   ~~~
   Add L3-network-02 to VM1 task execution successfully.
   Add L3-network-02 to VM1 task execution successfully.
   
   VM1 has 3 networks (L3-network-01, L3-network-02, L3-network-03)
   ~~~
   
   ##### ACTUAL RESULTS
   <!-- What actually happened? -->
   
   <!-- Paste verbatim command output between quotes below -->
   ~~~
   Add L3-network-02 to VM1 job and return success.
   Add L3-network-03 to VM1job and return success.
   
   VM1 has a total of 2 network (L3-network-01, L3-network-02)
   
   There is no network L3-network-03 in VM(VM1)->NICS, but the task shows that the addition is successful.
   ~~~
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [cloudstack] DaanHoogland commented on issue #5499: Failed to add NIC to VM concurrently

Posted by GitBox <gi...@apache.org>.
DaanHoogland commented on issue #5499:
URL: https://github.com/apache/cloudstack/issues/5499#issuecomment-929029998






-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [cloudstack] rhtyd commented on issue #5499: Failed to add NIC to VM concurrently

Posted by GitBox <gi...@apache.org>.
rhtyd commented on issue #5499:
URL: https://github.com/apache/cloudstack/issues/5499#issuecomment-925251415


   cc @nvazquez @sureshanaparti pl triage


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [cloudstack] nvazquez commented on issue #5499: Failed to add NIC to VM concurrently

Posted by GitBox <gi...@apache.org>.
nvazquez commented on issue #5499:
URL: https://github.com/apache/cloudstack/issues/5499#issuecomment-929318294


   @div8cn can you test the latest main branch and see if the issue persists?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [cloudstack] div8cn commented on issue #5499: Failed to add NIC to VM concurrently

Posted by GitBox <gi...@apache.org>.
div8cn commented on issue #5499:
URL: https://github.com/apache/cloudstack/issues/5499#issuecomment-927980106


   I use java to directly access cloudstack api


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [cloudstack] div8cn commented on issue #5499: Failed to add NIC to VM concurrently

Posted by GitBox <gi...@apache.org>.
div8cn commented on issue #5499:
URL: https://github.com/apache/cloudstack/issues/5499#issuecomment-929347966


   Thanks for your verification


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [cloudstack] DaanHoogland commented on issue #5499: Failed to add NIC to VM concurrently

Posted by GitBox <gi...@apache.org>.
DaanHoogland commented on issue #5499:
URL: https://github.com/apache/cloudstack/issues/5499#issuecomment-929345903


   you are right @div8cn with four (4) nets, I could reproduce the issue.
   cc @nvazquez @weizhouapache 


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [cloudstack] DaanHoogland commented on issue #5499: Failed to add NIC to VM concurrently

Posted by GitBox <gi...@apache.org>.
DaanHoogland commented on issue #5499:
URL: https://github.com/apache/cloudstack/issues/5499#issuecomment-933281424


   > I merged Patch to 4.15.0.0, adding multiple NICs to VM (vm nic total >4) the problem still exists
   
   hm, too bad, I managed to reproduce and solve the issue. Can you provide more info, please @div8cn ?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [cloudstack] DaanHoogland commented on issue #5499: Failed to add NIC to VM concurrently

Posted by GitBox <gi...@apache.org>.
DaanHoogland commented on issue #5499:
URL: https://github.com/apache/cloudstack/issues/5499#issuecomment-929335127


   I have tested this with a slightly different scenario then you and @weizhouapache , @div8cn , starting them in a loop in the background and also in my case the vm gets nic assigned for each network.
   ```
   # for i in 072efd74-744d-47b7-a2ca-8befc75fde45  fd288f34-5ea1-4432-806f-3a809d0860a1
   > do
   >   cmk add nictovirtualmachine virtualmachineid=70968c7b-2662-46e9-8ba3-e34dd9e32836 networkid=$i &
   > done
   ```
   Maybe there is a network or storage issue adding to the cocktail?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [cloudstack] nvazquez commented on issue #5499: Failed to add NIC to VM concurrently

Posted by GitBox <gi...@apache.org>.
nvazquez commented on issue #5499:
URL: https://github.com/apache/cloudstack/issues/5499#issuecomment-927890409


   @div8cn how are you testing the APIs to ensure they are executed at the same time? Are you able to reproduce the issue again?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [cloudstack] div8cn commented on issue #5499: Failed to add NIC to VM concurrently

Posted by GitBox <gi...@apache.org>.
div8cn commented on issue #5499:
URL: https://github.com/apache/cloudstack/issues/5499#issuecomment-927533654






-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [cloudstack] div8cn commented on issue #5499: Failed to add NIC to VM concurrently

Posted by GitBox <gi...@apache.org>.
div8cn commented on issue #5499:
URL: https://github.com/apache/cloudstack/issues/5499#issuecomment-927622647


   root@mgr1-dom0:~# cat /var/log/cloud-manager/cloudstack/management/management-server.log |grep job-4305
   2021-09-27 13:19:40,871 INFO  [o.a.c.f.j.i.AsyncJobMonitor] (API-Job-Executor-31:ctx-8c906118 job-4305) (logid:1c4369ad) Add job-4305 into job monitoring
   2021-09-27 13:19:40,876 DEBUG [o.a.c.f.j.i.AsyncJobManagerImpl] (API-Job-Executor-31:ctx-8c906118 job-4305) (logid:69688a36) Executing AsyncJobVO {id:4305, userId: 2, accountId: 2, instanceType: None, instanceId: null, cmd: org.apache.cloudstack.api.command.admin.vm.AddNicToVMCmdByAdmin, cmdInfo: {"virtualmachineid":"81a09e35-28f0-40e6-a13c-0be44a08062d","response":"json","ctxUserId":"2","httpmethod":"GET","networkid":"4e6cfd3d-a91b-46bf-8340-958976c2ff21","ctxStartEventId":"29943","ctxDetails":"{\"interface com.cloud.network.Network\":\"4e6cfd3d-a91b-46bf-8340-958976c2ff21\",\"interface com.cloud.vm.VirtualMachine\":\"81a09e35-28f0-40e6-a13c-0be44a08062d\"}","ctxAccountId":"2","cmdEventType":"NIC.CREATE"}, cmdVersion: 0, status: IN_PROGRESS, processStatus: 0, resultCode: 0, result: null, initMsid: 10000000001, completeMsid: null, lastUpdated: null, lastPolled: null, created: null, removed: null}
   2021-09-27 13:19:40,878 DEBUG [o.a.c.f.j.i.AsyncJobManagerImpl] (qtp18242360-403:ctx-52ccebbc ctx-8e398ef5) (logid:3eef3393) submit async job-4305, details: AsyncJobVO {id:4305, userId: 2, accountId: 2, instanceType: None, instanceId: null, cmd: org.apache.cloudstack.api.command.admin.vm.AddNicToVMCmdByAdmin, cmdInfo: {"virtualmachineid":"81a09e35-28f0-40e6-a13c-0be44a08062d","response":"json","ctxUserId":"2","httpmethod":"GET","networkid":"4e6cfd3d-a91b-46bf-8340-958976c2ff21","ctxStartEventId":"29943","ctxDetails":"{\"interface com.cloud.network.Network\":\"4e6cfd3d-a91b-46bf-8340-958976c2ff21\",\"interface com.cloud.vm.VirtualMachine\":\"81a09e35-28f0-40e6-a13c-0be44a08062d\"}","ctxAccountId":"2","cmdEventType":"NIC.CREATE"}, cmdVersion: 0, status: IN_PROGRESS, processStatus: 0, resultCode: 0, result: null, initMsid: 10000000001, completeMsid: null, lastUpdated: null, lastPolled: null, created: null, removed: null}
   2021-09-27 13:19:45,995 DEBUG [c.c.v.UserVmManagerImpl] (API-Job-Executor-31:ctx-8c906118 job-4305 ctx-9fe0a7ee) (logid:69688a36) Successful addition of Ntwk[208|Guest|60] from VM[User|i-2-46-VM]
   2021-09-27 13:19:46,195 DEBUG [o.a.c.f.j.i.AsyncJobManagerImpl] (API-Job-Executor-31:ctx-8c906118 job-4305 ctx-9fe0a7ee) (logid:69688a36) Complete async job-4305, jobStatus: SUCCEEDED, resultCode: 0, result: org.apache.cloudstack.api.response.UserVmResponse/virtualmachine/{"id":"81a09e35-28f0-40e6-a13c-0be44a08062d","name":"TEST-DB01P","displayname":"TEST-DB01P","account":"admin","userid":"a66bafe3-d0b1-49c2-b2e3-a8a0b88c511b","username":"skyhive","domainid":"ccd5f84c-12f1-11ec-ba65-5254003db647","domain":"ROOT","created":"2021-09-15T17:53:36+0800","state":"Running","haenable":"true","zoneid":"79ba6762-538f-450e-b108-4a8cd534f5d9","zonename":"uat","hostid":"6d8d09d2-8102-4c2e-bf95-10a582ee2134","hostname":"hci-cn002","guestosid":"d0d4ec03-12f1-11ec-ba65-5254003db647","securitygroup":[],"nic":[{"id":"e19a0dbe-69e0-43a7-a800-d7e0023125b1","networkid":"a42a1a9f-4e61-4408-8827-dac040cdceb0","networkname":"skyhive-tech","netmask":"255.255.255.0","gateway":"192.168.10.1","ipaddress":"19
 2.168.10.36","isolationuri":"vlan://569","broadcasturi":"vlan://569","traffictype":"Guest","type":"Isolated","isdefault":"true","macaddress":"02:00:6a:10:00:04","secondaryip":[{"id":"87fc5ea8-f271-4ab9-a948-44f33e1ca3c4","ipaddress":"192.168.10.158"}],"extradhcpoption":[]},{"id":"30b915a4-f421-4fe0-a1ff-102e452ccbbb","networkid":"ea9aa2bf-6484-4c7f-89fb-e899dfc4e423","networkname":"L3-Shared-Network","netmask":"255.255.255.0","gateway":"10.226.19.254","ipaddress":"10.226.19.78","isolationuri":"vlan://1009","broadcasturi":"vlan://1009","traffictype":"Guest","type":"Shared","isdefault":"false","macaddress":"02:00:5a:6a:00:0d","secondaryip":[],"extradhcpoption":[]}],"hypervisor":"KVM","instancename":"i-2-46-VM","details":{"keyboard":"us","memoryOvercommitRatio":"1.0","Message.ReservedCapacityFreed.Flag":"false","cpuOvercommitRatio":"4.0"},"affinitygroup":[],"displayvm":"true","isdynamicallyscalable":"false","ostypeid":"d0d4ec03-12f1-11ec-ba65-5254003db647","osdisplayname":"Other Ubuntu
  (64-bit)","tags":[]}
   2021-09-27 13:19:46,197 DEBUG [o.a.c.f.j.i.AsyncJobManagerImpl] (API-Job-Executor-31:ctx-8c906118 job-4305 ctx-9fe0a7ee) (logid:69688a36) Publish async job-4305 complete on message bus
   2021-09-27 13:19:46,197 DEBUG [o.a.c.f.j.i.AsyncJobManagerImpl] (API-Job-Executor-31:ctx-8c906118 job-4305 ctx-9fe0a7ee) (logid:69688a36) Wake up jobs related to job-4305
   2021-09-27 13:19:46,197 DEBUG [o.a.c.f.j.i.AsyncJobManagerImpl] (API-Job-Executor-31:ctx-8c906118 job-4305 ctx-9fe0a7ee) (logid:69688a36) Update db status for job-4305
   2021-09-27 13:19:46,198 DEBUG [o.a.c.f.j.i.AsyncJobManagerImpl] (API-Job-Executor-31:ctx-8c906118 job-4305 ctx-9fe0a7ee) (logid:69688a36) Wake up jobs joined with job-4305 and disjoin all subjobs created from job- 4305
   2021-09-27 13:19:46,353 DEBUG [c.c.a.ApiServer] (API-Job-Executor-31:ctx-8c906118 job-4305 ctx-9fe0a7ee) (logid:69688a36) Retrieved cmdEventType from job info: NIC.CREATE
   2021-09-27 13:19:46,358 DEBUG [o.a.c.f.j.i.AsyncJobManagerImpl] (API-Job-Executor-31:ctx-8c906118 job-4305) (logid:69688a36) Done executing org.apache.cloudstack.api.command.admin.vm.AddNicToVMCmdByAdmin for job-4305
   2021-09-27 13:19:46,358 INFO  [o.a.c.f.j.i.AsyncJobMonitor] (API-Job-Executor-31:ctx-8c906118 job-4305) (logid:69688a36) Remove job-4305 from job monitoring
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [cloudstack] DaanHoogland commented on issue #5499: Failed to add NIC to VM concurrently

Posted by GitBox <gi...@apache.org>.
DaanHoogland commented on issue #5499:
URL: https://github.com/apache/cloudstack/issues/5499#issuecomment-929339219


   so 4 in total? I also added three shared nets on creation which also went well.
   I'll try with a fourth as well
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [cloudstack] div8cn commented on issue #5499: Failed to add NIC to VM concurrently

Posted by GitBox <gi...@apache.org>.
div8cn commented on issue #5499:
URL: https://github.com/apache/cloudstack/issues/5499#issuecomment-929336999


   I added 3 shared networks to the VM at the same time
   
   VM had a shared network before adding


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [cloudstack] div8cn commented on issue #5499: Failed to add NIC to VM concurrently

Posted by GitBox <gi...@apache.org>.
div8cn commented on issue #5499:
URL: https://github.com/apache/cloudstack/issues/5499#issuecomment-929185087


   hypervisors: kvm (ubuntu 20.04 ,libvirt 6.0)
   network:  L3 ShareNetwork
   storage:   CEPH RBD


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [cloudstack] div8cn commented on issue #5499: Failed to add NIC to VM concurrently

Posted by GitBox <gi...@apache.org>.
div8cn commented on issue #5499:
URL: https://github.com/apache/cloudstack/issues/5499#issuecomment-928630557






-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [cloudstack] div8cn removed a comment on issue #5499: Failed to add NIC to VM concurrently

Posted by GitBox <gi...@apache.org>.
div8cn removed a comment on issue #5499:
URL: https://github.com/apache/cloudstack/issues/5499#issuecomment-927533654


   Unsuccessful async job:
   
   2021-09-27 12:59:15,886 DEBUG [o.a.c.f.j.i.AsyncJobManagerImpl] (API-Job-Executor-19:ctx-b45a5c74 job-4248) (logid:5682607c) Executing AsyncJobVO {id:4248, userId: 2, accountId: 2, instanceType: None, instanceId: null, cmd: org.apache.cloudstack.api.command.admin.vm.AddNicToVMCmdByAdmin, cmdInfo: {"virtualmachineid":"81a09e35-28f0-40e6-a13c-0be44a08062d","response":"json","ctxUserId":"2","httpmethod":"GET","networkid":"ea9aa2bf-6484-4c7f-89fb-e899dfc4e423","ctxStartEventId":"29814","ctxDetails":"{\"interface com.cloud.network.Network\":\"ea9aa2bf-6484-4c7f-89fb-e899dfc4e423\",\"interface com.cloud.vm.VirtualMachine\":\"81a09e35-28f0-40e6-a13c-0be44a08062d\"}","ctxAccountId":"2","cmdEventType":"NIC.CREATE"}, cmdVersion: 0, status: IN_PROGRESS, processStatus: 0, resultCode: 0, result: null, initMsid: 10000000001, completeMsid: null, lastUpdated: null, lastPolled: null, created: null, removed: null}
   2021-09-27 12:59:16,078 DEBUG [o.a.c.f.j.i.AsyncJobManagerImpl] (API-Job-Executor-19:ctx-b45a5c74 job-4248 ctx-d61f29ce) (logid:5682607c) Sync job-4251 execution on object VmWorkJobQueue.46
   2021-09-27 12:59:23,007 DEBUG [c.c.v.UserVmManagerImpl] (API-Job-Executor-19:ctx-b45a5c74 job-4248 ctx-d61f29ce) (logid:5682607c) Successful addition of Ntwk[206|Guest|21] from VM[User|i-2-46-VM]
   2021-09-27 12:59:23,060 DEBUG [o.a.c.f.j.i.AsyncJobManagerImpl] (API-Job-Executor-19:ctx-b45a5c74 job-4248 ctx-d61f29ce) (logid:5682607c) Complete async job-4248, jobStatus: SUCCEEDED, resultCode: 0, result: org.apache.cloudstack.api.response.UserVmResponse/virtualmachine/{"id":"81a09e35-28f0-40e6-a13c-0be44a08062d","name":"TEST-DB01P","displayname":"TEST-DB01P","account":"admin","userid":"a66bafe3-d0b1-49c2-b2e3-a8a0b88c511b","username":"skyhive","domainid":"ccd5f84c-12f1-11ec-ba65-5254003db647","domain":"ROOT","created":"2021-09-15T17:53:36+0800","state":"Running","haenable":"true","zoneid":"79ba6762-538f-450e-b108-4a8cd534f5d9","zonename":"uat","hostid":"6d8d09d2-8102-4c2e-bf95-10a582ee2134","hostname":"hci-cn002","guestosid":"d0d4ec03-12f1-11ec-ba65-5254003db647","securitygroup":[],"nic":[{"id":"e19a0dbe-69e0-43a7-a800-d7e0023125b1","networkid":"a42a1a9f-4e61-4408-8827-dac040cdceb0","networkname":"skyhive-tech","netmask":"255.255.255.0","gateway":"192.168.10.1","ipaddress":"19
 2.168.10.36","isolationuri":"vlan://569","broadcasturi":"vlan://569","traffictype":"Guest","type":"Isolated","isdefault":"true","macaddress":"02:00:6a:10:00:04","secondaryip":[{"id":"87fc5ea8-f271-4ab9-a948-44f33e1ca3c4","ipaddress":"192.168.10.158"}],"extradhcpoption":[]},{"id":"5a71d66c-ed92-495a-92b8-8cb870d1454b","networkid":"ea9aa2bf-6484-4c7f-89fb-e899dfc4e423","networkname":"L3-Shared-Network","netmask":"255.255.255.0","gateway":"10.226.19.254","ipaddress":"10.226.19.80","isolationuri":"vlan://1009","broadcasturi":"vlan://1009","traffictype":"Guest","type":"Shared","isdefault":"false","macaddress":"02:00:4e:4e:00:0b","secondaryip":[],"extradhcpoption":[]}],"hypervisor":"KVM","instancename":"i-2-46-VM","details":{"keyboard":"us","memoryOvercommitRatio":"1.0","Message.ReservedCapacityFreed.Flag":"false","cpuOvercommitRatio":"4.0"},"affinitygroup":[],"displayvm":"true","isdynamicallyscalable":"false","ostypeid":"d0d4ec03-12f1-11ec-ba65-5254003db647","osdisplayname":"Other Ubuntu
  (64-bit)","tags":[]}
   2021-09-27 12:59:23,061 DEBUG [o.a.c.f.j.i.AsyncJobManagerImpl] (API-Job-Executor-19:ctx-b45a5c74 job-4248 ctx-d61f29ce) (logid:5682607c) Publish async job-4248 complete on message bus
   2021-09-27 12:59:23,061 DEBUG [o.a.c.f.j.i.AsyncJobManagerImpl] (API-Job-Executor-19:ctx-b45a5c74 job-4248 ctx-d61f29ce) (logid:5682607c) Wake up jobs related to job-4248
   2021-09-27 12:59:23,062 DEBUG [o.a.c.f.j.i.AsyncJobManagerImpl] (API-Job-Executor-19:ctx-b45a5c74 job-4248 ctx-d61f29ce) (logid:5682607c) Update db status for job-4248
   2021-09-27 12:59:23,063 DEBUG [o.a.c.f.j.i.AsyncJobManagerImpl] (API-Job-Executor-19:ctx-b45a5c74 job-4248 ctx-d61f29ce) (logid:5682607c) Wake up jobs joined with job-4248 and disjoin all subjobs created from job- 4248
   2021-09-27 12:59:23,077 DEBUG [c.c.a.ApiServer] (API-Job-Executor-19:ctx-b45a5c74 job-4248 ctx-d61f29ce) (logid5682607c) Retrieved cmdEventType from job info: NIC.CREATE
   2021-09-27 12:59:23,083 DEBUG [o.a.c.f.j.i.AsyncJobManagerImpl] (API-Job-Executor-19:ctx-b45a5c74 job-4248) (logid:5682607c) Done executing org.apache.cloudstack.api.command.admin.vm.AddNicToVMCmdByAdmin for job-4248
   2021-09-27 12:59:23,084 INFO  [o.a.c.f.j.i.AsyncJobMonitor] (API-Job-Executor-19:ctx-b45a5c74 job-4248) (logid:5682607c) Remove job-4248 from job monitoring
   
   
   @weizhouapache 


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [cloudstack] DaanHoogland commented on issue #5499: Failed to add NIC to VM concurrently

Posted by GitBox <gi...@apache.org>.
DaanHoogland commented on issue #5499:
URL: https://github.com/apache/cloudstack/issues/5499#issuecomment-933622504


   @div8cn , this ticket autoclosed as the PR was merged that claimed to solve this issue (and did so for me and Wei. Feel free to reopen or create a new one though, if this does not solve it for you?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [cloudstack] div8cn commented on issue #5499: Failed to add NIC to VM concurrently

Posted by GitBox <gi...@apache.org>.
div8cn commented on issue #5499:
URL: https://github.com/apache/cloudstack/issues/5499#issuecomment-933171423


   I merged Patch to 4.15.0.0, adding multiple NICs to VM (vm nic total >4) the problem still exists


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [cloudstack] div8cn commented on issue #5499: Failed to add NIC to VM concurrently

Posted by GitBox <gi...@apache.org>.
div8cn commented on issue #5499:
URL: https://github.com/apache/cloudstack/issues/5499#issuecomment-929208446


   Sorry, I may not be able to separate the API scheduling code and give it to you.
   
   I used CMK to simulate this operation, and it reproduced;
   
   Use SSH to connect to the cloudstack node 
   Use CMK in the node to add 3 networks to the VM;
   These three tasks were completed almost simultaneously;
   
   ![1632835553](https://user-images.githubusercontent.com/35140268/135095758-4e50c2bd-70d8-46b2-b718-0db6f60b73b9.jpg)
   
   
   In the end, only the first task (the first task to press Enter) was successful. Although the last two were successful, they were not included in the NICS of the VM.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [cloudstack] DaanHoogland commented on issue #5499: Failed to add NIC to VM concurrently

Posted by GitBox <gi...@apache.org>.
DaanHoogland commented on issue #5499:
URL: https://github.com/apache/cloudstack/issues/5499#issuecomment-930021405


   note to self: just added 5 nics in parallel , only the fifth was added.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [cloudstack] DaanHoogland commented on issue #5499: Failed to add NIC to VM concurrently

Posted by GitBox <gi...@apache.org>.
DaanHoogland commented on issue #5499:
URL: https://github.com/apache/cloudstack/issues/5499#issuecomment-931341005


   @div8cn do you see a chance to review/test #5541?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [cloudstack] DaanHoogland commented on issue #5499: Failed to add NIC to VM concurrently

Posted by GitBox <gi...@apache.org>.
DaanHoogland commented on issue #5499:
URL: https://github.com/apache/cloudstack/issues/5499#issuecomment-929998374






-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [cloudstack] weizhouapache commented on issue #5499: Failed to add NIC to VM concurrently

Posted by GitBox <gi...@apache.org>.
weizhouapache commented on issue #5499:
URL: https://github.com/apache/cloudstack/issues/5499#issuecomment-927608621


   > Unsuccessful async job:
   > 
   > root@mgr1-dom0:~# cat /var/log/cloud-manager/cloudstack/management/management-server.log |grep -v queryA |grep 69688a36
   > 2021-09-27 13:19:40,876 DEBUG [o.a.c.f.j.i.AsyncJobManagerImpl] (API-Job-Executor-31:ctx-8c906118 job-4305) (logid:69688a36) Executing AsyncJobVO {id:4305, userId: 2, accountId: 2, instanceType: None, instanceId: null, cmd: org.apache.cloudstack.api.command.admin.vm.AddNicToVMCmdByAdmin, cmdInfo: {"virtualmachineid":"81a09e35-28f0-40e6-a13c-0be44a08062d","response":"json","ctxUserId":"2","httpmethod":"GET","networkid":"4e6cfd3d-a91b-46bf-8340-958976c2ff21","ctxStartEventId":"29943","ctxDetails":"{"interface com.cloud.network.Network":"4e6cfd3d-a91b-46bf-8340-958976c2ff21","interface com.cloud.vm.VirtualMachine":"81a09e35-28f0-40e6-a13c-0be44a08062d"}","ctxAccountId":"2","cmdEventType":"NIC.CREATE"}, cmdVersion: 0, status: IN_PROGRESS, processStatus: 0, resultCode: 0, result: null, initMsid: 10000000001, completeMsid: null, lastUpdated: null, lastPolled: null, created: null, removed: null}
   > 2021-09-27 13:19:45,995 DEBUG [c.c.v.UserVmManagerImpl] (API-Job-Executor-31:ctx-8c906118 job-4305 ctx-9fe0a7ee) (logid:69688a36) Successful addition of Ntwk[208|Guest|60] from VM[User|i-2-46-VM]
   > 2021-09-27 13:19:46,195 DEBUG [o.a.c.f.j.i.AsyncJobManagerImpl] (API-Job-Executor-31:ctx-8c906118 job-4305 ctx-9fe0a7ee) (logid:69688a36) Complete async job-4305, jobStatus: SUCCEEDED, resultCode: 0, result: org.apache.cloudstack.api.response.UserVmResponse/virtualmachine/{"id":"81a09e35-28f0-40e6-a13c-0be44a08062d","name":"TEST-DB01P","displayname":"TEST-DB01P","account":"admin","userid":"a66bafe3-d0b1-49c2-b2e3-a8a0b88c511b","username":"skyhive","domainid":"ccd5f84c-12f1-11ec-ba65-5254003db647","domain":"ROOT","created":"2021-09-15T17:53:36+0800","state":"Running","haenable":"true","zoneid":"79ba6762-538f-450e-b108-4a8cd534f5d9","zonename":"uat","hostid":"6d8d09d2-8102-4c2e-bf95-10a582ee2134","hostname":"hci-cn002","guestosid":"d0d4ec03-12f1-11ec-ba65-5254003db647","securitygroup":[],"nic":[{"id":"e19a0dbe-69e0-43a7-a800-d7e0023125b1","networkid":"a42a1a9f-4e61-4408-8827-dac040cdceb0","networkname":"skyhive-tech","netmask":"255.255.255.0","gateway":"192.168.10.1","ipaddress":"
 192.168.10.36","isolationuri":"vlan://569","broadcasturi":"vlan://569","traffictype":"Guest","type":"Isolated","isdefault":"true","macaddress":"02:00:6a:10:00:04","secondaryip":[{"id":"87fc5ea8-f271-4ab9-a948-44f33e1ca3c4","ipaddress":"192.168.10.158"}],"extradhcpoption":[]},{"id":"30b915a4-f421-4fe0-a1ff-102e452ccbbb","networkid":"ea9aa2bf-6484-4c7f-89fb-e899dfc4e423","networkname":"L3-Shared-Network","netmask":"255.255.255.0","gateway":"10.226.19.254","ipaddress":"10.226.19.78","isolationuri":"vlan://1009","broadcasturi":"vlan://1009","traffictype":"Guest","type":"Shared","isdefault":"false","macaddress":"02:00:5a:6a:00:0d","secondaryip":[],"extradhcpoption":[]}],"hypervisor":"KVM","instancename":"i-2-46-VM","details":{"keyboard":"us","memoryOvercommitRatio":"1.0","Message.ReservedCapacityFreed.Flag":"false","cpuOvercommitRatio":"4.0"},"affinitygroup":[],"displayvm":"true","isdynamicallyscalable":"false","ostypeid":"d0d4ec03-12f1-11ec-ba65-5254003db647","osdisplayname":"Other Ubun
 tu (64-bit)","tags":[]}
   > 2021-09-27 13:19:46,197 DEBUG [o.a.c.f.j.i.AsyncJobManagerImpl] (API-Job-Executor-31:ctx-8c906118 job-4305 ctx-9fe0a7ee) (logid:69688a36) Publish async job-4305 complete on message bus
   > 2021-09-27 13:19:46,197 DEBUG [o.a.c.f.j.i.AsyncJobManagerImpl] (API-Job-Executor-31:ctx-8c906118 job-4305 ctx-9fe0a7ee) (logid:69688a36) Wake up jobs related to job-4305
   > 2021-09-27 13:19:46,197 DEBUG [o.a.c.f.j.i.AsyncJobManagerImpl] (API-Job-Executor-31:ctx-8c906118 job-4305 ctx-9fe0a7ee) (logid:69688a36) Update db status for job-4305
   > 2021-09-27 13:19:46,198 DEBUG [o.a.c.f.j.i.AsyncJobManagerImpl] (API-Job-Executor-31:ctx-8c906118 job-4305 ctx-9fe0a7ee) (logid:69688a36) Wake up jobs joined with job-4305 and disjoin all subjobs created from job- 4305
   > 2021-09-27 13:19:46,353 DEBUG [c.c.a.ApiServer] (API-Job-Executor-31:ctx-8c906118 job-4305 ctx-9fe0a7ee) (logid69688a36) Retrieved cmdEventType from job info: NIC.CREATE
   > 2021-09-27 13:19:46,358 DEBUG [o.a.c.f.j.i.AsyncJobManagerImpl] (API-Job-Executor-31:ctx-8c906118 job-4305) (logid:69688a36) Done executing org.apache.cloudstack.api.command.admin.vm.AddNicToVMCmdByAdmin for job-4305
   > 2021-09-27 13:19:46,358 INFO [o.a.c.f.j.i.AsyncJobMonitor] (API-Job-Executor-31:ctx-8c906118 job-4305) (logid:69688a36) Remove job-4305 from job monitoring
   > 
   > @weizhouapache
   
   @div8cn 
   can you filter logs by keyword `job-4305` ?
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [cloudstack] div8cn commented on issue #5499: Failed to add NIC to VM concurrently

Posted by GitBox <gi...@apache.org>.
div8cn commented on issue #5499:
URL: https://github.com/apache/cloudstack/issues/5499#issuecomment-928630557


   This is not entirely at the same time, because the use of for causes a delay in the middle of it <1s


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [cloudstack] DaanHoogland closed issue #5499: Failed to add NIC to VM concurrently

Posted by GitBox <gi...@apache.org>.
DaanHoogland closed issue #5499:
URL: https://github.com/apache/cloudstack/issues/5499


   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [cloudstack] DaanHoogland commented on issue #5499: Failed to add NIC to VM concurrently

Posted by GitBox <gi...@apache.org>.
DaanHoogland commented on issue #5499:
URL: https://github.com/apache/cloudstack/issues/5499#issuecomment-929031357


   In addition @div8cn , can you share other env details, like hypervisors/network/storage, please?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [cloudstack] weizhouapache commented on issue #5499: Failed to add NIC to VM concurrently

Posted by GitBox <gi...@apache.org>.
weizhouapache commented on issue #5499:
URL: https://github.com/apache/cloudstack/issues/5499#issuecomment-927696568


   @nvazquez @sureshanaparti 
   I tried to reproduce the issue once, but failed.
   anyone else want to have a look ?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [cloudstack] DaanHoogland commented on issue #5499: Failed to add NIC to VM concurrently

Posted by GitBox <gi...@apache.org>.
DaanHoogland commented on issue #5499:
URL: https://github.com/apache/cloudstack/issues/5499#issuecomment-929998374


   @div8cn @nvazquez @weizhouapache I reproduced this on latest main branch but with a nuance; the success result does not show a nic for the missing network, so the result does indicate that no network was added. It should have been an error result instead, of course. I will investigate more later.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [cloudstack] DaanHoogland commented on issue #5499: Failed to add NIC to VM concurrently

Posted by GitBox <gi...@apache.org>.
DaanHoogland commented on issue #5499:
URL: https://github.com/apache/cloudstack/issues/5499#issuecomment-1009016810


   fixed again in #5658 (hope it stays fixed this time)


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [cloudstack] nvazquez commented on issue #5499: Failed to add NIC to VM concurrently

Posted by GitBox <gi...@apache.org>.
nvazquez commented on issue #5499:
URL: https://github.com/apache/cloudstack/issues/5499#issuecomment-929318294


   @div8cn can you test the latest main branch and see if the issue persists?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [cloudstack] nvazquez closed issue #5499: Failed to add NIC to VM concurrently

Posted by GitBox <gi...@apache.org>.
nvazquez closed issue #5499:
URL: https://github.com/apache/cloudstack/issues/5499


   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [cloudstack] DaanHoogland commented on issue #5499: Failed to add NIC to VM concurrently

Posted by GitBox <gi...@apache.org>.
DaanHoogland commented on issue #5499:
URL: https://github.com/apache/cloudstack/issues/5499#issuecomment-929029998


   @div8cn I'll try and reproduced, but I discussed with @weizhouapache and his reproduction method seems solid. Can you share the code that does the API calls, to help us reproducing your issue? 
   cc @nvazquez 


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [cloudstack] weizhouapache commented on issue #5499: Failed to add NIC to VM concurrently

Posted by GitBox <gi...@apache.org>.
weizhouapache commented on issue #5499:
URL: https://github.com/apache/cloudstack/issues/5499#issuecomment-926685740


   @div8cn 
   could you please share some logs of the async jobs ?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org