jboxberger / synology-gitlab

Updated an improved Original Synology Package
MIT License
129 stars 20 forks source link

Build script failing #45

Closed helmut-steiner closed 3 years ago

helmut-steiner commented 3 years ago

Hey Juri, I tried building a new version for myself with your build script but it fails. I got Kali installed on WSL2 and build there. Here is my console output:

============================================================================================================
 Please provide the full qualified docker container name from dockerhub.com
============================================================================================================
GitLab [default sameersbn/gitlab:13.3.4]:
Postgres [default sameersbn/postgresql:12-20200524]:
Redis [default redis:4.0.14]:
pull image sameersbn/gitlab:13.3.4
13.3.4: Pulling from sameersbn/gitlab
f08d8e2a3ba1: Pull complete
3baa9cb2483b: Pull complete
94e5ff4c0b15: Pull complete
1860925334f9: Pull complete
1a097a64bc07: Pull complete
6ce1878e70ad: Pull complete
4b13d7af7530: Pull complete
e93a8a56cd91: Pull complete
488a01078866: Pull complete
a633dee4e8ed: Pull complete
7bc7d5615a7e: Pull complete
Digest: sha256:8494b8596b48bcc555ebf0d56804665014071baff7f46adae429846eb05a72f8
Status: Downloaded newer image for sameersbn/gitlab:13.3.4
docker.io/sameersbn/gitlab:13.3.4
export image sameersbn/gitlab:13.3.4
  100 %     981.3 MiB / 3,581.1 MiB = 0.274   7.1 MiB/s       8:25
deleting image sameersbn/gitlab:13.3.4
Untagged: sameersbn/gitlab:13.3.4
Untagged: sameersbn/gitlab@sha256:8494b8596b48bcc555ebf0d56804665014071baff7f46adae429846eb05a72f8
Deleted: sha256:850948553dd31ca3ec0b3aa4879749073415532d7c7bfda200323f81070be7b6
Deleted: sha256:220fbf7ddbcb77f78080fed6f72efdb16f30c61b9d29b77b1097130c70436ea0
Deleted: sha256:5089f852fbcb0e20e9f14d351aefb017c7bbdb65a4b7bfcc709950908321468b
Deleted: sha256:40a27c0bf9a264aae24b39420f1800013e26b3f3e9d5841bfdce2fbcaa2ff5b1
Deleted: sha256:bcece0cd3db8385963489fcc8c39c2f66c20ac30e82e4d9c604282c1611dc0d9
Deleted: sha256:f1518ce13f511b6863b68aa32fef88200b337fd9ff91df5971e812ab9e32844a
Deleted: sha256:b25102c0dc17936af81f47f1cd3c93cff711fc8daae6d1daf99c861d1eccc192
Deleted: sha256:81444b70304cd137987ebeb34918efe62bed0be36c75d64e98427ea4e91cc5ee
Deleted: sha256:386325b12f0574c516846ca10e9c4cc9fb08c012ba2e571c783d0c74b88ca0ed
Deleted: sha256:f86ba01a62c1708987f3b2e4ffaacd32248706943070ce2caa6758a14bdcb6e4
Deleted: sha256:7c0ecf8a144d3f703314f27d10f5913d96da01a939fdfb490463164abd2d69d1
Deleted: sha256:79bde4d54386664324ce9b6179a3265ca96e6c8f05c06ded53856a670874c715
pull image sameersbn/postgresql:12-20200524
12-20200524: Pulling from sameersbn/postgresql
23884877105a: Pull complete
bc38caa0f5b9: Pull complete
2910811b6c42: Pull complete
36505266dcc6: Pull complete
b2d1b42d4a3b: Pull complete
61b690f14e50: Pull complete
7b02efb8d7c0: Pull complete
9c181a315505: Pull complete
695b159c0f8a: Pull complete
f1fd10f44265: Pull complete
54463ed97e21: Pull complete
Digest: sha256:e27888ff44c56c94bee7a0423496d7e6bc6fa2b5b738b13be0898301f7e06c02
Status: Downloaded newer image for sameersbn/postgresql:12-20200524
docker.io/sameersbn/postgresql:12-20200524
export image sameersbn/postgresql:12-20200524
  100 %        65.6 MiB / 266.8 MiB = 0.246   8.9 MiB/s       0:29
