Last modified: 2014-03-21 16:19:43 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T63970, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 61970 - Directory permissions in /src/scap incorrect for new directories when created by puppet
Directory permissions in /src/scap incorrect for new directories when created...
Status: RESOLVED FIXED
Product: Wikimedia
Classification: Unclassified
Deployment systems (Other open bugs)
wmf-deployment
All All
: Highest major (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2014-02-26 23:57 UTC by Bryan Davis
Modified: 2014-03-21 16:19 UTC (History)
7 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Bryan Davis 2014-02-26 23:57:29 UTC
The mediawiki::sync Puppet class manages the /src/scap directory as a git clone of the mediawiki/tools/scap.git repository. When puppet updates the /src/scap checkout on cluster hosts and the update includes a new directory that directory will be created with 2755 permissions (rwxr-sr-x) due to the default umask of 022. These permissions will prevent wikidev deployers from forcing a git pull for any future changesets that include modifying the contents of the new directory.

Currently the /srv/scap/docs directory has this problem on the cluster.
Comment 1 Bryan Davis 2014-02-26 23:59:42 UTC
Not being able to force a git pull on the mediawiki-installation nodes via dsh means that new scap features which are merged can't be immediately guaranteed to be available across the cluster.
Comment 2 Bryan Davis 2014-02-27 00:56:10 UTC
The immediate problem could be solved by a root running:
    dsh -g mediawiki-installation -M -F 40 -- 'chmod g+w /srv/scap/docs'

That won't solve the underlying problem however.
Comment 3 Daniel Zahn 2014-02-27 04:11:55 UTC
https://gerrit.wikimedia.org/r/#/c/115851/
Comment 4 Gerrit Notification Bot 2014-02-27 08:37:28 UTC
Change 115851 had a related patch set uploaded by Hashar:
fix wrong scap/doc permissions.live hack->puppet

https://gerrit.wikimedia.org/r/115851
Comment 5 Bryan Davis 2014-03-05 21:30:41 UTC
The /srv/scap repo on tin (and likely all the other nodes) is now blocked from update by non-root due to directories in .git/objects with the same 2755 permissions problem.
Comment 6 Gerrit Notification Bot 2014-03-05 22:13:08 UTC
Change 115851 abandoned by Dzahn:
fix wrong scap/doc permissions.live hack->puppet

Reason:
per "This fixes a symptom, but the real problem is the behavior/configuration of git:clone. "

https://gerrit.wikimedia.org/r/115851
Comment 7 Antoine "hashar" Musso (WMF) 2014-03-05 22:18:29 UTC
There is a bunch of comments on https://gerrit.wikimedia.org/r/115851 which might lead to a proper solution (aka get git to ignore user umask in favor of hardcoded settings).
Comment 8 Bryan Davis 2014-03-07 16:24:06 UTC
Patch was abandoned. Root cause fix looks like it will require relatively deep puppet modifications (changing git::clone to set git configuration on new repos) or a rethinking of the deployment mechanism used.
Comment 9 Andre Klapper 2014-03-17 11:08:46 UTC
(In reply to Bryan Davis from comment #8)
> Root cause fix looks like it will require relatively
> deep puppet modifications (changing git::clone to set git configuration on
> new repos) or a rethinking of the deployment mechanism used.

Bryan:
So is either fixing this properly or finding an acceptable workaround still highest priority, relastically speaking? Or should priority be set lower?
Comment 10 Bryan Davis 2014-03-17 14:57:26 UTC
(In reply to Andre Klapper from comment #9)
> So is either fixing this properly or finding an acceptable workaround still
> highest priority, relastically speaking? Or should priority be set lower?

Ori was working on this on Friday. I think it's pretty close to being fixed. We seem to have permissions fixed now for members of the wikidev group. In the process however the permissions on the /srv/scap top level directory were broken.

    $ ls -ld /srv/scap
    drwxrws--- 6 root wikidev 4096 Mar 10 03:34 /srv/scap

The permissions on the top level directory should be 2775 (or even 0775) instead of the 2770 that is now set. Permissions seem to be set correctly on files and directories within /srv/scap.

The incorrect permissions on the base directory is causing the nightly l10nupdate cron job to fail.
Comment 11 Bryan Davis 2014-03-17 22:38:08 UTC
Ori has fixed the directory permissions for /srv/scap in puppet and then manually corrected all of cluster hosts. I'll leave this open for a day until I'm sure that further puppet runs don't cause some sort of regression.
Comment 12 Greg Grossmeier 2014-03-21 16:19:43 UTC
As of today:
gjg@tin:~$ ls -ld /srv/scap
drwxrwsr-x 6 root wikidev 4096 Mar 19 10:19 /srv/scap

gjg@mw1163:~$ ls -ld /srv/scap
drwxrwsr-x 6 root wikidev 4096 Mar 19 15:02 /srv/scap

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links