Fix issue regarding cache and region codes#1938
Conversation
|
I see this bug was introduced in 69f9a78. This datastructure is pickled, so we probably shouldn't be modifying the type of the data structure. What was wrong with the region code handling before 69f9a78? I don't see any explanation given in that PR, and with a quick scan I'm not seeing where that gets used. |
|
The data structure we used for metadata prior to that commit changed. Before we assigned a dict with the VM's region's airport code only, but this was also wrong and broke several distros that use that to setup the repos such as Ubuntu, something we were requested to resolve. However the metadata is now provided as such, Previously, Now, region is expected to be a string so it cant just be dropped in like that. Note this fix has been tested and is working as expected and we are likely moving this patch into production for the time being. As for it's usage, its used here, I personally don't really like this approach either. Changing our metadata however is unlikely to happen soon. Best alternative I can provide is I refactor this in the vultr.py helper and format the metadata into the expected cloud-init format before it hits this point. Would that be a better approach in your opinion? |
|
Eh, I went ahead and just did that. This is cleaner and feels better overall. I can revert however if its not ideal. |
Proposed Commit Message
Additional Context
Test Steps
Checklist: