Can't use GLACIER as a backup_storage_class
Summary
It's impossible to use gitlab_rails['backup_storage_class'] = 'GLACIER'
because the docs stipulates that :
https://docs.aws.amazon.com/AmazonS3/latest/dev/storage-class-intro.html
You cannot specify GLACIER as the storage class at the time that you create an object. You create GLACIER objects by first uploading objects using STANDARD, RRS, STANDARD_IA, or ONEZONE_IA as the storage class. Then you transition these objects to the GLACIER storage class using lifecycle management. For more information, see Object Lifecycle Management.
Steps to reproduce
Use gitlab_rails['backup_storage_class'] = 'GLACIER'
and try to upgrade (apt upgrade
)
What is the current bug behavior?
Stops the upgrade.
Uploading backup archive to remote storage S3-BUCKET ... rake aborted!
Excon::Error::BadRequest: Expected(200) <=> Actual(400 Bad Request)
excon.error.response
:body => "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<Error><Code>InvalidArgument</Code><Message>GLACIER is not allowed.</Message><ArgumentName>x-amz-storage-class</ArgumentName><ArgumentValue>GLACIER</ArgumentValue><RequestId>REQUESTID</RequestId><HostId>HOSTID</HostId></Error>"
:cookies => [
]
:headers => {
"Connection" => "close"
"Content-Type" => "application/xml"
"Date" => "Tue, 28 Aug 2018 18:39:35 GMT"
"Server" => "AmazonS3"
"x-amz-id-2" => "..."
"x-amz-request-id" => "..."
}
:host => "..."
:local_address => "..."
:local_port => 50224
:path => "/1535481574_2018_08_28_11.1.4_gitlab_backup.tar"
:port => 443
:reason_phrase => "Bad Request"
:remote_ip => "..."
:status => 400
:status_line => "HTTP/1.1 400 Bad Request\r\n"
/opt/gitlab/embedded/service/gitlab-rails/lib/backup/manager.rb:48:in `upload'
/opt/gitlab/embedded/service/gitlab-rails/lib/backup/manager.rb:33:in `block in pack'
/opt/gitlab/embedded/service/gitlab-rails/lib/backup/manager.rb:17:in `chdir'
/opt/gitlab/embedded/service/gitlab-rails/lib/backup/manager.rb:17:in `pack'
/opt/gitlab/embedded/service/gitlab-rails/lib/tasks/gitlab/backup.rake:20:in `block (3 levels) in <top (required)>'
/opt/gitlab/embedded/bin/bundle:23:in `load'
/opt/gitlab/embedded/bin/bundle:23:in `<main>'
Tasks: TOP => gitlab:backup:create
(See full trace by running task with --trace)
What is the expected correct behavior?
Hmm. Remove the GLACIER option?
Details of package version
Provide the package version installation details
Desired=Unknown/Install/Remove/Purge/Hold | Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend |/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad) ||/ Name Version Architecture Description +++-======================================-========================-========================-================================================================================== ii gitlab-ce 11.1.4-ce.0 amd64 GitLab Community Edition (including NGINX, Postgres, Redis)
Configuration details
Provide the relevant sections of `/etc/gitlab/gitlab.rb`
gitlab_rails['backup_upload_connection'] = { 'provider' => 'AWS', 'region' => 'ca-central-1', 'aws_access_key_id' => 'ACCESSKEY', 'aws_secret_access_key' => 'SECRETKEY' } gitlab_rails['backup_upload_remote_directory'] = 'S3-BUCKETNAME' gitlab_rails['backup_storage_class'] = 'GLACIER'