Page MenuHomePhabricator

Adding a new scap::source failed due to lack of git user config
Closed, ResolvedPublic

Description

After mergeing a [[ URL | change ]] to add a new scap::source we recived the following error

Error: Execution of '/usr/bin/scap deploy --init' returned 70: 
Error: /Stage[main]/Profile::Mediawiki::Deployment::Server/Scap::Source[netbox-dev/deploy]/Scap_source[netbox-dev/deploy]/ensure: change from 'absent' to 'present' failed: Execution of '/usr/bin/scap deploy --init' returned 70:  (corrective)

Running the scap command manually as trebuchet gave the following error

$ :/srv/deployment/netbox-dev/deploy$ /usr/bin/scap deploy --init
11:41:06 Started setup [netbox/deploy@87a36a7]
11:41:06 Deploying Rev: HEAD = 87a36a7ad0cda7390fa35ffb4931fc5bab6db788
11:41:06 Finished setup [netbox/deploy@87a36a7] (duration: 00m 00s)
11:41:06 Unhandled error:
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/scap/cli.py", line 462, in run
    exit_status = app.main(app.extra_arguments)
  File "/usr/lib/python3/dist-packages/scap/deploy.py", line 764, in main
    git.tag_repo(self.deploy_info, location=self.context.root)
  File "/usr/lib/python3/dist-packages/scap/git.py", line 495, in tag_repo
    deploy_info["commit"],
  File "/usr/lib/python3/dist-packages/scap/runcmd.py", line 91, in gitcmd
    return _runcmd(["git", subcommand] + list(args), **kwargs)
  File "/usr/lib/python3/dist-packages/scap/runcmd.py", line 78, in _runcmd
    raise FailedCommand(argv, p.returncode, stdout, stderr)
scap.runcmd.FailedCommand: Command 'git tag -fa -muser trebuchet -mtimestamp 2022-05-06T11:41:06.088669 -- scap/sync/2022-05-06/0001 87a36a7ad0cda7390fa35ffb4931fc5bab6db788' failed with exit code 128;
stdout:

stderr:

*** Please tell me who you are.

Run

  git config --global user.email "[email protected]"
  git config --global user.name "Your Name"

to set your account's default identity.
Omit --global to set the identity only in this repository.

fatal: empty ident name (for <[email protected]>) not allowed

11:41:06 deploy failed: <FailedCommand> Command 'git tag -fa -muser trebuchet -mtimestamp 2022-05-06T11:41:06.088669 -- scap/sync/2022-05-06/0001 87a36a7ad0cda7390fa35ffb4931fc5bab6db788' failed with exit code 128;
stdout:

stderr:

*** Please tell me who you are.

Run

  git config --global user.email "[email protected]"
  git config --global user.name "Your Name"

to set your account's default identity.
Omit --global to set the identity only in this repository.

fatal: empty ident name (for <[email protected]>) not allowed

adding a git user and email resolved this issue

$ git config user.email [email protected]
$ git config user.name trebuchet
$ /usr/bin/scap deploy --init
11:44:34 Started setup [netbox/deploy@87a36a7]
11:44:34 Deploying Rev: HEAD = 87a36a7ad0cda7390fa35ffb4931fc5bab6db788
11:44:34 Finished setup [netbox/deploy@87a36a7] (duration: 00m 00s)

It looks like we need to add global git config for trebuchet

Event Timeline

Further to this on the passive node (deploy2002) we get an error on every puppet run due to the following

$ /usr/bin/scap deploy --init
11:53:30 deploy failed: <LockFailedError> Failed to acquire lock "/var/lock/scap-global-lock"; owner is "root"; reason is "Not the active deployment server, use deploy1002.eqiad.wmnet"
RhinosF1 renamed this task from Adding a nes scap::soource failed due to lack of git user config to Adding a new scap::soource failed due to lack of git user config.Jun 11 2023, 6:12 PM
dancy renamed this task from Adding a new scap::soource failed due to lack of git user config to Adding a new scap::source failed due to lack of git user config.Jun 12 2023, 4:16 PM

Change 929400 had a related patch set uploaded (by Chad; author: Chad):

[operations/puppet@production] deployment_server: set user.email and user.name in git config

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

Change 929400 merged by Clément Goubert:

[operations/puppet@production] deployment_server: set user.email and user.name in git config

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