Bug#983346: Update gitlab to 13.7.7 (installation fails - need help)

2021-03-02 Thread Pirate Praveen
On Tue, 2 Mar 2021 07:55:28 +0200 Dragos Jarca 
 wrote:

> For upgrade to work on experimental, I also removed
>
> /etc/gitlab/feature_flags/ops/dynamic_image_resizing.yml
>
> /etc/gitlab/initializers/rack_attack_global.rb

Thanks for these, I have now added them to maintscript for removing 
automatically.


You can restore 
/etc/gitlab/feature_flags/ops/dynamic_image_resizing.yml and remove 
/etc/gitlab/feature_flags/developement/dynamic_image_resizing.yml


(feature flag in development directory should be removed to resolve 
conflict, not in ops directory)


/etc/gitlab/initializers/rack_attack_global.rb can be removed.



Bug#983346: Update gitlab to 13.7.7 (installation fails - need help)

2021-03-02 Thread Dragos Jarca

For upgrade to work on experimental, I also removed

/etc/gitlab/feature_flags/ops/dynamic_image_resizing.yml

/etc/gitlab/initializers/rack_attack_global.rb

I use:

gem 'rugged', '~> 1.1'

gem 'licensee', '~> 9.14'

Best regards,
Dragos Jarca
General manager
Dynamic Puzzle S.R.L.
www.dynamicpuzzle.ro
On 01.03.2021 15:58, Pirate Praveen wrote:



On Sun, Feb 28, 2021 at 11:00 pm, Pirate Praveen 
 wrote:
On Sun, 28 Feb 2021 19:04:24 +0530 Pirate Praveen 
 wrote:

> Asking upstream for help
> https://gitlab.com/gitlab-org/gitlab/-/issues/323024

Removing these 3 files makes the upgrade to proceed,
/usr/share/gitlab/config/feature_flags/ops/api_kaminari_count_with 
_limit.yml
/usr/share/gitlab/config/feature_flags/licensed/resource_access_token.yml 


/usr/share/gitlab/config/feature_flags/ops/marginalia.yml

Of these 3 
/usr/share/gitlab/config/feature_flags/licensed/resource_access_token.yml

can definitely be removed as it is not present in current version.

I think these are safe to remove, but I will wait a few days for an 
answer from upstream (till there is a new security release).


Or if someone else can confirm, this is safe, I can remove it as well.


ok, so the remaining two were also present in 
/usr/share/gitlab/config/feature_flags/development and were obsolete.


I confirmed the upgrade goes smooth after removing these and all other 
obsolete initializers. I have also implemented a check during build if 
any files in config is changed or not.


Moving 'config' directory out of /etc would be another option, but 
then that will need us to move files we would like users or package to 
be able to modify to /etc/gitlab manually (database.yml, gitlab.yml 
and some more .rb files like puma.rb). If anyone wants to give it a 
try, feel free.







Bug#983346: Update gitlab to 13.7.7 (installation fails - need help)

2021-03-01 Thread Pirate Praveen




On Sun, Feb 28, 2021 at 11:00 pm, Pirate Praveen 
 wrote:
On Sun, 28 Feb 2021 19:04:24 +0530 Pirate Praveen 
 wrote:

> Asking upstream for help
> https://gitlab.com/gitlab-org/gitlab/-/issues/323024

Removing these 3 files makes the upgrade to proceed,
/usr/share/gitlab/config/feature_flags/ops/api_kaminari_count_with 
_limit.yml

/usr/share/gitlab/config/feature_flags/licensed/resource_access_token.yml
/usr/share/gitlab/config/feature_flags/ops/marginalia.yml

Of these 3 
/usr/share/gitlab/config/feature_flags/licensed/resource_access_token.yml

can definitely be removed as it is not present in current version.

I think these are safe to remove, but I will wait a few days for an 
answer from upstream (till there is a new security release).


Or if someone else can confirm, this is safe, I can remove it as well.


ok, so the remaining two were also present in 
/usr/share/gitlab/config/feature_flags/development and were obsolete.


I confirmed the upgrade goes smooth after removing these and all other 
obsolete initializers. I have also implemented a check during build if 
any files in config is changed or not.


Moving 'config' directory out of /etc would be another option, but then 
that will need us to move files we would like users or package to be 
able to modify to /etc/gitlab manually (database.yml, gitlab.yml and 
some more .rb files like puma.rb). If anyone wants to give it a try, 
feel free.




Bug#983346: Update gitlab to 13.7.7 (installation fails - need help)

2021-02-28 Thread Pirate Praveen
On Sun, 28 Feb 2021 19:04:24 +0530 Pirate Praveen 
 wrote:

> Asking upstream for help
> https://gitlab.com/gitlab-org/gitlab/-/issues/323024

Removing these 3 files makes the upgrade to proceed,
/usr/share/gitlab/config/feature_flags/ops/api_kaminari_count_with 
_limit.yml

