Running self-hosted action service as root: In consistent `helm env` between manual and action-workflow invocations
Describe the bug Note: Self-Hosted actions-runner service ran by the root user Note: helm version 3 Issue: Getting empty helm repo list while repo has already been added to service runner account (root user only) Observation: Discrepancies in helm env variables, $HOM path is missing when "helm env" is invoked in action workflows. See below ....
manual invocation of "helm env": HELM_CACHE_HOME="/root/.cache/helm" HELM_CONFIG_HOME="/root/.config/helm" HELM_DATA_HOME="/root/.local/share/helm" HELM_PLUGINS="/root/.local/share/helm/plugins" HELM_REGISTRY_CONFIG="/root/.config/helm/registry/config.json" HELM_REPOSITORY_CACHE="/root/.cache/helm/repository" HELM_REPOSITORY_CONFIG="/root/.config/helm/repositories.yaml"
workflow invocation of "helm env": HELM_CACHE_HOME=".cache/helm" HELM_CONFIG_HOME=".config/helm" HELM_DATA_HOME=".local/share/helm" HELM_PLUGINS=".local/share/helm/plugins" HELM_REGISTRY_CONFIG=".config/helm/registry/config.json" HELM_REPOSITORY_CACHE=".cache/helm/repository" HELM_REPOSITORY_CONFIG=".config/helm/repositories.yaml"
To Reproduce Steps to reproduce the behavior:
- Clean deployment of self-hosted action-runner server verion: linux-x64-2.308.0 by root user
- Attempt PostgreSQL deployment using helm
- Add 'helm env' and 'helm repo list' In the workflow, 'helm env' should produce env variables without $HOME path, and 'helm repo list' would result in empty repo' while repo has already been added and helm repo has been updated
Expected behavior successful retrieval of helm repo list which allows successful helm deployment
Runner Version and Platform
Runner Version: 2.308.0 Platform: Ubuntu linux server 22.04 Architecture: x86 OS: Ubuntu linux server 22.04
What's not working?
Run helm repo list Error: no repositories to show Error: Process completed with exit code 1.
Job Log Output
If applicable, include the relevant part of the job / step log output here. All sensitive information should already be masked out, but please double-check before pasting here.
Runner and Worker's Diagnostic Logs
If applicable, add relevant diagnostic log information. Logs are located in the runner's _diag folder. The runner logs are prefixed with Runner_ and the worker logs are prefixed with Worker_. Each job run correlates to a worker log. All sensitive information should already be masked out, but please double-check before pasting here.
Additional observation: It appears that $HOME is empty when actions-runner service is ran by the root user. adding HOME=/root to .env resolved the issue. Is it a bug or actions-runner service request additional configuration when runs by the root user?
This issue is stale because it has been open 365 days with no activity. Remove stale label or comment or this will be closed in 15 days.
This issue was closed because it has been stalled for 15 days with no activity.