Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GithostingShellWorker Repository not created on disk when Sidekiq active #800

Open
HighwayStar opened this issue Oct 18, 2021 · 8 comments
Labels

Comments

@HighwayStar
Copy link

We have upgraded redmine to version

Environment:
Redmine version 4.2.2.stable
Ruby version 2.7.3-p183 (2021-04-05) [x86_64-linux]
Rails version 5.2.6

and using
redmine_git_hosting 208bdb8

sidekiq gem is 6.2.2

021-10-18T07:46:41.821Z pid=7691 tid=3c7n class=GithostingShellWorker jid=93897a5509bf55e0cd1afb60 INFO: start
2021-10-18T07:46:41.822Z pid=7691 tid=3c7n class=GithostingShellWorker jid=93897a5509bf55e0cd1afb60 elapsed=0.001 INFO: fail
2021-10-18T07:46:41.822Z pid=7691 tid=3c7n WARN: {"context":"Job raised exception","job":{"retry":false,"queue":"redmine_git_hosting","class":"GithostingShellWorker","args":["add_repository",324,{"create_readme_file":false,"enable_git_annex":false}],"jid":"93897a5509bf55e0cd1afb60","created_at":1634543201.820981,"enqueued_at":1634543201.821029},"jobstr":"{\"retry\":false,\"queue\":\"redmine_git_hosting\",\"class\":\"GithostingShellWorker\",\"args\":[\"add_repository\",324,{\"create_readme_file\":false,\"enable_git_annex\":false}],\"jid\":\"93897a5509bf55e0cd1afb60\",\"created_at\":1634543201.820981,\"enqueued_at\":1634543201.821029}"}
2021-10-18T07:46:41.822Z pid=7691 tid=3c7n WARN: ArgumentError: wrong number of arguments (given 3, expected 2)
2021-10-18T07:46:41.822Z pid=7691 tid=3c7n WARN: /srv/redmine/plugins/redmine_git_hosting/app/workers/githosting_shell_worker.rb:17:in `perform'
/srv/redmine/bundler/ruby/2.7.0/gems/sidekiq-6.2.2/lib/sidekiq/processor.rb:196:in `execute_job'
/srv/redmine/bundler/ruby/2.7.0/gems/sidekiq-6.2.2/lib/sidekiq/processor.rb:164:in `block (2 levels) in process'
/srv/redmine/bundler/ruby/2.7.0/gems/sidekiq-6.2.2/lib/sidekiq/middleware/chain.rb:133:in `invoke'
/srv/redmine/bundler/ruby/2.7.0/gems/sidekiq-6.2.2/lib/sidekiq/processor.rb:163:in `block in process'
/srv/redmine/bundler/ruby/2.7.0/gems/sidekiq-6.2.2/lib/sidekiq/processor.rb:136:in `block (6 levels) in dispatch'
/srv/redmine/bundler/ruby/2.7.0/gems/sidekiq-6.2.2/lib/sidekiq/job_retry.rb:112:in `local'
/srv/redmine/bundler/ruby/2.7.0/gems/sidekiq-6.2.2/lib/sidekiq/processor.rb:135:in `block (5 levels) in dispatch'
/srv/redmine/bundler/ruby/2.7.0/gems/sidekiq-6.2.2/lib/sidekiq/rails.rb:14:in `block in call'
/srv/redmine/bundler/ruby/2.7.0/gems/activesupport-5.2.6/lib/active_support/execution_wrapper.rb:87:in `wrap'
/srv/redmine/bundler/ruby/2.7.0/gems/activesupport-5.2.6/lib/active_support/reloader.rb:73:in `block in wrap'
/srv/redmine/bundler/ruby/2.7.0/gems/activesupport-5.2.6/lib/active_support/execution_wrapper.rb:87:in `wrap'
/srv/redmine/bundler/ruby/2.7.0/gems/activesupport-5.2.6/lib/active_support/reloader.rb:72:in `wrap'
/srv/redmine/bundler/ruby/2.7.0/gems/sidekiq-6.2.2/lib/sidekiq/rails.rb:13:in `call'
/srv/redmine/bundler/ruby/2.7.0/gems/sidekiq-6.2.2/lib/sidekiq/processor.rb:131:in `block (4 levels) in dispatch'
/srv/redmine/bundler/ruby/2.7.0/gems/sidekiq-6.2.2/lib/sidekiq/processor.rb:257:in `stats'
/srv/redmine/bundler/ruby/2.7.0/gems/sidekiq-6.2.2/lib/sidekiq/processor.rb:126:in `block (3 levels) in dispatch'
/srv/redmine/bundler/ruby/2.7.0/gems/sidekiq-6.2.2/lib/sidekiq/job_logger.rb:13:in `call'
/srv/redmine/bundler/ruby/2.7.0/gems/sidekiq-6.2.2/lib/sidekiq/processor.rb:125:in `block (2 levels) in dispatch'
/srv/redmine/bundler/ruby/2.7.0/gems/sidekiq-6.2.2/lib/sidekiq/job_retry.rb:79:in `global'
/srv/redmine/bundler/ruby/2.7.0/gems/sidekiq-6.2.2/lib/sidekiq/processor.rb:124:in `block in dispatch'
/srv/redmine/bundler/ruby/2.7.0/gems/sidekiq-6.2.2/lib/sidekiq/logger.rb:11:in `with'
/srv/redmine/bundler/ruby/2.7.0/gems/sidekiq-6.2.2/lib/sidekiq/job_logger.rb:33:in `prepare'
/srv/redmine/bundler/ruby/2.7.0/gems/sidekiq-6.2.2/lib/sidekiq/processor.rb:123:in `dispatch'
/srv/redmine/bundler/ruby/2.7.0/gems/sidekiq-6.2.2/lib/sidekiq/processor.rb:162:in `process'
/srv/redmine/bundler/ruby/2.7.0/gems/sidekiq-6.2.2/lib/sidekiq/processor.rb:78:in `process_one'
/srv/redmine/bundler/ruby/2.7.0/gems/sidekiq-6.2.2/lib/sidekiq/processor.rb:68:in `run'
/srv/redmine/bundler/ruby/2.7.0/gems/sidekiq-6.2.2/lib/sidekiq/util.rb:43:in `watchdog'
/srv/redmine/bundler/ruby/2.7.0/gems/sidekiq-6.2.2/lib/sidekiq/util.rb:52:in `block in safe_thread'

Repository fails to create git dir on disk

@HighwayStar HighwayStar changed the title GithostingShellWorker Repository not created on disk GithostingShellWorker Repository not created on disk when Sidekiq active Oct 18, 2021
@alexandermeindl
Copy link
Collaborator

Hi @HighwayStar,
I commited a fix for this to master. Can you try, if it works for you?

@HighwayStar
Copy link
Author

HighwayStar commented Oct 22, 2021

Thank you! Tested with updated code, but issue still here (in sidekiq log output)

2021-10-22T04:18:09.117Z pid=24262 tid=2zje WARN: ArgumentError: wrong number of arguments (given 3, expected 2)
2021-10-22T04:18:09.117Z pid=24262 tid=2zje WARN: /srv/redmine/plugins/redmine_git_hosting/lib/redmine_git_hosting/gitolite_wrapper.rb:13:in `resync_gitolite'
/srv/redmine/plugins/redmine_git_hosting/app/workers/githosting_shell_worker.rb:19:in `perform'
/srv/redmine/bundler/ruby/2.7.0/gems/sidekiq-6.2.2/lib/sidekiq/processor.rb:196:in `execute_job'
/srv/redmine/bundler/ruby/2.7.0/gems/sidekiq-6.2.2/lib/sidekiq/processor.rb:164:in `block (2 levels) in process'
/srv/redmine/bundler/ruby/2.7.0/gems/sidekiq-6.2.2/lib/sidekiq/middleware/chain.rb:133:in `invoke'
/srv/redmine/bundler/ruby/2.7.0/gems/sidekiq-6.2.2/lib/sidekiq/processor.rb:163:in `block in process'
/srv/redmine/bundler/ruby/2.7.0/gems/sidekiq-6.2.2/lib/sidekiq/processor.rb:136:in `block (6 levels) in dispatch'
/srv/redmine/bundler/ruby/2.7.0/gems/sidekiq-6.2.2/lib/sidekiq/job_retry.rb:112:in `local'
/srv/redmine/bundler/ruby/2.7.0/gems/sidekiq-6.2.2/lib/sidekiq/processor.rb:135:in `block (5 levels) in dispatch'
/srv/redmine/bundler/ruby/2.7.0/gems/sidekiq-6.2.2/lib/sidekiq/rails.rb:14:in `block in call'
/srv/redmine/bundler/ruby/2.7.0/gems/activesupport-5.2.6/lib/active_support/execution_wrapper.rb:87:in `wrap'
/srv/redmine/bundler/ruby/2.7.0/gems/activesupport-5.2.6/lib/active_support/reloader.rb:73:in `block in wrap'
/srv/redmine/bundler/ruby/2.7.0/gems/activesupport-5.2.6/lib/active_support/execution_wrapper.rb:87:in `wrap'
/srv/redmine/bundler/ruby/2.7.0/gems/activesupport-5.2.6/lib/active_support/reloader.rb:72:in `wrap'
/srv/redmine/bundler/ruby/2.7.0/gems/sidekiq-6.2.2/lib/sidekiq/rails.rb:13:in `call'
/srv/redmine/bundler/ruby/2.7.0/gems/sidekiq-6.2.2/lib/sidekiq/processor.rb:131:in `block (4 levels) in dispatch'
/srv/redmine/bundler/ruby/2.7.0/gems/sidekiq-6.2.2/lib/sidekiq/processor.rb:257:in `stats'
/srv/redmine/bundler/ruby/2.7.0/gems/sidekiq-6.2.2/lib/sidekiq/processor.rb:126:in `block (3 levels) in dispatch'
/srv/redmine/bundler/ruby/2.7.0/gems/sidekiq-6.2.2/lib/sidekiq/job_logger.rb:13:in `call'
/srv/redmine/bundler/ruby/2.7.0/gems/sidekiq-6.2.2/lib/sidekiq/processor.rb:125:in `block (2 levels) in dispatch'
/srv/redmine/bundler/ruby/2.7.0/gems/sidekiq-6.2.2/lib/sidekiq/job_retry.rb:79:in `global'
/srv/redmine/bundler/ruby/2.7.0/gems/sidekiq-6.2.2/lib/sidekiq/processor.rb:124:in `block in dispatch'
/srv/redmine/bundler/ruby/2.7.0/gems/sidekiq-6.2.2/lib/sidekiq/logger.rb:11:in `with'
/srv/redmine/bundler/ruby/2.7.0/gems/sidekiq-6.2.2/lib/sidekiq/job_logger.rb:33:in `prepare'
/srv/redmine/bundler/ruby/2.7.0/gems/sidekiq-6.2.2/lib/sidekiq/processor.rb:123:in `dispatch'
/srv/redmine/bundler/ruby/2.7.0/gems/sidekiq-6.2.2/lib/sidekiq/processor.rb:162:in `process'
/srv/redmine/bundler/ruby/2.7.0/gems/sidekiq-6.2.2/lib/sidekiq/processor.rb:78:in `process_one'
/srv/redmine/bundler/ruby/2.7.0/gems/sidekiq-6.2.2/lib/sidekiq/processor.rb:68:in `run'
/srv/redmine/bundler/ruby/2.7.0/gems/sidekiq-6.2.2/lib/sidekiq/util.rb:43:in `watchdog'
/srv/redmine/bundler/ruby/2.7.0/gems/sidekiq-6.2.2/lib/sidekiq/util.rb:52:in `block in safe_thread'


@n-rodriguez
Copy link
Contributor

Did you restart Sidekiq after deploy?

@HighwayStar
Copy link
Author

Did you restart Sidekiq after deploy?

Sure, rechecked once more killed sidekiq, checked that there is no psidekiq process left and started it again. Same output.

@alexandermeindl
Copy link
Collaborator

Hi @HighwayStar

I made another fix, can you try it again with latest master?

@HighwayStar
Copy link
Author

Hi @HighwayStar

I made another fix, can you try it again with latest master?

yes, now different crash

2021-10-22T06:40:20.192Z pid=11686 tid=39ly WARN: ArgumentError: wrong number of arguments (given 4, expected 3)
2021-10-22T06:40:20.192Z pid=11686 tid=39ly WARN: /srv/redmine/plugins/redmine_git_hosting/lib/redmine_git_hosting/gitolite_handlers/repositories/base.rb:18:in `call'
/srv/redmine/plugins/redmine_git_hosting/lib/redmine_git_hosting/gitolite_wrappers/base.rb:52:in `create_gitolite_repository'
/srv/redmine/plugins/redmine_git_hosting/lib/redmine_git_hosting/gitolite_wrappers/repositories/add_repository.rb:21:in `block in create_repository'
/srv/redmine/bundler/ruby/2.7.0/bundler/gems/gitolite-rugged-4d24e45f97f9/lib/gitolite/gitolite_admin/accessors.rb:128:in `block in transaction'
/srv/redmine/bundler/ruby/2.7.0/bundler/gems/gitolite-rugged-4d24e45f97f9/lib/gitolite/gitolite_admin/accessors.rb:122:in `open'
/srv/redmine/bundler/ruby/2.7.0/bundler/gems/gitolite-rugged-4d24e45f97f9/lib/gitolite/gitolite_admin/accessors.rb:122:in `transaction'
/srv/redmine/plugins/redmine_git_hosting/lib/redmine_git_hosting/gitolite_wrappers/repositories/add_repository.rb:20:in `create_repository'
/srv/redmine/plugins/redmine_git_hosting/lib/redmine_git_hosting/gitolite_wrappers/repositories/add_repository.rb:11:in `call'
/srv/redmine/plugins/redmine_git_hosting/lib/redmine_git_hosting/gitolite_wrappers/base.rb:19:in `call'
/srv/redmine/plugins/redmine_git_hosting/lib/redmine_git_hosting/gitolite_wrapper.rb:74:in `call_gitolite_wrapper'
/srv/redmine/plugins/redmine_git_hosting/lib/redmine_git_hosting/gitolite_wrapper.rb:56:in `execute_action'
/srv/redmine/plugins/redmine_git_hosting/lib/redmine_git_hosting/gitolite_wrapper.rb:24:in `resync_gitolite'
/srv/redmine/plugins/redmine_git_hosting/app/workers/githosting_shell_worker.rb:19:in `perform'
/srv/redmine/bundler/ruby/2.7.0/gems/sidekiq-6.2.2/lib/sidekiq/processor.rb:196:in `execute_job'
/srv/redmine/bundler/ruby/2.7.0/gems/sidekiq-6.2.2/lib/sidekiq/processor.rb:164:in `block (2 levels) in process'
/srv/redmine/bundler/ruby/2.7.0/gems/sidekiq-6.2.2/lib/sidekiq/middleware/chain.rb:133:in `invoke'
/srv/redmine/bundler/ruby/2.7.0/gems/sidekiq-6.2.2/lib/sidekiq/processor.rb:163:in `block in process'
/srv/redmine/bundler/ruby/2.7.0/gems/sidekiq-6.2.2/lib/sidekiq/processor.rb:136:in `block (6 levels) in dispatch'
/srv/redmine/bundler/ruby/2.7.0/gems/sidekiq-6.2.2/lib/sidekiq/job_retry.rb:112:in `local'
/srv/redmine/bundler/ruby/2.7.0/gems/sidekiq-6.2.2/lib/sidekiq/processor.rb:135:in `block (5 levels) in dispatch'
/srv/redmine/bundler/ruby/2.7.0/gems/sidekiq-6.2.2/lib/sidekiq/rails.rb:14:in `block in call'
/srv/redmine/bundler/ruby/2.7.0/gems/activesupport-5.2.6/lib/active_support/execution_wrapper.rb:87:in `wrap'
/srv/redmine/bundler/ruby/2.7.0/gems/activesupport-5.2.6/lib/active_support/reloader.rb:73:in `block in wrap'
/srv/redmine/bundler/ruby/2.7.0/gems/activesupport-5.2.6/lib/active_support/execution_wrapper.rb:87:in `wrap'
/srv/redmine/bundler/ruby/2.7.0/gems/activesupport-5.2.6/lib/active_support/reloader.rb:72:in `wrap'
/srv/redmine/bundler/ruby/2.7.0/gems/sidekiq-6.2.2/lib/sidekiq/rails.rb:13:in `call'
/srv/redmine/bundler/ruby/2.7.0/gems/sidekiq-6.2.2/lib/sidekiq/processor.rb:131:in `block (4 levels) in dispatch'
/srv/redmine/bundler/ruby/2.7.0/gems/sidekiq-6.2.2/lib/sidekiq/processor.rb:257:in `stats'
/srv/redmine/bundler/ruby/2.7.0/gems/sidekiq-6.2.2/lib/sidekiq/processor.rb:126:in `block (3 levels) in dispatch'
/srv/redmine/bundler/ruby/2.7.0/gems/sidekiq-6.2.2/lib/sidekiq/job_logger.rb:13:in `call'
/srv/redmine/bundler/ruby/2.7.0/gems/sidekiq-6.2.2/lib/sidekiq/processor.rb:125:in `block (2 levels) in dispatch'
/srv/redmine/bundler/ruby/2.7.0/gems/sidekiq-6.2.2/lib/sidekiq/job_retry.rb:79:in `global'
/srv/redmine/bundler/ruby/2.7.0/gems/sidekiq-6.2.2/lib/sidekiq/processor.rb:124:in `block in dispatch'
/srv/redmine/bundler/ruby/2.7.0/gems/sidekiq-6.2.2/lib/sidekiq/logger.rb:11:in `with'
/srv/redmine/bundler/ruby/2.7.0/gems/sidekiq-6.2.2/lib/sidekiq/job_logger.rb:33:in `prepare'
/srv/redmine/bundler/ruby/2.7.0/gems/sidekiq-6.2.2/lib/sidekiq/processor.rb:123:in `dispatch'
/srv/redmine/bundler/ruby/2.7.0/gems/sidekiq-6.2.2/lib/sidekiq/processor.rb:162:in `process'
/srv/redmine/bundler/ruby/2.7.0/gems/sidekiq-6.2.2/lib/sidekiq/processor.rb:78:in `process_one'
/srv/redmine/bundler/ruby/2.7.0/gems/sidekiq-6.2.2/lib/sidekiq/processor.rb:68:in `run'
/srv/redmine/bundler/ruby/2.7.0/gems/sidekiq-6.2.2/lib/sidekiq/util.rb:43:in `watchdog'
/srv/redmine/bundler/ruby/2.7.0/gems/sidekiq-6.2.2/lib/sidekiq/util.rb:52:in `block in safe_thread'

@alexandermeindl
Copy link
Collaborator

Thanks for testing. Good, that first problem is solved. But the new problems needs more work, I try to provide another update for that today.

@alexandermeindl
Copy link
Collaborator

I cannot fix it at the moment, because I have no time to work on an sidekiq test environment. Maybe someone else can work on this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants