Error executing action `delete` on resource 'file[/opt/gitlab/etc/gitaly/env]'
Summary
Error occurs during gitlab-ctl reconfigure
and during update.
Steps to reproduce
Run gitlab-ctl reconfigure
What is the current bug behavior?
Reconfigure or update shows 2 errors
What is the expected correct behavior?
Reconfigure without errors
Relevant logs and/or screenshots
file[/opt/gitlab/etc/gitaly/env] action delete
================================================================================
Error executing action `delete` on resource 'file[/opt/gitlab/etc/gitaly/env]'
================================================================================
Errno::EISDIR
-------------
Is a directory - read
Resource Declaration:
---------------------
In /opt/gitlab/embedded/cookbooks/cache/cookbooks/package/resources/env_dir.rb
31: file ::File.join(name, deleted_var) do
32: action :delete
33: restarts.each do |svc|
34: notifies :restart, svc
35: end
36: end
37: end
Compiled Resource:
------------------
Declared in /opt/gitlab/embedded/cookbooks/cache/cookbooks/package/resources/env_dir.rb:31:in `block (2 levels) in class_from_file'
file("/opt/gitlab/etc/gitaly/env") do
action [:delete]
retries 0
retry_delay 2
default_guard_interpreter :default
declared_type :file
cookbook_name "gitaly"
path "/opt/gitlab/etc/gitaly/env"
end
Platform:
---------
x86_64-linux
================================================================================
Error executing action `create` on resource 'env_dir[/opt/gitlab/etc/gitaly]'
================================================================================
Errno::EISDIR
-------------
file[/opt/gitlab/etc/gitaly/env] (/opt/gitlab/embedded/cookbooks/cache/cookbooks/package/resources/env_dir.rb line 31) had an error: Errno::EISDIR: Is a directory - read
Resource Declaration:
---------------------
In /opt/gitlab/embedded/cookbooks/cache/cookbooks/gitaly/recipes/enable.rb
47: env_dir env_directory do
48: variables node['gitaly']['env']
49: restarts ["service[gitaly]"]
50: end
51:
Compiled Resource:
------------------
Declared in /opt/gitlab/embedded/cookbooks/cache/cookbooks/gitaly/recipes/enable.rb:47:in `from_file'
env_dir("/opt/gitlab/etc/gitaly") do
action [:create]
retries 0
retry_delay 2
default_guard_interpreter :default
declared_type :env_dir
cookbook_name "gitaly"
recipe_name "enable"
variables {"HOME"=>"/var/opt/gitlab", "PATH"=>"/opt/gitlab/bin:/opt/gitlab/embedded/bin:/bin:/usr/bin", "TZ"=>":/etc/localtime"}
restarts ["service[gitaly]"]
end
Platform:
---------
x86_64-linux
Running handlers:
There was an error running gitlab-ctl reconfigure:
env_dir[/opt/gitlab/etc/gitaly] (gitaly::enable line 47) had an error: Errno::EISDIR: file[/opt/gitlab/etc/gitaly/env] (/opt/gitlab/embedded/cookbooks/cache/cookbooks/package/resources/env_dir.rb line 31) had an error: Errno::EISDIR: Is a directory - read
Running handlers complete
Chef Client failed. 3 resources updated in 22 seconds
==> /var/log/gitlab/alertmanager/current <==
2019-02-25_07:25:29.87732 chpst: fatal: unable to run: /opt/gitlab/embedded/bin/alertmanager: file does not exist
2019-02-25_07:25:30.88263 chpst: fatal: unable to run: /opt/gitlab/embedded/bin/alertmanager: file does not exist
Output of checks
(If you are reporting a bug on GitLab.com, write: This bug happens on GitLab.com)
Results of GitLab environment info
System information System: CentOS 7.0
GitLab information Version: 10.4.0
Results of GitLab application Check
Checking GitLab Shell ...
GitLab Shell version >= 5.11.0 ? ... OK (5.11.0)
Repo base directory exists?
default... yes
Repo storage directories are symlinks?
default... no
Repo paths owned by git:root, or git:git?
default... yes
Repo paths access is drwxrws---?
default... yes
hooks directories in repos are links: ...
2/2 ... ok
2/3 ... ok
2/4 ... ok
2/5 ... ok
2/6 ... ok
2/7 ... ok
2/8 ... ok
9/9 ... ok
10/10 ... ok
10/11 ... ok
10/12 ... ok
10/13 ... ok
10/14 ... repository is empty
10/15 ... ok
2/16 ... ok
12/20 ... ok
12/21 ... ok
12/22 ... ok
2/23 ... ok
2/24 ... ok
Running /opt/gitlab/embedded/service/gitlab-shell/bin/check
Check GitLab API access: OK
Redis available via internal API: OK
Access to /var/opt/gitlab/.ssh/authorized_keys: OK
gitlab-shell self-check successful
Checking GitLab Shell ... Finished
Checking Sidekiq ...
Running? ... yes
Number of Sidekiq processes ... 1
Checking Sidekiq ... Finished
Reply by email is disabled in config/gitlab.yml
Checking LDAP ...
LDAP is disabled in config/gitlab.yml
Checking LDAP ... Finished
Checking GitLab ...
Git configured correctly? ... yes
Database config exists? ... yes
All migrations up? ... yes
Database contains orphaned GroupMembers? ... no
GitLab config exists? ... yes
GitLab config up to date? ... yes
Log directory writable? ... yes
Tmp directory writable? ... yes
Uploads directory exists? ... yes
Uploads directory has correct permissions? ... yes
Uploads directory tmp has correct permissions? ... yes
Init script exists? ... skipped (omnibus-gitlab has no init script)
Init script up-to-date? ... skipped (omnibus-gitlab has no init script)
Projects have namespace: ...
2/2 ... yes
2/3 ... yes
2/4 ... yes
2/5 ... yes
2/6 ... yes
2/7 ... yes
2/8 ... yes
9/9 ... yes
10/10 ... yes
10/11 ... yes
10/12 ... yes
10/13 ... yes
10/14 ... yes
10/15 ... yes
2/16 ... yes
12/20 ... yes
12/21 ... yes
12/22 ... yes
2/23 ... yes
2/24 ... yes
Redis version >= 2.8.0? ... yes
Ruby version >= 2.3.5 ? ... yes (2.3.6)
Git version >= 2.7.3 ? ... yes (2.14.3)
Git user has default SSH configuration? ... yes
Active users: ... 9
Checking GitLab ... Finished
Possible fixes
(If you can, link to the line of code that might be responsible for the problem)
Edited by wangyancheng