Gitaly isn't restarted when trusted certificates change
Summary
When a certificate is added to /etc/gitlab/trusted-certs, gitlab-ctl reconfigure links it into /opt/gitlab/embedded/ssl/certs/ and restarts Puma, GitLab Pages and Workhorse, but not Gitaly. The running Gitaly service keeps its old certificate pool, so internal API calls to an endpoint signed by the new CA keep failing with x509: certificate signed by unknown authority until Gitaly is restarted by hand.
Where
files/gitlab-cookbooks/gitlab/recipes/add_trusted_certs.rb: the Move existing certs and link to ... ruby_block notifies:
notifies :restart, "runit_service[puma]" if omnibus_helper.should_notify?("puma")
notifies :restart, "runit_service[gitlab-pages]" if omnibus_helper.should_notify?("gitlab-pages")
notifies :restart, "runit_service[gitlab-workhorse]" if omnibus_helper.should_notify?("gitlab-workhorse")Gitaly isn't in the list. Its config.toml and env directory don't change when a certificate is added, so nothing else HUPs it either.
Gitaly reads its certificate pool once at startup: Go's system pool (from SSL_CERT_DIR) and the internal API client's ca_path, which !10073 (merged) sets to the same directory. So a running Gitaly doesn't see new certificates.
After !10073 (merged), a manual gitaly check (a fresh process) passes right after reconfigure while the running service still fails, which makes the gap more confusing.
Proposal
Notify Gitaly from the same ruby_block, for example notifies :hup, "runit_service[gitaly]" if omnibus_helper.should_notify?("gitaly"). Gitaly handles HUP as a graceful restart, which matches how the recipe already notifies Gitaly when config.toml changes. Other Go services that get SSL_CERT_DIR (for example Praefect, KAS and the registry) may have the same gap and are worth checking.
Context
Found during review of !10073 (merged) (for gitaly#6487 (closed)). This predates that MR.