-
Notifications
You must be signed in to change notification settings - Fork 330
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
New module to create/update/delete/attach multiple disks #936
Conversation
Hi @abikouo, I've been testing the Module usage within role:
Task outputs:
Corresponding results file:
If you have any advice on my usage of the module I'd appreciate it. Thanks, |
Hi @dleens2 Thanks for the feedback!! I dont know why it is not attaching the disk to the vm. I have done something similar which is working, feel free to review and see on what it differs. Here is the playbook
|
Hi @abikouo, Thanks for sending over the example code. I found that the issue was with the disk/VM zone mismatch. I was able to get the disks to attach using your example and our disk-management role after fixing that issue. I'm still having an issue with disk attachments when there are more than 2 disks being attached per VM. When attempting to attach 3 disks per VM with your example none of the disks will attach. With our disk-management role two of the disks will attach to each VM and the third one will not. This behavior is happening regardless of scale, only 3 VMs with your example and 100 VMs with our role. Are you seeing this same behavior on your side? Thanks, |
@dleens2 I fixed the issue where some disks are created but not attached, the process was quietly failing, and now this will raise an issue. I reproduced the issue with some disks created but not attached, it is due to the max capacity reached (The maximum number of data disks allowed to be attached to a VM of size Standard D4S v3 is 8). I have updated the module Playbook
disk_vm_config.j2
Please update the module version and try to attach disk again using your role or the playbook above and keep me informed |
Hi @abikouo, Thank you adding this debugging feature to the module. I updated the modules and ran it again with our disk-management role and found that the issue I was running into was with the max disks per VM size, as you suggested. After changing the sizes of my test VMs the Thanks |
@ohthehugemanatee your understanding of this PR is not correct, the disk is not attached once created, but we create all disks before and attach them once to the VM, each time you attach a disk to a VM you need to update the VM property, in order to avoid concurrency issues and optimize the process, we attach them once. |
@abikouo creation is async but attach still works in serial? |
@abikouo It would be nice to change the name to "azure_rm_multiplemanageddisks"! and add "azure_rm_multiplemanageddisks" to pr-pipeline.yml, Thank you very much! |
Hi @abikouo, I tested the new changes to the module and had some errors when running it. I ran it against 50 VMs, attempting to attach 3 disks per VM. On about 1/3 of the VMs included in the playbook, I received the following error during the disk attachment phase: If I rerun the playbook then the disks that failed to attach in the previous run attach successfully. I think we may be running into another API collision issue? Let me know what you think. Thanks |
Hi @dleens2 Thanks for the feedback. I managed to reproduce the issue using the following playbook
I don't know how you are running your attachment, you should have one task per virtual machine to avoid API collision.
|
Hi @abikouo, I retried the disk creation and attachment without using a loop as you suggested and it worked without causing any collisions. I also tested for idempotence in subsequent runs and it worked as expected. Thanks |
@Fred-sun the Pull request is ready for review |
@abikouo Thank you for your update and we will complete the test and move forward with the merger as soon as possible! Thanks! |
@abikouo test failed:
|
@xuzhang3 how are you running the tests? This task is falling as expected, as there is an |
@abikouo Rerun the tests, all passed. LGTM |
Testing how to speed disk creation/attachment in order to tackle #847
I just created a new module
azure_rm_managedmultipledisk
which will be merged intoazure_rm_multiple_manageddisks
or exists as another moduleISSUE TYPE