Page MenuHomePhabricator

cloudcumin: allow wmcs-admin to run wikireplicas cookbooks and scripts
Closed, DeclinedPublic

Description

The members of the group wmcs-admin can currently SSH to cumin1001 to run the following commands:

root@cumin1001:~# cat /etc/sudoers.d/wmcs-admin
# This file is managed by Puppet!

%wmcs-admin ALL = (ALL) NOPASSWD: /usr/local/bin/secure-cookbook sre.wikireplicas.*
%wmcs-admin ALL = (ALL) NOPASSWD: /usr/local/sbin/maintain-views
%wmcs-admin ALL = (ALL) NOPASSWD: /usr/local/sbin/maintain-meta_p
%wmcs-admin ALL = (ALL) NOPASSWD: /usr/local/sbin/maintain-replica-indexes

In T325067 I merged a patch that replicated those sudoers rule to the new cloudcumin hosts. This task is to ensure that all those scripts can be run successfully from the cloudcumin hosts. At a minimum, we have to add the secure-cookbook command that is not present right now, but there might be more things to fix.

Event Timeline

@fnegri do you plan o move these cookbooks to the wmcs-cookbooks repository?
I'm also wondering if at this point it could make sense to move the spicerack's toolforge module/package into the wmcs_libs directory of the same repo.

fnegri triaged this task as Medium priority.Oct 3 2023, 1:31 PM

@Volans I didn't notice they were in the main cookbooks repository, I think it makes sense to move them but I'm not sure how easy it will be... I'll have a look later this week.

I'm also wondering if at this point it could make sense to move the spicerack's toolforge module/package into the wmcs_libs directory of the same repo.

I think it does, but I'm not familiar at all with that module. There's also T319450 which is vaguely related.

fnegri moved this task from Backlog to Done on the cloud-services-team (FY2024/2025-Q1-Q2) board.

In T344599: wikireplicas root access it was decided members of wmcs-roots should not have root access to wiki replicas hosts (clouddbXXXX). Given wmcs-roots members have root access on cloudcumins, that means clouddb hosts should not be accessible from cloudcumins, but only from production cumins.

Without this access, the cookbooks sre.wikireplicas.* will not work from cloudcumins but only from production cumins.