FS#55865 - [gitlab-gitaly] bundle not found

Attached to Project: Community Packages
Opened by Giovanni Harting (IdleGandalf) - Wednesday, 04 October 2017, 14:43 GMT
Last edited by Sven-Hendrik Haase (Svenstaro) - Saturday, 14 October 2017, 12:02 GMT
Task Type Bug Report
Category Packages
Status Closed
Assigned To Sven-Hendrik Haase (Svenstaro)
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 3
Private No

Details

Description:
Since some upgrades something in gitaly looks for 'bundle', where the program its looking for is named bundle-2.3 from ruby2.3-bundler. Don't know yet how much this affects its functionality, but it seems gitlab works as normal. Maybe a symlink got deleted or something? I had gitaly running for a while where these logs didn't appear.

Additional info:
log snippet: https://bpaste.net/show/ba55b16a092e
ruby2.3-bundler 1.15.3-1
gitlab-gitaly 0.37.0-1

Steps to reproduce:

Install gitlab, setup everything and look at logs.
This task depends upon

Closed by  Sven-Hendrik Haase (Svenstaro)
Saturday, 14 October 2017, 12:02 GMT
Reason for closing:  Fixed
Comment by Sven-Hendrik Haase (Svenstaro) - Wednesday, 04 October 2017, 16:52 GMT
Could you try to find out which bundle this is? Give me a file where it appears. If so, I can patch it.
Comment by Giovanni Harting (IdleGandalf) - Wednesday, 04 October 2017, 18:33 GMT
You mean where it searches for the wrong version of bundle? I can try to go through gitaly with grep or something, don't know how good the result will be with such a method.
Comment by Giovanni Harting (IdleGandalf) - Wednesday, 04 October 2017, 18:37 GMT
I got the line where it tries to execute this command, maybe you can patch it there? https://gitlab.com/gitlab-org/gitaly/blob/master/internal/rubyserver/rubyserver.go#L108
Comment by Giovanni Harting (IdleGandalf) - Wednesday, 04 October 2017, 18:39 GMT
I wonder if gitaly ever worked in this form, since the part where this 'crash' happens seems to be the part that should start the gitaly server itself.
Comment by Sven-Hendrik Haase (Svenstaro) - Thursday, 05 October 2017, 00:48 GMT
I also wonder about this. Probably no one actually used gitaly in Arch. I'm fixing this. Good find and thanks for the hint.
Comment by Sven-Hendrik Haase (Svenstaro) - Thursday, 05 October 2017, 01:15 GMT
Alright, please test the current package and request closure if it's good.
Comment by Giovanni Harting (IdleGandalf) - Thursday, 05 October 2017, 06:40 GMT
Now we have another bundle not found, but I get further into the starting process (it's trying to load the config now). Gonna try to find out where this happens.
Comment by Giovanni Harting (IdleGandalf) - Thursday, 05 October 2017, 06:50 GMT
Okay I found it. For some reason the config loading function uses this class: internal/linguist/linguist.go to parse colors in the config. Patching this should finally make this work. I haven't found any more instances of bundler used anywhere in the code.
Comment by Sven-Hendrik Haase (Svenstaro) - Friday, 06 October 2017, 02:38 GMT
Alright, test now.
Comment by Giovanni Harting (IdleGandalf) - Friday, 06 October 2017, 06:18 GMT
It doesn't end here :) The 'not finding bundle' errors are gone, now bundle throws errors about not finding a gem. Don't know yet how to fix this, but it sure is a stubborn piece of software. Maybe we miss some deps here? Or it just doesn't find it?
https://bpaste.net/show/10591319012d
Comment by Sven-Hendrik Haase (Svenstaro) - Friday, 06 October 2017, 13:03 GMT
Can you do some testing? I'm a little pressed for time.
Comment by Thom Wiggers (twiggers) - Friday, 06 October 2017, 14:16 GMT
Something is probably going wrong with /etc/webapps/gitlab-gitaly/ruby/, there is in fact a rake-12.1.0 gem there.
Comment by Thom Wiggers (twiggers) - Friday, 06 October 2017, 14:19 GMT
I'm not sure if the `sed`s to `bundle-2.3` are correct, since Gitaly practically ships its own ruby. The gems are located in /etc/webapps/gitlab-gitaly/ruby/vendor/bundle/; not bundle-2.3 as the sed should indicate. No time to test this hypothesis right now.
Comment by Giovanni Harting (IdleGandalf) - Friday, 06 October 2017, 16:56 GMT
If you mean /usr/share/webapps/gitlab-gitaly/ruby yes, thats correct. But there is no bundle itself there, at least I didn't seem to find one. Just gemfiles stuff needed for a bundle 'home' dir as if to use by an external bundle. (.bundle/config, etc)
Comment by Florian Schroegendorfer (phlo) - Saturday, 07 October 2017, 01:34 GMT
Unfortunately I'm not very familiar with ruby and also dont have much time, but looking at the end of the call stack I was wondering why the extra/ruby 2.4 version of 'require' is used for loading gems?

Here is a more readable version: https://bpaste.net/show/9774f9221731
Comment by Sven-Hendrik Haase (Svenstaro) - Saturday, 14 October 2017, 12:01 GMT
Alright with the newest release this seems to work good for me. Reopen if not fixed for you.

Loading...