Fix glacier repo creation bug
Version 5.20140227 broke creation of glacier repositories, not including the datacenter and vault in their configuration. This bug is fixed, but glacier repositories set up with the broken version of git-annex need to have the datacenter and vault set in order to be usable. This can be done using git annex enableremote to add the missing settings. For details, see http://git-annex.branchable.com/bugs/problems_with_glacier/
This commit is contained in:
parent
9561279f0b
commit
3b8d5f03bb
3 changed files with 36 additions and 3 deletions
|
@ -82,7 +82,7 @@ glacierSetup' enabling u c = do
|
|||
unless enabling $
|
||||
genVault fullconfig u
|
||||
gitConfigSpecialRemote u fullconfig "glacier" "true"
|
||||
return (c', u)
|
||||
return (fullconfig, u)
|
||||
where
|
||||
remotename = fromJust (M.lookup "name" c)
|
||||
defvault = remotename ++ "-" ++ fromUUID u
|
||||
|
@ -225,7 +225,8 @@ glacierParams :: RemoteConfig -> [CommandParam] -> [CommandParam]
|
|||
glacierParams c params = datacenter:params
|
||||
where
|
||||
datacenter = Param $ "--region=" ++
|
||||
fromJust (M.lookup "datacenter" c)
|
||||
fromMaybe (error "Missing datacenter configuration")
|
||||
(M.lookup "datacenter" c)
|
||||
|
||||
glacierEnv :: RemoteConfig -> UUID -> Annex (Maybe [(String, String)])
|
||||
glacierEnv c u = go =<< getRemoteCredPairFor "glacier" c creds
|
||||
|
@ -239,7 +240,8 @@ glacierEnv c u = go =<< getRemoteCredPairFor "glacier" c creds
|
|||
(uk, pk) = credPairEnvironment creds
|
||||
|
||||
getVault :: RemoteConfig -> Vault
|
||||
getVault = fromJust . M.lookup "vault"
|
||||
getVault = fromMaybe (error "Missing vault configuration")
|
||||
. M.lookup "vault"
|
||||
|
||||
archive :: Remote -> Key -> Archive
|
||||
archive r k = fileprefix ++ key2file k
|
||||
|
|
7
debian/changelog
vendored
7
debian/changelog
vendored
|
@ -20,6 +20,13 @@ git-annex (5.20140321) UNRELEASED; urgency=medium
|
|||
been pushed to it, to simplify setup of remote git repositories,
|
||||
including via gitolite.
|
||||
* add --include-dotfiles: New option, perhaps useful for backups.
|
||||
* Version 5.20140227 broke creation of glacier repositories,
|
||||
not including the datacenter and vault in their configuration.
|
||||
This bug is fixed, but glacier repositories set up with the broken
|
||||
version of git-annex need to have the datacenter and vault set
|
||||
in order to be usable. This can be done using git annex enableremote
|
||||
to add the missing settings. For details, see
|
||||
http://git-annex.branchable.com/bugs/problems_with_glacier/
|
||||
|
||||
-- Joey Hess <joeyh@debian.org> Fri, 21 Mar 2014 14:08:41 -0400
|
||||
|
||||
|
|
|
@ -39,3 +39,27 @@ user: "Andrew Mark Kraut <akraut@gmail.com>"
|
|||
|
||||
# End of transcript or log.
|
||||
"""]]
|
||||
|
||||
> This was a bug introduced last month, it forgot to receord the
|
||||
> datacenter and vault used when initializing the glacier repository.
|
||||
>
|
||||
> I've fixed the bug, but this does not fix repositories created with
|
||||
> the broken version. I considered just making it use the default
|
||||
> datacenter and vault for such a repository, but
|
||||
> a) those may change in the future
|
||||
> and I don't want to have to worry about breaking such a repository
|
||||
> going forward and b) someone may have overridden it to use another
|
||||
> datacenter or vault name and so it shouldn't blindly assume the defaults.
|
||||
>
|
||||
> Instead, there's a manual fix up step you need to do. Luckily quite easy.
|
||||
> For example:
|
||||
>
|
||||
> git annex enableremote myglacier datacenter=us-east-1 vault=myglacier-fae9be57-8eb4-47af-932f-136b9b40e669
|
||||
>
|
||||
> The default datacenter is us-east-1, and the default vault name is
|
||||
> "$remotename-$uuid". So you just have to tell it these values
|
||||
> once with an enableremote command, and it will then work.
|
||||
|
||||
> You don't even need to get the fixed version of git-annex to work
|
||||
> around the bug this way.. Although it does have better error messages
|
||||
> too. [[fixed|done]] --[[Joey]]
|
||||
|
|
Loading…
Add table
Reference in a new issue