sameersbn / sameersbn/docker-gitlab
sed: cannot rename /home/git/gitlab/config/gitlab.yml: Invalid argument
Open
Nobody has claimed this yet.
wontfix
- Dominant language
- Shell
- Stars
- 8.1k
- Forks
- 2.1k
- Avg merge
- 17h 47m
- Merged PRs (30d)
- 7
Description
Hi,
I install docker-gitlab 11.1.4 on kubernetes, occur errors:
+ export GITLAB_REGISTRY_ENABLED GITLAB_REGISTRY_DIR GITLAB_REGISTRY_HOST GITLAB_REGISTRY_PORT GITLAB_REGISTRY_API_URL GITLAB_REGISTRY_KEY_PATH GITLAB_REGISTRY_ISSUER
+ local IFS=:
+ sudo -HEu git envsubst '$GITLAB_REGISTRY_ENABLED:$GITLAB_REGISTRY_DIR:$GITLAB_REGISTRY_HOST:$GITLAB_REGISTRY_PORT:$GITLAB_REGISTRY_API_URL:$GITLAB_REGISTRY_KEY_PATH:$GITLAB_REGISTRY_ISSUER'
+ rm -f /tmp/tmp.8NjmKpkOeI
+ gitlab_configure_pages
+ echo 'Configuring gitlab::pages...'
+ update_template /home/git/gitlab/config/gitlab.yml GITLAB_PAGES_ENABLED GITLAB_PAGES_DOMAIN GITLAB_PAGES_PORT GITLAB_PAGES_HTTPS GITLAB_PAGES_ARTIFACTS_SERVER
Configuring gitlab::pages...
+ local FILE=/home/git/gitlab/config/gitlab.yml
+ shift
+ [[ ! -f /home/git/gitlab/config/gitlab.yml ]]
+ VARIABLES=($@)
+ local VARIABLES
++ stat -c %U /home/git/gitlab/config/gitlab.yml
+ local USR=git
++ mktemp
+ local tmp_file=/tmp/tmp.gJuhOifOrk
+ cp -a /home/git/gitlab/config/gitlab.yml /tmp/tmp.gJuhOifOrk
+ local variable
+ for variable in '${VARIABLES[@]}'
+ sed -ri 's/[{]{2}GITLAB_PAGES_ENABLED[}]{2}/${GITLAB_PAGES_ENABLED}/g' /tmp/tmp.gJuhOifOrk
+ for variable in '${VARIABLES[@]}'
+ sed -ri 's/[{]{2}GITLAB_PAGES_DOMAIN[}]{2}/${GITLAB_PAGES_DOMAIN}/g' /tmp/tmp.gJuhOifOrk
+ for variable in '${VARIABLES[@]}'
+ sed -ri 's/[{]{2}GITLAB_PAGES_PORT[}]{2}/${GITLAB_PAGES_PORT}/g' /tmp/tmp.gJuhOifOrk
+ for variable in '${VARIABLES[@]}'
+ sed -ri 's/[{]{2}GITLAB_PAGES_HTTPS[}]{2}/${GITLAB_PAGES_HTTPS}/g' /tmp/tmp.gJuhOifOrk
+ for variable in '${VARIABLES[@]}'
+ sed -ri 's/[{]{2}GITLAB_PAGES_ARTIFACTS_SERVER[}]{2}/${GITLAB_PAGES_ARTIFACTS_SERVER}/g' /tmp/tmp.gJuhOifOrk
+ export GITLAB_PAGES_ENABLED GITLAB_PAGES_DOMAIN GITLAB_PAGES_PORT GITLAB_PAGES_HTTPS GITLAB_PAGES_ARTIFACTS_SERVER
+ local IFS=:
+ sudo -HEu git envsubst '$GITLAB_PAGES_ENABLED:$GITLAB_PAGES_DOMAIN:$GITLAB_PAGES_PORT:$GITLAB_PAGES_HTTPS:$GITLAB_PAGES_ARTIFACTS_SERVER'
+ rm -f /tmp/tmp.gJuhOifOrk
+ [[ -n '' ]]
+ exec_as_git sed -ie '/{{GITLAB_PAGES_EXTERNAL_HTTP}}/d' /home/git/gitlab/config/gitlab.yml
++ whoami
+ [[ root == git ]]
+ sudo -HEu git sed -ie '/{{GITLAB_PAGES_EXTERNAL_HTTP}}/d' /home/git/gitlab/config/gitlab.yml
sed: cannot rename /home/git/gitlab/config/gitlab.yml: Invalid argument
kubernetes Pod status:CrashLoopBackOff
anyone help me? What is the solution? Thanks!
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 shell entry points update_template and exec_as_git shown in the trace, then reproduce the sed -ie rename failure in the Kubernetes container. Check how /home/git/gitlab/config/gitlab.yml is mounted and whether this configuration update path supports it. Done means startup completes without CrashLoopBackOff and the generated configuration is updated.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- docker, kubernetes, shell
- Domain
- devops, infrastructure
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 28/100