Habitat chef-server-ctl bug
Open
Nobody has claimed this yet.
Aspect: Packaging
Component: habitat
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
Chef server ctl uses secrets-bootstrap.rb which in turn calls
system "hab config apply chef-server-ctl.default #{version} {{pkg.svc_data_path}}/hab-secrets-modified.toml"
In plan.sh service is running under hab user. Habitat supervisor runs under root, so I'm getting:
Aug 03 09:34:17 dokken hab[14447]: chef-server-ctl.default(O): Changed Secrets need to be applied.
Aug 03 09:34:17 dokken hab[14447]: chef-server-ctl.default(O): ✗✗✗
Aug 03 09:34:17 dokken hab[14447]: chef-server-ctl.default(O): ✗✗✗ [Err: 1] IoError while reading or writing ctl secret, /hab/sup/default/CTL_SECRET, Permission denied (os error 13)
Aug 03 09:34:17 dokken hab[14447]: chef-server-ctl.default(O): ✗✗✗
Probably we must run ctl as root when bootstrapping secrets.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with secrets-bootstrap.rb and the plan.sh service setup, then inspect the hab config apply command and its handling of CTL_SECRET. Reproduce the bootstrap failure using the logged permission error. Done means secrets bootstrapping no longer fails because the ctl secret is accessed with the required permissions.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- ruby, shell
- Domain
- devops
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100