deleting image sameersbn/postgresql:12-20200524
Untagged: sameersbn/postgresql:12-20200524
Untagged: sameersbn/postgresql@sha256:e27888ff44c56c94bee7a0423496d7e6bc6fa2b5b738b13be0898301f7e06c02
Deleted: sha256:d08b64823adb00821c1b3e1b72506765f3ffa4f9b691cefef9f149d385f08fcc
Deleted: sha256:3c02d7336c7cbf05601c6ffee06b9cb662da3e4ec75bc8e24781b819835ac0cf
Deleted: sha256:31e29c7e3c626c2bd94a5a2e69c7c6a404e7f3236c08eaed31089ff6fe49312d
Deleted: sha256:d2f7edae1e787e0cb47274b308d0911f0bcae7838bc482d0d49de8809ee03540
Deleted: sha256:e52273c1e6ee339d6dcac88db4079131077af451004ee3bc143691da627f36f6
Deleted: sha256:d1553b4c8bf2965e74f4263afc2623ace7e90756a81deaef6539a7c7f5c3b521
Deleted: sha256:4a8e02f0bf2fdb5d7de3336954d563544a46ff5a7793789c2fc3481b720e1c84
Deleted: sha256:2695cfd377aa4a1102bf50b0290b3199857754a5effd8abf237c01be4cc6be0d
Deleted: sha256:82751c4dcc36265daceeee0abd938806b591eb66700863186377348c96e8aead
Deleted: sha256:24b16cac34768092d57cdb429a12de6c9ee870a3724d70098a189ae0ac344c42
Deleted: sha256:b1daff3b271fede2bec31812c398e28952f792935f608e467271cdfaccab7de2
Deleted: sha256:b7f7d2967507ba709dbd1dd0426a5b0cdbe1ff936c131f8958c8d0f910eea19e
pull image redis:4.0.14
4.0.14: Pulling from library/redis
54fec2fa59d0: Pull complete
9c94e11103d9: Pull complete
04ab1bfc453f: Pull complete
7988789e1fb7: Pull complete
8ce1bab2086c: Pull complete
40e134f79af1: Pull complete
Digest: sha256:2e03fdd159f4a08d2165ca1c92adde438ae4e3e6b0f74322ce013a78ee81c88d
Status: Downloaded newer image for redis:4.0.14
docker.io/library/redis:4.0.14
export image redis:4.0.14
  100 %         18.0 MiB / 88.4 MiB = 0.204   7.5 MiB/s       0:11
