Page MenuHomePhabricator

scap bootstrapping - puppet error when applying role::deployment_server
Open, Needs TriagePublic

Description

When you try to apply the role::deployment_server on a new machine:

Error: Could not retrieve catalog from remote server: Error 500 on SERVER: Server Error: Evaluation Error: Error while evaluating a Resource Statement, Evaluation Error: Error while evaluating a Resource Statement, Duplicate declaration: File[/usr/bin/scap] is already declared at (file: /srv/puppet_code/environments/production/modules/scap/manifests/init.pp, line: 44); cannot redeclare (file: /srv/puppet_code/environments/production/modules/scap/manifests/master.pp, line: 77) (file: /srv/puppet_code/environments/production/modules/scap/manifests/master.pp, line: 77, column: 5)

On 2022-08-03 /usr/bin/scap was added in init.pp in:

https://gerrit.wikimedia.org/r/c/operations/puppet/+/820139

and on 2022-10-04 /usr/bin/scap was added again in master.pp in:

https://gerrit.wikimedia.org/r/c/operations/puppet/+/820749

Causing the duplicate declaration.

Since apparently nobody has created a new deployment server since 2022, we notice this now when trying to replace an ancient buster machine with a bookworm machine.

Additionally but unrelatedly we also can't have a deployment server talk to a puppet 7 puppetserver because of T360470#9710780.

So currently we can't replace the deployment server and any project trying to test services deployed by scap would have broken puppet, has to go back to puppetmaster 5 or apply a local hack.

Event Timeline

For now I added a scap::enable_bootstrapping: false into web Hiera on the instance level for new machine deploy-1005 which lets me continue the initial puppet run to a certain extent.