Page MenuHomePhabricator

[Trebuchet] did not correctly recreate a submodule upon deletion
Closed, DeclinedPublic

Description

/srv/deployment/... dirs on the deployment server should be group-writable, to allow non-root deployers to pull new changes. Matt Walker reports that the submodule directories for the ocg repository were not.


Version: wmf-deployment
Severity: normal

Details

Reference
bz64109

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 22 2014, 3:17 AM
bzimport added a project: Deployments.
bzimport set Reference to bz64109.
bzimport added a subscriber: Unknown Object (MLST).

mwalker wrote:

They were originally actually :p What happened was

  1. I changed the repo that the grain was deploying from
  2. I noticed that the repo change was not reflected in the /srv/deployment/ocg/ocg folder on tin
  3. I deleted /srv/deployment/ocg/ocg
  4. Puppet recreated /srv/deployment/ocg/ocg

At the end of that process everything in ocg/ocg was rw to wikidev, but the folder itself was not.

I had ori give wikidev rw on ocg/ocg as an interim step, but presumably puppet should be able to recreate with proper permissions.

mwalker wrote:

When I ran git deploy sync --force it also complained that the setting deploy.repo-name did not exist. I recreated that by hand and all was good.

We just saw the same behavior on deployment-bastion for the same repository:

  • /srv/deployment/ocg/ocg had 0755 permissions instead of 0775
  • /srv/deployment/ocg/ocg/.git/config was missing the [deploy] section
  • Submodules were present in the checkout but not in .git/config

I fixed this by:

  • sudo chmod g+w /srv/deployment/ocg/ocg
  • git submodule update --init --recursive
  • Added [deploy] section to .git/config:
    • repo-name = ocg/ocg
    • deploy.checkout-submodules = true
demon subscribed.

Nobody cares about Trebuchet anymore.