glacier-cli icon indicating copy to clipboard operation
glacier-cli copied to clipboard

glacier-cli wrongly conflates identically-named vaults from different AWS regions

Open xsuchy opened this issue 11 years ago • 1 comments

Description of problem: glacier-cli keeps a local cache of vaults and archives. However, the cache does not seem to distinguish between vaults in different AWS regions. So different AWS vaults with the same name in different AWS regions are assumed to be the same vault.

Version-Release number of selected component (if applicable): glacier-cli.noarch-0-8.20131113gite8a2536.fc20 Originaly reported to Fedora as https://bugzilla.redhat.com/show_bug.cgi?id=1167186

How reproducible: Always

Steps to Reproduce:

$ glacier-cli --region=us-east-1 vault create somevault $ glacier-cli --region=us-east-1 archive upload somevault somearchive

$ glacier-cli --region=eu-west-1 archive list somevault (note different region specified)

Actual results: wrongly returns 'somearchive' as an archive in region eu-west-1

Expected results: No output (there is no vault or archive in region eu-west-1)

Additional information: Obvious workaround is to pick one region and stick to it, or to use unique vault names across all regions.

xsuchy avatar Nov 24 '14 07:11 xsuchy

This looks valid, thanks. The get_connection_account function is supposed to handle this, but doesn't check the region. This function needs amending, and some kind of migration to fix existing caches to include the region.

Or I wonder if I should just invalidate old caches since they may be incorrect.

I'm on holiday for the next couple of weeks; I'm not sure if I'll get to this before I'm back.

basak avatar Nov 24 '14 08:11 basak