deleting image redis:4.0.14
Untagged: redis:4.0.14
Untagged: redis@sha256:2e03fdd159f4a08d2165ca1c92adde438ae4e3e6b0f74322ce013a78ee81c88d
Deleted: sha256:191c4017dcdd3370f871a4c6e7e1d55c7d9abed2bebf3005fb3e7d12161262b8
Deleted: sha256:c608627e4978ced00e2f061ae0386fab2e374376b96512bbbd2eea112b1c18ec
Deleted: sha256:3fb5c9513585182e703038a67d9aaac987d4be30b6d3ece92ffe35734b330500
Deleted: sha256:e3a7fbb7bf3b4de87e6765498bf952b114f9bf297e5e93f51bd6a9a32083f8e4
Deleted: sha256:09f9b5d7722b181ae2acd61396c20549afdea66ee31f921850191db5afe6738a
Deleted: sha256:3bd2921d0d3dd52dbcdc462f35b11cb89df901205284b0fea03c19bb8359907a
Deleted: sha256:c2adabaecedbda0af72b153c6499a0555f3a769d52370469d8f6bd6328af9b13
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  3322  100  3322    0     0   2505      0  0:00:01  0:00:01 --:--:--  2503
tar: This does not look like a tar archive
tar: Skipping to next header
tar: Exiting with failure status due to previous errors
tar: source/synology-gitlab/package.tgz: Cannot open: No such file or directory
tar: Error is not recoverable: exiting now
rm: cannot remove 'source/synology-gitlab/package.tgz': No such file or directory
rm: cannot remove 'source/synology-gitlab/syno_signature.asc': No such file or directory
sed: can't read source/synology-gitlab/package/config/synology_gitlab: No such file or directory
sed: can't read source/synology-gitlab/package/config/synology_gitlab: No such file or directory
./build.sh: line 341: source/synology-gitlab/package/config/synology_gitlab: No such file or directory
./build.sh: line 345: source/synology-gitlab/package/config/synology_gitlab_postgresql: No such file or directory
./build.sh: line 349: source/synology-gitlab/package/config/synology_gitlab_redis: No such file or directory
./build.sh: line 356: source/synology-gitlab/package/config/synology_gitlab: No such file or directory
./build.sh: line 357: source/synology-gitlab/package/config/synology_gitlab: No such file or directory
./build.sh: line 359: source/synology-gitlab/package/config/synology_gitlab_postgresql: No such file or directory
./build.sh: line 360: source/synology-gitlab/package/config/synology_gitlab_postgresql: No such file or directory
./build.sh: line 362: source/synology-gitlab/package/config/synology_gitlab_redis: No such file or directory
./build.sh: line 363: source/synology-gitlab/package/config/synology_gitlab_redis: No such file or directory
./build.sh: line 372: source/synology-gitlab/package/config/synology_gitlab: No such file or directory
./build.sh: line 389: source/synology-gitlab/package/config/synology_gitlab: No such file or directory
sed: can't read source/synology-gitlab/INFO: No such file or directory
sed: can't read source/synology-gitlab/INFO: No such file or directory
sed: can't read source/synology-gitlab/scripts/postuninst: No such file or directory
sed: can't read source/synology-gitlab/scripts/postuninst: No such file or directory
sed: can't read source/synology-gitlab/scripts/postuninst: No such file or directory
sed: can't read source/synology-gitlab/scripts/postinst: No such file or directory
sed: can't read source/synology-gitlab/scripts/postinst: No such file or directory
sed: can't read source/synology-gitlab/scripts/postinst: No such file or directory
sed: can't read source/synology-gitlab/scripts/postinst: No such file or directory
sed: can't read source/synology-gitlab/scripts/postinst: No such file or directory
sed: can't read source/synology-gitlab/scripts/postinst: No such file or directory
sed: can't read source/synology-gitlab/scripts/preupgrade: No such file or directory
sed: can't read source/synology-gitlab/scripts/postinst: No such file or directory
sed: can't read source/synology-gitlab/scripts/postuninst: No such file or directory
jboxberger commented 3 years ago

Hi Helmut,

its because synology changed the SPK url. I've pushed a update a minute ago which should fix it. Just pull.

jboxberger commented 3 years ago

I am very happy that you trying it on your own and hope you will have success. But pelase be carefull, i have not published any release not because of time issues. I got stuck during the gitlab DB update. The Update breaks to a inconstant state and has to be fully rollback. Luckily i do my test on a VM and this do not affect my production.

Because of the upgrade fail i do not publish an "maybe working" release because i do not want the people to break their installation. I am working on a complete standalone package using official docker repos. But this will still take a while. I got the toolkit running and the signature is also working. Now i am building up the package and i hope i can come up with a stable package this year and a migration path from this package to the new one.

Kind Regards

helmut-steiner commented 3 years ago

Hey Juri, Thanks for the fast reply and fix. The build works again. I will try it on my test system. After having had the update issues I always try things first on a non-production unit. I will let you know if the DB update works. Good luck with the new package and as mentioned in issue #44 - let me know if you need help!

helmut-steiner commented 3 years ago

