You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
image-copy should hash location and subscription for storage account name #110
Alexander Weber (@Deshke) My original thought was to include the actual location name from tractability - I don't like all those totally random resource names. Probably didn't do the math right for all the regions, my bad.
How about keeping the actual location and adding a substring of the location subscription hash to complete to 24 chars?
australiasoutheast is 19 chars, so you can shorten the subscription hash down to 5 but the problem may come up again if a subscription id is similar to one from another account, because all azure customers share the dns name.
also there is a artifical limit to the snapshot name
# Create the snapshot in the target region from the copied blob
logger.warn(
"%s - Creating snapshot in target region from the copied blob", location)
target_blob_path = target_blob_endpoint + \
target_container_name + '/' + blob_name
location_hash = hashlib.sha1(location.encode("UTF-8")).hexdigest()
source_os_disk_snapshot_name_hash = hashlib.sha1(source_os_disk_snapshot_name.encode("UTF-8")).hexdigest()
target_snapshot_name = source_os_disk_snapshot_name_hash[:11] + location_hash[:11]
cli_cmd = prepare_cli_command(['snapshot', 'create',
'--resource-group', transient_resource_group_name,
'--name', target_snapshot_name,
'--location', location,
'--source', target_blob_path])
had to add the hash thing there as well or i could not create within eastasisa and australiasoutheast
I might be missing something but subscription id is a guid. I have access to a bunch of subscriptions with all ids very different from one another. In theory I agree it can happen, but I don't think it's likely. Anyway, I can change that.
About the snapshot name - I'll limit it to 80 chars. No need for hashing since uniqueness isn't required here.
Activity
tamirkamara commentedon Mar 23, 2018
Alexander Weber (@Deshke) My original thought was to include the actual location name from tractability - I don't like all those totally random resource names. Probably didn't do the math right for all the regions, my bad.
How about keeping the actual location and adding a substring of the location subscription hash to complete to 24 chars?
Deshke commentedon Mar 23, 2018
australiasoutheastis 19 chars, so you can shorten the subscription hash down to 5 but the problem may come up again if a subscription id is similar to one from another account, because all azure customers share the dns name.also there is a artifical limit to the snapshot name
had to add the hash thing there as well or i could not create within eastasisa and australiasoutheast
tamirkamara commentedon Mar 23, 2018
I might be missing something but subscription id is a guid. I have access to a bunch of subscriptions with all ids very different from one another. In theory I agree it can happen, but I don't think it's likely. Anyway, I can change that.
About the snapshot name - I'll limit it to 80 chars. No need for hashing since uniqueness isn't required here.
Anything else you saw?
Deshke commentedon Mar 23, 2018
nope that should be it.
azure respons with invalid name if the snapshot name is to long
Deshke commentedon Mar 23, 2018
eh Tamir Kamara (@tamirkamara)
the snapshot name has to be uniq in the resource group, so cutting of after 80 chars may produces some other issues
[k8s-extension] Release v1.1.0 with Updated Models for 2022-03-01 (#4588
Merge pull request Azure#110 from StrawnSC/microsoft.graph
[k8s-extension] Update extension CLI to v1.2.5 (#5171)
Merge pull request Azure#110 from kairu-ms/migrate-network-lb-probe