Page MenuHomePhabricator

[Bug] Puppet is failing for maps beta cluster - could not find group maps-admins
Closed, ResolvedPublic

Description

Steps to Reproduce

  1. Execute puppet agent -tv as root in the instance deployment-maps07.deployment-prep.eqiad1.wikimedia.cloud
  2. Look at failure logs

Expected Results

  • Puppet agent execute succesfully

Actual Results

  • The following error appears on log and force dependency skipping
Error: Could not find group maps-admins
Error: /Stage[main]/Profile::Maps::Postgresql_common/File[/var/log/postgresql/postgresql-9.6-main.log]/group: change from 'adm' to 'maps-admins' failed: Could not find group maps-admins

Environments Observed

  • Beta cluster

Additional notes

  • Could the problem be the role being defined at the puppet config, e. g. role::maps::master?

Event Timeline

So, I haven't been able to understand this yet, so I'm going to ask (please correct me if I mistagged any of you) @Krenair and @Andrew any thoughts?

@WDoranWMF I would like to ask you if this task could have some help from an SRE perspective, would this be possible for Platform Engineering to take a look?

This issue is caused by deployment-prep not doing group and user creation the same way as in production. We don't really have a pattern for creating groups in deployment-prep - would it be an issue if we just didn't create this group? I assume anyone working on this machine in deployment-prep will have sudo to begin with. In this case the group is used only to set permissions on the postgresql logs for the instance.

I'm happy to write a patch to this end if it sounds like a sensible idea.

Change 632935 had a related patch set uploaded (by Hnowlan; owner: Hnowlan):
[operations/puppet@production] map::postgresql_common: make maps-admin chgrp toggle

https://gerrit.wikimedia.org/r/632935

This issue is caused by deployment-prep not doing group and user creation the same way as in production. We don't really have a pattern for creating groups in deployment-prep - would it be an issue if we just didn't create this group? I assume anyone working on this machine in deployment-prep will have sudo to begin with. In this case the group is used only to set permissions on the postgresql logs for the instance.

I'm happy to write a patch to this end if it sounds like a sensible idea.

Thanks for looking at it. Well, unless I'm mistaken I don't know other way to load the needed puppet roles for maps in the beta cluster, although the previous deployment-maps04 beta instance didn't had any issues. I might be missing something.

Hard to say what happened before - It might have been manually added locally to work around this

Change 632935 merged by Hnowlan:
[operations/puppet@production] map::postgresql_common: make maps-admin chgrp toggle

https://gerrit.wikimedia.org/r/632935

MSantos assigned this task to hnowlan.