So the update from 13.0.3 to 13.3.4 fails due to insufficient privileges. There is a new extension needed and while starting up the container and performing the upgrade it tries to install the extension which fails: PG::InsufficientPrivilege: ERROR: permission denied to create extension "btree_gist" @jboxberger Do you know how to set the right permissions inside docker?

helmut-steiner commented 3 years ago

See this for a workaround: https://github.com/sameersbn/docker-gitlab/issues/2214 I think the script has to be adapted for the upgrade to work.

jboxberger commented 3 years ago

ok give me a sec

jboxberger commented 3 years ago

Ive added btree_gist to the synology_gitlab_postgresql, hopefully sameersbn/postgresql supports it. you can pull and give it a try.

helmut-steiner commented 3 years ago

Okay. Just give me a couple of minutes. I have to reinstall v13.0.3 and import the backup before trying the upgrade again.

helmut-steiner commented 3 years ago

Unfortunately I get following error on building:

parse error: Expected another key-value pair at line 1, column 235
parse error: Expected another key-value pair at line 1, column 235
parse error: Expected another key-value pair at line 1, column 235
sed: -e expression #1, char 0: no previous regular expression
jboxberger commented 3 years ago

ahh.. fixed, was a typo

jboxberger commented 3 years ago

The extension seems to load properly now image

jboxberger commented 3 years ago

We are one step further. BUT after a clean install the Login fails with

` Completed 500 Internal Server Error in 20ms (ActiveRecord: 4.9ms | Elasticsearch: 0.0ms | Allocations: 6446)

ActiveRecord::StatementInvalid (PG::UndefinedColumn: ERROR: column users.ghost does not exist
LINE 1: ...COUNT(*) FROM (SELECT 1 AS one FROM "users" WHERE "users"."g...
^
`

and there are also issues with 2020-09-30T12:28:41.899Z: Cached record for ApplicationSetting couldn't be loaded, falling back to uncached record: PG::UndefinedTable: ERROR: relation "application_settings" does not exist LINE 1: SELECT "application_settings".* FROM "application_settings" ... ^

i think this comes all from the gitlab image and thats why i want to use the original gitlab-ce image to minimize problems and have a bigger community to get workaround and fixes

helmut-steiner commented 3 years ago

I can confirm that building and upgrading to 13.3.4 works without issues now. I haven't tried a clean installation yet. I am closing this issue as #44 contains more information on the upgrading hassle.

helmut-steiner commented 3 years ago

Hey Juri, Just for you to know: I thought everything worked but on my production system I encountered weird login issues. Probably the issue you mentioned above. It didn't occur right after starting the container but a few minutes later. So the initial login worked... Quite weird. I reverted back to 13.0.3 on my production environment. :(

jboxberger commented 3 years ago

Merde... this comes from Error SELECT COUNT(*) FROM (SELECT 1 AS one FROM "users" WHERE "users"."ghost" IS NULL LIMIT $1) subquery_for_count ... i am currently investigating. the column is really missing. but i am still not sure if the DB is wrong or the code ...

I've made a clean install on PSQL 11 and PSQL 12 with still the same problem. :-(

jboxberger commented 3 years ago

OK the Colum has been removed:

https://gitlab.com/search?utf8=%E2%9C%93&snippets=false&scope=&repository_ref=master&search=users.ghost&group_id=9970&project_id=278964

jboxberger commented 3 years ago

Traced it down.

https://gitlab.com/gitlab-org/gitlab/-/blob/master/CHANGELOG.md The Column has been removed with GitLab 13.4.0

It looks like sameersbn image is useing the code from 13.3.4 on the 13.4.0 schema. BUT There is a chance that this will work once sameersbn update to 13.4.0

helmut-steiner commented 3 years ago

Great! I already suspected something like this. :-) Thanks Juri!

jboxberger commented 3 years ago

Looks like this is the issue, but unresolved now. https://gitlab.com/gitlab-org/omnibus-gitlab/-/issues/5627

jboxberger commented 3 years ago

The error comes with the Gitlab 13.2.1, the previous 13.0.6 so not have the issue with the "users"."ghost" issue