chef / chef/chef-server

Error 500 when uploading cookbook with knife (S3 bookshelf) - Error 400 bad request from S3

Open
#1,229 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Aspect: Portability Status: To be prioritized Triage: Try Reproducing Type: Bug
Dominant language
Erlang
Stars
303
Forks
211
Avg merge
1d 8h
Merged PRs (30d)
5

Description

I am getting and error 500 when I try to upload a cookbook with knife. Other subcommands are successful and return valid data however. I suspect some issue with my custom bookshelf could be responsible.
To clarify my bookshelf is supposed to be a S3 bucket and my Postgres DB is in RDS.
I included these lines in the chef-server.rb:

postgresql['db_superuser'] = 'pivotal'
postgresql['db_superuser_password'] = '<some password>'
postgresql['external'] = true
postgresql['vip'] = '<my rds address>'
postgresql['port'] = 5394
bookshelf['access_key_id'] = '<my key>'
bookshelf['secret_access_key'] = '<my secret>'
opscode_erchef['s3_bucket'] = '<my bucket name>'
bookshelf['vip'] = 's3-eu-central-1.amazonaws.com'

Searching for a solution to my problem I have also tried variations of this with:

  • bookshelf['enable'] = false
  • passwords/keys entered via set-secret
  • hardcoding my FQDN into the config and hosts file (it is a Route53 entry otherwise, which as I said works for most things)

None of these were able to fix the problem for me. I have tested accessing both the database and the bucket manually, but from the same machine and with the same credentials. Both work. The database is also filled after chef-server-ctl reconfigure, so I doubt having it external contributes to the problem.

I am able to create users and organizations, view information about them remotely via knife, etc. Only when I come to cookbooks do I get errors.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the chef-server.rb settings for the external PostgreSQL database and S3 bookshelf, then trace the knife cookbook upload path and the reported S3 400 response. Compare it with the successful knife subcommands and verify the result by uploading a cookbook successfully.

Written by the indexing model from the issue text.

Assessment

Tech stack
aws, postgresql
Domain
backend, cloud, databases
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.