Upgrade gitlab 9.5.10-ce.0 to 10.8.6-ce.0 for error reporting
Summary
When I updated gitlab 9.5.10-ce.0 to 10.8.6-ce.0, I encountered this error
Thank you for using GitLab Docker Image!
2019/8/13 上午9:05:21 Current version: gitlab-ce=10.8.6-ce.0
2019/8/13 上午9:05:21
2019/8/13 上午9:05:21 Configure GitLab for your system by editing /etc/gitlab/gitlab.rb file
2019/8/13 上午9:05:21 And restart this container to reload settings.
2019/8/13 上午9:05:21 To do it use docker exec:
2019/8/13 上午9:05:21
2019/8/13 上午9:05:21 docker exec -it gitlab vim /etc/gitlab/gitlab.rb
2019/8/13 上午9:05:21 docker restart gitlab
2019/8/13 上午9:05:21
2019/8/13 上午9:05:21 For a comprehensive list of configuration options please see the Omnibus GitLab readme
2019/8/13 上午9:05:21 https://gitlab.com/gitlab-org/omnibus-gitlab/blob/master/README.md
2019/8/13 上午9:05:21
2019/8/13 上午9:05:21 If this container fails to start due to permission problems try to fix it by executing:
2019/8/13 上午9:05:21
2019/8/13 上午9:05:21 docker exec -it gitlab update-permissions
2019/8/13 上午9:05:21 docker restart gitlab
2019/8/13 上午9:05:21
2019/8/13 上午9:05:24 Preparing services...
2019/8/13 上午9:05:24 Starting services...
2019/8/13 上午9:05:24 Configuring GitLab package...
2019/8/13 上午9:05:24 /opt/gitlab/embedded/bin/runsvdir-start: line 34: ulimit: max user processes: cannot modify limit: Operation not permitted
2019/8/13 上午9:05:24 /opt/gitlab/embedded/bin/runsvdir-start: line 37: /proc/sys/fs/file-max: Read-only file system
2019/8/13 上午9:05:25 JSON file with existing configuration not found inside /opt/gitlab/embedded/nodes.
2019/8/13 上午9:05:25 Skipping config check.
2019/8/13 上午9:05:25 gitlab preinstall:
2019/8/13 上午9:05:25 gitlab preinstall: This node does not appear to be running a database
2019/8/13 上午9:05:25 gitlab preinstall: Skipping version check, if you think this is an error exit now
2019/8/13 上午9:05:25 gitlab preinstall:
2019/8/13 上午9:05:25 Configuring GitLab...
2019/8/13 上午9:05:31 Starting Chef Client, version 13.6.4
2019/8/13 上午9:05:33 resolving cookbooks for run list: ["gitlab"]
2019/8/13 上午9:05:34 Synchronizing Cookbooks:
2019/8/13 上午9:05:35 - gitlab (0.0.1)
2019/8/13 上午9:05:35 - package (0.1.0)
2019/8/13 上午9:05:35 - postgresql (0.1.0)
2019/8/13 上午9:05:35 - registry (0.1.0)
2019/8/13 上午9:05:35 - mattermost (0.1.0)
2019/8/13 上午9:05:35 - consul (0.0.0)
2019/8/13 上午9:05:35 - gitaly (0.1.0)
2019/8/13 上午9:05:36 - letsencrypt (0.1.0)
2019/8/13 上午9:05:36 - nginx (0.1.0)
2019/8/13 上午9:05:36 - runit (0.14.2)
2019/8/13 上午9:05:36 - acme (3.1.0)
2019/8/13 上午9:05:36 - crond (0.1.0)
2019/8/13 上午9:05:36 - compat_resource (12.19.0)
2019/8/13 上午9:05:36 Installing Cookbook Gems:
2019/8/13 上午9:05:36 Compiling Cookbooks...
2019/8/13 上午9:05:38
2019/8/13 上午9:05:38 ================================================================================
2019/8/13 上午9:05:38 Recipe Compile Error in /opt/gitlab/embedded/cookbooks/cache/cookbooks/gitlab/recipes/default.rb
2019/8/13 上午9:05:38 ================================================================================
2019/8/13 上午9:05:38
2019/8/13 上午9:05:38 NoMethodError
2019/8/13 上午9:05:38 -------------
2019/8/13 上午9:05:38 undefined method `any?' for "/gitlab-data/git-data":String
2019/8/13 上午9:05:38
2019/8/13 上午9:05:38 Cookbook Trace:
2019/8/13 上午9:05:38 ---------------
2019/8/13 上午9:05:38 /opt/gitlab/embedded/cookbooks/cache/cookbooks/gitaly/libraries/gitaly.rb:77:in `converted_git_data_dirs'
2019/8/13 上午9:05:38 /opt/gitlab/embedded/cookbooks/cache/cookbooks/gitaly/libraries/gitaly.rb:94:in `parse_git_data_dirs'
2019/8/13 上午9:05:38 /opt/gitlab/embedded/cookbooks/cache/cookbooks/gitaly/libraries/gitaly.rb:26:in `parse_variables'
2019/8/13 上午9:05:38 /opt/gitlab/embedded/cookbooks/cache/cookbooks/package/libraries/helpers/settings_helper.rb:174:in `block in generate_config'
2019/8/13 上午9:05:38 /opt/gitlab/embedded/cookbooks/cache/cookbooks/package/libraries/helpers/settings_helper.rb:172:in `each'
2019/8/13 上午9:05:38 /opt/gitlab/embedded/cookbooks/cache/cookbooks/package/libraries/helpers/settings_helper.rb:172:in `generate_config'
2019/8/13 上午9:05:38 /opt/gitlab/embedded/cookbooks/cache/cookbooks/gitlab/recipes/config.rb:26:in `from_file'
2019/8/13 上午9:05:38 /opt/gitlab/embedded/cookbooks/cache/cookbooks/gitlab/recipes/default.rb:26:in `from_file'
2019/8/13 上午9:05:38
2019/8/13 上午9:05:38 Relevant File Content:
2019/8/13 上午9:05:38 ----------------------
2019/8/13 上午9:05:38 /opt/gitlab/embedded/cookbooks/cache/cookbooks/gitaly/libraries/gitaly.rb:
2019/8/13 上午9:05:38
2019/8/13 上午9:05:38 70: # Before version 8.10 we used git_data_dir configuration, which had a string representing a path as value.
2019/8/13 上午9:05:38 71: # From version 8.10 till version 8.17.8, we used git_data_dirs configuration, which had a { <name> => <path> } hash as value.
2019/8/13 上午9:05:38 72: # Now, since version 9.0, git_data_dirs has a { <name> => {"path" => <path> } } hash as value.
2019/8/13 上午9:05:38 73: # So we convert all the old formats to the new one, until we remove the support of them.
2019/8/13 上午9:05:38 74:
2019/8/13 上午9:05:38 75: git_data_dirs = Gitlab['git_data_dirs']
2019/8/13 上午9:05:38 76: git_data_dir = Gitlab['git_data_dir']
2019/8/13 上午9:05:38 77>> return { "default" => { "path" => "/var/opt/gitlab/git-data" } } unless git_data_dirs.any? || git_data_dir
2019/8/13 上午9:05:38 78:
2019/8/13 上午9:05:38 79: if git_data_dirs.any?
2019/8/13 上午9:05:38 80: Mash.new(Hash[git_data_dirs.map do |name, data_directory|
2019/8/13 上午9:05:38 81: if data_directory.is_a?(String)
2019/8/13 上午9:05:38 82: [name, { 'path' => data_directory }]
2019/8/13 上午9:05:38 83: else
2019/8/13 上午9:05:38 84: [name, data_directory]
2019/8/13 上午9:05:38 85: end
2019/8/13 上午9:05:38 86: end])
2019/8/13 上午9:05:38
2019/8/13 上午9:05:38 System Info:
2019/8/13 上午9:05:38 ------------
2019/8/13 上午9:05:38 chef_version=13.6.4
2019/8/13 上午9:05:38 platform=ubuntu
2019/8/13 上午9:05:38 platform_version=16.04
2019/8/13 上午9:05:38 ruby=ruby 2.3.7p456 (2018-03-28 revision 63024) [x86_64-linux]
2019/8/13 上午9:05:38 program_name=/opt/gitlab/embedded/bin/chef-client
2019/8/13 上午9:05:38 executable=/opt/gitlab/embedded/bin/chef-client
2019/8/13 上午9:05:38
2019/8/13 上午9:05:38
2019/8/13 上午9:05:38 Running handlers:
2019/8/13 上午9:05:38 There was an error running gitlab-ctl reconfigure:
2019/8/13 上午9:05:38
2019/8/13 上午9:05:38 undefined method `any?' for "/gitlab-data/git-data":String
2019/8/13 上午9:05:38
2019/8/13 上午9:05:38 Running handlers complete
2019/8/13 上午9:05:38 Chef Client failed. 0 resources updated in 06 seconds
Steps to reproduce
apiVersion: apps/v1beta2
kind: Deployment
metadata:
annotations:
deployment.kubernetes.io/revision: "14"
creationTimestamp: 2019-07-11T02:41:49z
generation: 47
labels:
app: gitlab-ce-gitlab-ce
name: gitlab-ce-gilab-ce
namespace: gitlab
spec:
progressDeadlineSeconds: 600
replicas: 1
selector:
matchLabels:
app: gitlab-ce-gitlab-ce
strategy:
rollingUpdate:
maxSurge: 1
maxUnavailable: 1
type: RollingUpdate
template:
metadata:
annotations:
cattle.io/timestamp: 2019-08-02T09:11:50.000Z
field.cattle.io/ports: '[[{"containerPort":22,"dnsName":"gitlab-ce-gitlab-ce-","name":"ssh","protocol":"TCP","sourcePort":0},{"containerPort":80,"dnsName":"gitlab-ce-gitlab-ce-","name":"http","protocol":"TCP","sourcePort":0},{"containerPort":443,"dnsName":"gitlab-ce-gitlab-ce-","name":"https","protocol":"TCP","sourcePort":0}]]'
creationTimestamp: null
labels:
app: gitlab-ce-gitlab-ce
spec:
containers:
- env:
- name: DB_DATABASE
value: gitlab
- name: DB_HOST
value: gitlab-ce-postgresql
- name: EXTERNAL_URL
value: https://gitlab-test.xxx.com
- name: GITLAB_ROOT_PASSWORD
- name: REDIS_HOST
value: gitlab-ce-redis
- name: GITLAB_OMNIBUS_CONFIG
valueFrom:
configMapKeyRef:
key: gitlab_omnibus_config
name: gitlab-ce-gitlab-ce
optional: false
- name: DB_USER
valueFrom:
secretKeyRef:
key: db-user
name: gitlab-ce-gitlab-ce
optional: false
- name: DB_PASSWORD
valueFrom:
secretKeyRef:
key: db-password
name: gitlab-ce-gitlab-ce
optional: false
- name: REDIS_PASSWORD
valueFrom:
secretKeyRef:
key: redis-password
name: gitlab-ce-gitlab-ce
optional: false
image: gitlab/gitlab-ce:10.8.6-ce.0
imagePullPolicy: IfNotPresent
name: gitlab-ce-gitlab-ce
ports:
- containerPort: 22
name: ssh
protocol: TCP
- containerPort: 80
name: http
protocol: TCP
- containerPort: 443
name: https
protocol: TCP
resources:
limits:
cpu: "1"
memory: 2Gi
requests:
cpu: 500m
memory: 1Gi
securityContext:
capabilities: {}
terminationMessagePath: /dev/termination-log
terminationMessagePolicy: File
volumeMounts:
- mountPath: /etc/gitlab
name: gitlab-etc
- mountPath: /gitlab-data
name: gitlab-data
- mountPath: /etc/gitlab/ssl
name: gitlab-crt
dnsPolicy: ClusterFirst
restartPolicy: Always
schedulerName: default-scheduler
securityContext: {}
terminationGracePeriodSeconds: 30
volumes:
- name: gitlab-etc
persistentVolumeClaim:
claimName: gitlab-ce-gitlab-ce-etc
- name: gitlab-data
persistentVolumeClaim:
claimName: gitlab-ce-gitlab-ce-data
- configMap:
defaultMode: 420
name: gitlab-ce-gitlab-ce-crt
name: gitlab-crt
status:
conditions:
- lastTransitionTime: 2019-07-11T02:41:49Z
lastUpdateTime: 2019-07-11T02:41:49Z
message: Deployment has minimum availability.
reason: MinimumReplicasAvailable
status: "True"
type: Available
- lastTransitionTime: 2019-08-02T09:28:27Z
lastUpdateTime: 2019-08-12T04:17:25Z
message: ReplicaSet "gitlab-ce-gitlab-ce-66ffcb48f5" has successfully progressed.
reason: NewReplicaSetAvailable
status: "True"
type: Progressing
observedGeneration: 47
replicas: 1
unavailableReplicas: 1
updatedReplicas: 1
This is my deployment(I removed the health check for debugging), when I changed mirror times wrong. My configmap configuration information is listed below
What is the current bug behavior?
Container keeps restarting
What is the expected correct behavior?
Update correctly.
Environment details
k8s:1.9.6 docker: 17.6.2
Configuration details
my configmap
apiVersion: v1
kind: ConfigMap
data:
gitlab_omnibus_config: |
external_url ENV['EXTERNAL_URL'];
root_pass = ENV['GITLAB_ROOT_PASSWORD'];
gitlab_rails['initial_root_password'] = root_pass unless root_pass.to_s == '';
postgresql['enable'] = false;
gitlab_rails['db_host'] = ENV['DB_HOST'];
gitlab_rails['db_password'] = ENV['DB_PASSWORD'];
gitlab_rails['db_username'] = ENV['DB_USER'];
gitlab_rails['db_database'] = ENV['DB_DATABASE'];
redis['enable'] = false;
gitlab_rails['redis_host'] = ENV['REDIS_HOST'];
gitlab_rails['redis_password'] = ENV['REDIS_PASSWORD'];
unicorn['worker_processes'] = 2;
manage_accounts['enable'] = true;
manage_storage_directories['manage_etc'] = false;
gitlab_shell['auth_file'] = '/gitlab-data/ssh/authorized_keys';
git_data_dirs '/gitlab-data/git-data';
gitlab_rails['shared_path'] = '/gitlab-data/shared';
gitlab_rails['uploads_directory'] = '/gitlab-data/uploads';
/label ~bug
Edited by 微小爱