/usr/share/gitlab/config/feature_flags/licensed/resource_access_token.yml
/usr/share/gitlab/config/feature_flags/ops/marginalia.yml

Of these 3 
/usr/share/gitlab/config/feature_flags/licensed/resource_access_token.yml

can definitely be removed as it is not present in current version.

I think these are safe to remove, but I will wait a few days for an 
answer from upstream (till there is a new security release).


Or if someone else can confirm, this is safe, I can remove it as well.



Bug#983346: Update gitlab to 13.7.7 (installation fails - need help)

2021-02-28 Thread Pirate Praveen
Control: forwarded -1 
https://gitlab.com/gitlab-org/gitlab/-/issues/323024


On Sun, Feb 28, 2021 at 6:56 pm, Pirate Praveen 
 wrote:
On Sat, 27 Feb 2021 17:33:40 +0530 Pirate Praveen 
 wrote:

> This commit makes the upgrade work.
>
> 
https://salsa.debian.org/ruby-team/gitlab/-/commit/98741d55b7ed4b5eb1985981ab82e171c7d0e0c9


Looks like this did not really fix the issue when I tried it again on 
another machine :(


Asking upstream for help 
https://gitlab.com/gitlab-org/gitlab/-/issues/323024




Bug#983346: Update gitlab to 13.7.7 (installation fails - need help)

2021-02-28 Thread Pirate Praveen
On Sat, 27 Feb 2021 17:33:40 +0530 Pirate Praveen 
 wrote:

> This commit makes the upgrade work.
>
> 
https://salsa.debian.org/ruby-team/gitlab/-/commit/98741d55b7ed4b5eb1985981ab82e171c7d0e0c9


Looks like this did not really fix the issue when I tried it again on 
another machine :(




Bug#983346: Update gitlab to 13.7.7 (installation fails - need help)

2021-02-27 Thread Pirate Praveen
On Fri, 26 Feb 2021 14:40:46 +0530 Pirate Praveen 
 wrote:

> On Tue, 23 Feb 2021 00:47:30 +0530 Pirate Praveen
>  wrote:
>  > Installing 13.7.7 on a clean system (after purge) works, but fails
> when
>  > upgrading from 13.6.7.
>
> What I found out so far is this,
>
> /etc/gitlab/initializers/flipper.rb was obsoleted in 13.6 but we did
> not remove it and that code introduced some changes in db which is 
now

> causing the error. So I think we will have to revert the changes made
> by this initializer.
>
> And in long term, we should more actively look for obsolete
> initializers like how we check if upstream file list is changed
> upstream.

This commit makes the upgrade work.

https://salsa.debian.org/ruby-team/gitlab/-/commit/98741d55b7ed4b5eb1985981ab82e171c7d0e0c9

We still need to check obsolete initializers more proactively I think.



Bug#983346: Update gitlab to 13.7.7 (installation fails - need help)

2021-02-26 Thread Pirate Praveen
On Tue, 23 Feb 2021 00:47:30 +0530 Pirate Praveen 
 wrote:
> Installing 13.7.7 on a clean system (after purge) works, but fails 
when

> upgrading from 13.6.7.

What I found out so far is this,

/etc/gitlab/initializers/flipper.rb was obsoleted in 13.6 but we did 
not remove it and that code introduced some changes in db which is now 
causing the error. So I think we will have to revert the changes made 
by this initializer.


And in long term, we should more actively look for obsolete 
initializers like how we check if upstream file list is changed 
upstream.




Bug#983346: Update gitlab to 13.7.7 (installation fails - need help)

2021-02-22 Thread Pirate Praveen
On Mon, 22 Feb 2021 22:59:51 +0530 Pirate Praveen 
 wrote:

> Package: gitlab
> Severity: important
> Control: tags -1 help
>
> I'm trying to update gitlab to 13.7.7 (master-13.7 branch in salsa),
>
> but installation fails with

Installing 13.7.7 on a clean system (after purge) works, but fails when 
upgrading from 13.6.7.




Bug#983346: Update gitlab to 13.7.7 (installation fails - need help)

2021-02-22 Thread Pirate Praveen

Package: gitlab
Severity: important
Control: tags -1 help

I'm trying to update gitlab to 13.7.7 (master-13.7 branch in salsa),

but installation fails with

Bundle complete! 212 Gemfile dependencies, 393 gems now installed.
Gems in the groups development and test were not installed.
Use `bundle info [gemname]` to see where a bundled gem is installed.
gitlab_production database is not empty, skipping gitlab setup
fatal: not a git repository (or any of the parent directories): .git
fatal: not a git repository (or any of the parent directories): .git
Attention: used pure ruby version of MurmurHash3
rake aborted!
Feature::InvalidFeatureFlagError: Feature flag 
'api_kaminari_count_with_limit' is al
ready defined in 
'/usr/share/gitlab/config/feature_flags/ops/api_kaminari_count_with

_limit.yml'
/usr/share/gitlab/lib/feature/definition.rb:165:in `block in 
load_all_from_path!'

/usr/share/gitlab/lib/feature/definition.rb:161:in `each'
/usr/share/gitlab/lib/feature/definition.rb:161:in `load_all_from_path!'
/usr/share/gitlab/lib/feature/definition.rb:146:in `block in load_all!'
/usr/share/gitlab/lib/feature/definition.rb:145:in `each'
/usr/share/gitlab/lib/feature/definition.rb:145:in `each_with_object'
/usr/share/gitlab/lib/feature/definition.rb:145:in `load_all!'
/usr/share/gitlab/lib/feature/definition.rb:102:in `reload!'
/usr/share/gitlab/lib/feature.rb:141:in `register_definitions'
/usr/share/gitlab/config/initializers/0_inject_feature_flags.rb:5:in 
`
)>'
/usr/share/rubygems-integration/all/gems/activesupport-6.0.3.4/lib/active_support/de
pendencies.rb:318:in `load'
/usr/share/rubygems-integration/all/gems/activesupport-6.0.3.4/lib/active_support/de
pendencies.rb:318:in `block in load'
/usr/share/rubygems-integration/all/gems/activesupport-6.0.3.4/lib/active_support/de
pendencies.rb:291:in `load_dependency'
/usr/share/rubygems-integration/all/gems/activesupport-6.0.3.4/lib/active_support/de
pendencies.rb:318:in `load'
/usr/share/rubygems-integration/all/gems/railties-6.0.3.4/lib/rails/engine.rb:666:in
`block in load_config_initializer'
/usr/share/rubygems-integration/all/gems/activesupport-6.0.3.4/lib/active_support/no
tifications.rb:182:in `instrument'
/usr/share/rubygems-integration/all/gems/railties-6.0.3.4/lib/rails/engine.rb:665:in
`load_config_initializer'
/usr/share/rubygems-integration/all/gems/railties-6.0.3.4/lib/rails/engine.rb:625:in
`block (2 levels) in '
/usr/share/rubygems-integration/all/gems/railties-6.0.3.4/lib/rails/engine.rb:624:in
`each'
/usr/share/rubygems-integration/all/gems/railties-6.0.3.4/lib/rails/engine.rb:624:in
`block in '
/usr/share/rubygems-integration/all/gems/railties-6.0.3.4/lib/rails/initializable.rb
:32:in `instance_exec'
/usr/share/rubygems-integration/all/gems/railties-6.0.3.4/lib/rails/initializable.rb
:32:in `run'
/usr/share/rubygems-integration/all/gems/railties-6.0.3.4/lib/rails/initializable.rb
:61:in `block in run_initializers'
/usr/share/rubygems-integration/all/gems/railties-6.0.3.4/lib/rails/initializable.rb
:50:in `each'
/usr/share/rubygems-integration/all/gems/railties-6.0.3.4/lib/rails/initializable.rb
:50:in `tsort_each_child'
/usr/share/rubygems-integration/all/gems/railties-6.0.3.4/lib/rails/initializable.rb
:60:in `run_initializers'
/usr/share/rubygems-integration/all/gems/railties-6.0.3.4/lib/rails/application.rb:3
63:in `initialize!'
/usr/share/gitlab/config/environment.rb:5:in `'
/usr/share/rubygems-integration/all/gems/activesupport-6.0.3.4/lib/active_support/de
pendencies.rb:324:in `require'
/usr/share/rubygems-integration/all/gems/activesupport-6.0.3.4/lib/active_support/de
pendencies.rb:324:in `block in require'
/usr/share/rubygems-integration/all/gems/activesupport-6.0.3.4/lib/active_support/de
pendencies.rb:291:in `load_dependency'
/usr/share/rubygems-integration/all/gems/activesupport-6.0.3.4/lib/active_support/de
pendencies.rb:324:in `require'
/usr/share/rubygems-integration/all/gems/railties-6.0.3.4/lib/rails/application.rb:3
39:in `require_environment!'
/usr/share/rubygems-integration/all/gems/railties-6.0.3.4/lib/rails/application.rb:5
23:in `block in run_tasks_blocks'
/usr/share/rubygems-integration/all/gems/rake-13.0.1/exe/rake:27:in 
`
>'
Tasks: TOP => db:migrate => db:load_config => environment
(See full trace by running task with --trace)
dpkg: error processing package gitlab (--configure):
installed gitlab package post-installation script subprocess returned 
error exit st

atus 1
Errors were encountered while processing:
gitlab
E: Sub-process /usr/bin/dpkg returned an error code (1)

Usually such errors come from an obsolete initializer, but 
0_inject_feature_flags.rb mentioned in the log is still present in 
upstream version.


Help in fixing this error welcome.