Remove dependency on dev.gitlab.org availability in Chef cookbooks
Summary
While running the switchover for dev - production#6236 (closed)
we found that the gitlab-monitor cookbook fails when dev is unavailable.
Jan 28 00:51:33 redis-sidekiq-03-db-gprd chef-client[1761436]: Recipe: gitlab-monitor::default#033[0m
Jan 28 00:51:33 redis-sidekiq-03-db-gprd chef-client[1761436]: * ruby_build_ruby[2.7.0] action install (up to date)
Jan 28 00:51:33 redis-sidekiq-03-db-gprd chef-client[1761436]: * linux_user[gitlab-monitor] action create (up to date)
Jan 28 00:51:33 redis-sidekiq-03-db-gprd chef-client[1761436]: * directory[/opt/gitlab-monitor] action create (up to date)
Jan 28 00:51:33 redis-sidekiq-03-db-gprd chef-client[1761436]: * ark[gitlab-monitor] action put
Jan 28 00:51:33 redis-sidekiq-03-db-gprd chef-client[1761436]: * directory[/opt/gitlab-monitor] action create (up to date)
Jan 28 00:51:33 redis-sidekiq-03-db-gprd chef-client[1761436]: * remote_file[/var/chef/cache/gitlab-monitor.tar.gz] action create[2022-01-28T00:51:33+00:00] ERROR: Connection refused connecting to https://dev.gitlab.org/gitlab-org/gitlab-exporter/-/archive/v11.3.0/gitlab-exporter-v11.3.0.tar.gz, retry 1/5
Jan 28 00:51:38 redis-sidekiq-03-db-gprd chef-client[1761436]: [2022-01-28T00:51:38+00:00] ERROR: Connection refused connecting to https://dev.gitlab.org/gitlab-org/gitlab-exporter/-/archive/v11.3.0/gitlab-exporter-v11.3.0.tar.gz, retry 2/5
Jan 28 00:51:43 redis-sidekiq-03-db-gprd chef-client[1761436]: [2022-01-28T00:51:43+00:00] ERROR: Connection refused connecting to https://dev.gitlab.org/gitlab-org/gitlab-exporter/-/archive/v11.3.0/gitlab-exporter-v11.3.0.tar.gz, retry 3/5
Jan 28 00:51:48 redis-sidekiq-03-db-gprd chef-client[1761436]: [2022-01-28T00:51:48+00:00] ERROR: Connection refused connecting to https://dev.gitlab.org/gitlab-org/gitlab-exporter/-/archive/v11.3.0/gitlab-exporter-v11.3.0.tar.gz, retry 4/5
Jan 28 00:51:53 redis-sidekiq-03-db-gprd chef-client[1761436]: [2022-01-28T00:51:53+00:00] ERROR: Connection refused connecting to https://dev.gitlab.org/gitlab-org/gitlab-exporter/-/archive/v11.3.0/gitlab-exporter-v11.3.0.tar.gz, retry 5/5
Jan 28 00:51:59 redis-sidekiq-03-db-gprd chef-client[1761436]: [2022-01-28T00:51:59+00:00] WARN: remote_file[/var/chef/cache/gitlab-monitor.tar.gz] cannot be downloaded from https://dev.gitlab.org/gitlab-org/gitlab-exporter/-/archive/v11.3.0/gitlab-exporter-v11.3.0.tar.gz: Connection refused - Connection refused connecting to https://dev.gitlab.org/gitlab-org/gitlab-exporter/-/archive/v11.3.0/gitlab-exporter-v11.3.0.tar.gz, giving up
Jan 28 00:51:59 redis-sidekiq-03-db-gprd chef-client[1761436]: #033[0m
Jan 28 00:51:59 redis-sidekiq-03-db-gprd chef-client[1761436]: ================================================================================#033[0m
Jan 28 00:51:59 redis-sidekiq-03-db-gprd chef-client[1761436]: #033[31mError executing action `create` on resource 'remote_file[/var/chef/cache/gitlab-monitor.tar.gz]'#033[0m
Jan 28 00:51:59 redis-sidekiq-03-db-gprd chef-client[1761436]: ================================================================================#033[0m
Jan 28 00:51:59 redis-sidekiq-03-db-gprd chef-client[1761436]:
Jan 28 00:51:59 redis-sidekiq-03-db-gprd chef-client[1761436]: #033[0m Errno::ECONNREFUSED#033[0m
Jan 28 00:51:59 redis-sidekiq-03-db-gprd chef-client[1761436]: -------------------#033[0m
Jan 28 00:51:59 redis-sidekiq-03-db-gprd chef-client[1761436]: Connection refused - Connection refused connecting to https://dev.gitlab.org/gitlab-org/gitlab-exporter/-/archive/v11.3.0/gitlab-exporter-v11.3.0.tar.gz, giving up#033[0m
Related Incident(s)
Originating issue(s): production#6236 (closed)
Desired Outcome/Acceptance criteria
-
The cookbook gitlab_migrationhas been removed from all roles inchef-repo -
The cookbook gitlab-monitorinstallsgitlab-exporteras a gem, removing its dependency ondev.gitlab.orgorops.gitlab.net.
Associated Services
Corrective Action Issue Checklist
-
link the incident(s) this corrective action arose out of -
give context for what problem this corrective action is trying to prevent from re-occurring -
assign a severity label (this is the highest sev of related incidents, defaults to 'severity::4') -
assign a priority (this will default to 'priority::4')
Edited by Pierre Guinoiseau