-
Notifications
You must be signed in to change notification settings - Fork 52
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
Disk: Inexact UniqueID matching #247
Comments
Hi @bozho, Do you have an example of how the resource configuration would look using this? E.g.
|
Ah, yes. Apologies - was writing this up yesterday after losing the entire day trying to work around the problem :-) A sample resource configuration would look something like:
I think it makes sense to use regex pattern matching here. I have a limited number of machines to test, but At the moment, I only have access to AWS and Proxmox VMs and both of them format |
Cool - yep, I think this looks possible. We might need to get the resource to stop though if the RegEx returns more than one disk. Either with a Warning or most likely we'd want an error here. |
I was thinking an error. I'll get on implementing this, hopefully some time during this week. |
Cool - thanks @bozho . I'll mark it as In Progress. |
Hi @bozho Have you tried using the DiskIdType of Location? I added that last year after having a similar problem with Windows VMs in Azure? I don't want to stop you from implementing a nice pattern matching type as well, just curious if you've got the time to test the Location type on AWS? |
Details of the scenario you tried and the problem that is occurring
It seems that as of recently, AWS doesn't guarantee disk ordering in Windows VMs. Previously, the order was controlled by volume device names (
xvd[a-z]
) and was stable across VM reboots.Not having stable disk ordering makes disk initialisation and drive letter assignment impossible.
AWS does map EBS volume ID to
UniqueId
disk property.UniqueId
is formatted as:<volume id without the dash>0001Amazon Elastic Block Store 1D0F
This allows us to use Unique ID to initialise disks and assign drive letters. However, it is unknown how stable ID format is going to be in the future, but it is safe to assume it will always reference EBS volume ID in some form.
Suggested solution to the issue
Introduce an additional
DiskIdType
:UniqueIdPattern
, which would allow pattern matching for disk serial numbers. The resource would throw an error in case of multiple matches.Happy to implement and submit a PR.
The text was updated successfully, but these errors were encountered: