open-horizon / open-horizon/devops
Attempting to deploy mgmt hub services on OpenShift (k8s) results in file permissions issues
Nobody has claimed this yet.
- Dominant language
- Shell
- Stars
- 12
- Forks
- 46
- PR merge metrics
- No merged PRs in 30d
Description
A long standing issue in OpenShift causes a variety of issues, generally resulting in the non-root user being unable to read or write any files at all.
The relevant YAML files can be found here: https://github.com/illeatmyhat/devops/tree/k8s/mgmt-hub/k8s
This manifests in the management hub services as
agbot:
Error: container create failed: time="2021-07-02T09:37:28-05:00" level=error msg="container_linux.go:366: starting container process caused: chdir to cwd (\"/home/agbotuser\") set in config.json failed: permission denied"
css:
/usr/edge-sync-service/bin/css_start.sh: line 3: /etc/edge-sync-service/sync.conf: Permission denied
/usr/edge-sync-service/bin/css_start.sh: line 4: /home/cssuser/cloud-sync-service: Permission denied
exchange:
/bin/sh: /etc/horizon/exchange/config.json: Read-only file system
sdo:
Error: container create failed: time="2021-07-02T09:51:15-05:00" level=error msg="container_linux.go:366: starting container process caused: chdir to cwd (\"/home/sdouser\") set in config.json failed: permission denied"
The databases, mongo and postgres, have dedicated OpenShift images which already work.
Particularly, they seem to take the solution of changing the ownership and permissions of relevant directories: https://github.com/sclorg/postgresql-container/blob/generated/13/root/usr/libexec/fix-permissions
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 the YAML files under mgmt-hub/k8s and compare the management hub service deployments with the working MongoDB and PostgreSQL OpenShift images. Review the referenced sclorg fix-permissions implementation, then test the deployments on OpenShift; done means agbot, css, exchange, and sdo can start and read or write their required files without permission errors.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- kubernetes, shell
- Domain
- devops, infrastructure
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100