Exporting members list from Group Usage Quotas gives a 404 error
Summary
Attempting to export group usage quota lists gives 404
error and does not produce expected CSV.
Steps to reproduce
- Stand up GitLab 16.5.1 or 16.6.0 instance
- Navigate to a group's Usage Quota menu: Group -> Settings -> Usage Quota
- Click Export list button
- Observe
404
Unable to reproduce on gitlab.com
Example Project
Reproduced on local instance
What is the current bug behavior?
The Export list button produces 404
errors on self-managed instances
What is the expected correct behavior?
The Export liste button should produce the usage quota CSV
Relevant logs and/or screenshots
I tailed the logs on my Docker instance while reproducing the 404
. Here are workhorse and rails entries in for the 404
in the logs:
==> /var/log/gitlab/gitlab-rails/production_json.log <==
{"method":"GET","path":"/groups/owners2/-/seat_usage.csv","format":"csv","controller":"Groups::SeatUsageController","action":"show","status":404,"time":"2023-11-17T13:32:10.531Z","params":[{"key":"group_id","value":"owners2"}],"correlation_id":"01HFEQPPBEZGMB0GEX2JDRR5FJ","meta.caller_id":"Groups::SeatUsageController#show","meta.remote_ip":"172.17.0.1","meta.feature_category":"purchase","meta.user":"root","meta.user_id":1,"meta.root_namespace":"owners2","meta.client_id":"user/1","remote_ip":"172.17.0.1","user_id":1,"username":"root","ua":"Mozilla/5.0 (X11; Linux x86_64; rv:109.0) Gecko/20100101 Firefox/119.0","queue_duration_s":0.025135,"request_urgency":"low","target_duration_s":5,"redis_calls":17,"redis_allowed_cross_slot_calls":1,"redis_duration_s":0.003766,"redis_read_bytes":2565,"redis_write_bytes":2097,"redis_feature_flag_calls":12,"redis_feature_flag_duration_s":0.00247,"redis_feature_flag_read_bytes":2385,"redis_feature_flag_write_bytes":853,"redis_sessions_calls":3,"redis_sessions_allowed_cross_slot_calls":1,"redis_sessions_duration_s":0.000874,"redis_sessions_read_bytes":180,"redis_sessions_write_bytes":1087,"redis_shared_state_calls":2,"redis_shared_state_duration_s":0.000422,"redis_shared_state_write_bytes":157,"db_count":10,"db_write_count":0,"db_cached_count":2,"db_replica_count":0,"db_primary_count":10,"db_main_count":10,"db_ci_count":0,"db_main_replica_count":0,"db_ci_replica_count":0,"db_replica_cached_count":0,"db_primary_cached_count":2,"db_main_cached_count":2,"db_ci_cached_count":0,"db_main_replica_cached_count":0,"db_ci_replica_cached_count":0,"db_replica_wal_count":0,"db_primary_wal_count":0,"db_main_wal_count":0,"db_ci_wal_count":0,"db_main_replica_wal_count":0,"db_ci_replica_wal_count":0,"db_replica_wal_cached_count":0,"db_primary_wal_cached_count":0,"db_main_wal_cached_count":0,"db_ci_wal_cached_count":0,"db_main_replica_wal_cached_count":0,"db_ci_replica_wal_cached_count":0,"db_replica_duration_s":0.0,"db_primary_duration_s":0.006,"db_main_duration_s":0.006,"db_ci_duration_s":0.0,"db_main_replica_duration_s":0.0,"db_ci_replica_duration_s":0.0,"cpu_s":0.047081,"mem_objects":21936,"mem_bytes":2623236,"mem_mallocs":7058,"mem_total_bytes":3500676,"pid":1882,"worker_id":"puma_9","rate_limiting_gates":[],"db_duration_s":0.00126,"view_duration_s":0.0,"duration_s":0.01688}
==> /var/log/gitlab/gitlab-workhorse/current <==
{"content_type":"text/html; charset=utf-8","correlation_id":"01HFEQPPBEZGMB0GEX2JDRR5FJ","duration_ms":56,"host":"localhost","level":"info","method":"GET","msg":"access","proto":"HTTP/1.1","referrer":"http://localhost/groups/owners2/-/usage_quotas","remote_addr":"127.0.0.1:0","remote_ip":"127.0.0.1","route":"","status":404,"system":"http","time":"2023-11-17T13:32:10Z","ttfb_ms":56,"uri":"/groups/owners2/-/seat_usage.csv","user_agent":"Mozilla/5.0 (X11; Linux x86_64; rv:109.0) Gecko/20100101 Firefox/119.0","written_bytes":3190}
Output of checks
Results of GitLab environment info
Expand for output related to GitLab environment info
(For installations with omnibus-gitlab package run and paste the output of: \`sudo gitlab-rake gitlab:env:info\`) (For installations from source run and paste the output of: \`sudo -u git -H bundle exec rake gitlab:env:info RAILS_ENV=production\`)
Results of GitLab application Check
Expand for output related to the GitLab application check
(For installations with omnibus-gitlab package run and paste the output of: `sudo gitlab-rake gitlab:check SANITIZE=true`) (For installations from source run and paste the output of: `sudo -u git -H bundle exec rake gitlab:check RAILS_ENV=production SANITIZE=true`) (we will only investigate if the tests are passing)
Possible fixes
- remove
should_check_namespace_plan
in the export service
Edited by Chase Southard