Last modified: 2014-07-04 00:48:15 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 T69231, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 67231 - centralauth role fails with err: /Stage[main]/Multiwiki/File[/vagrant/settings.d/multiwiki]/owner: change from 502 to vagrant failed: Failed to set owner to '1001': Operation not permitted - /vagrant/settings.d/multiwiki
centralauth role fails with err: /Stage[main]/Multiwiki/File[/vagrant/setting...
Status: RESOLVED FIXED
Product: MediaWiki-Vagrant
Classification: Unclassified
General (Other open bugs)
unspecified
All All
: Normal normal
: ---
Assigned To: Ori Livneh
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2014-06-28 00:51 UTC by Kunal Mehta (Legoktm)
Modified: 2014-07-04 00:48 UTC (History)
4 users (show)

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


Attachments

Description Kunal Mehta (Legoktm) 2014-06-28 00:51:57 UTC
err: /Stage[main]/Multiwiki/File[/vagrant/settings.d/multiwiki]/owner: change from 502 to vagrant failed: Failed to set owner to '1001': Operation not permitted - /vagrant/settings.d/multiwiki

Bryan suggested that it might be a permissions issue with the mount.

I'm using OSX, which uses NFS.

vagrant@mediawiki-vagrant:/vagrant/settings.d$ ls -l
...
drwxr-xr-x  2 502 www-data    68 Jun 27 23:54 multiwiki
drwxr-xr-x 14 502 dialout    476 Jun 27 23:53 puppet-managed
...

On my actual OS:

$ ls -l
...
drwxr-xr-x   2 km  _appstore     68 Jun 27 16:54 multiwiki/
drwxr-xr-x  14 km  staff        476 Jun 27 16:53 puppet-managed/
...
Comment 1 Bryan Davis 2014-06-28 04:03:11 UTC
I think this is caused by the nfs provider and an OSX host system. NFS requires that the user and group ids exist on both the client and the server. On the Ubuntu guest, normal user uids start at 1001, on OSX they start at 501. See http://digiactive.com.au/blog/2014/01/18/fixing-permissions-on-vagrant-nfs-synced-folders/ for a more detailed description and one possible work around (vagrant-bindfs plugin).
Comment 2 Gerrit Notification Bot 2014-06-28 04:42:20 UTC
Change 142768 had a related patch set uploaded by BryanDavis:
Stop setting owner/group on files in /vagrant/settings.d

https://gerrit.wikimedia.org/r/142768
Comment 3 Bryan Davis 2014-06-28 05:09:07 UTC
Vagrant attempts to eliminate this uid/gid mapping problem by using the `-mapall` option for the nfs export. On my host (OSX 10.8.5; Vagrant 1.6.3), the export looks like this:

    "/path/to/vagrant" 10.11.12.13 -alldirs -mapall=501:20

This feature was added in https://github.com/mitchellh/vagrant/commit/46c462d322d633e01c788a75948a764c94365c4d (Vagrant 0.5.0)

On the Ubuntu guest the mount looks ok too:

    10.11.12.1:/path/to/vagrant on /vagrant type nfs (rw,vers=3,udp,addr=10.11.12.1)

I even tried creating a user on the host system with uid 1001, but to no avail.

Ori reports that it works fine for him :(
Comment 4 Bryan Davis 2014-06-28 18:35:58 UTC
Ori corrected his report to say that nfs in general works fine for him, but the centralauth/multiwiki classes have the same problem reported by Kunal. The patch in I3228ab4 works for me but does cause some puppet permission change spam on repeated `vagrant provision` calls.

If we end up creating an installer to setup the initial Vagrant environment, using the vagrant-bindfs plugin might be the cleanest long term solution for issues like this. I have been using vagrant-bindfs in a Vagrant VM that I use for scap testing and it seems to work well for allowing the guest VM to set file ownership as it sees fit without conflicting with the host OS.
Comment 5 Gerrit Notification Bot 2014-07-04 00:20:39 UTC
Change 142768 merged by jenkins-bot:
Stop setting owner/group on files in /vagrant/settings.d

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

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


Navigation
Links