Skip to content
This repository was archived by the owner on Oct 8, 2019. It is now read-only.

Commit 45f3ce2

Browse files
ramirojarshwah
authored andcommitted
Fixed #31 -- Document some Linux issues. (#34)
* Added suggestions for Linux OS-level NFS setup. * Clarified docs regarding Vagrant vbguest plugin. * Add blurb about virtualenv Python version mismatches.
1 parent 8e20871 commit 45f3ce2

File tree

1 file changed

+51
-8
lines changed

1 file changed

+51
-8
lines changed

README.md

Lines changed: 51 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -25,15 +25,25 @@ First of all, you need to install the latest versions of
2525
now) and [VirtualBox](https://www.virtualbox.org/wiki/Downloads) (currently at
2626
version 5.2.4) on your host machine.
2727

28-
If you use a version of VirtualBox that isn't 5.1.6 or newer you may run into
29-
problems creating the NFS mount. You can either upgrade VirtualBox, or you can
30-
try to install the [vagrant-vbguest](https://github.com/dotless-de/vagrant-vbguest)
31-
plugin, which will attempt to install your local version of GuestAdditions into
32-
the VM.
28+
If you use Linux, you'll need to ensure proper support for NFS installed so the
29+
Vagrant shared folders feature works. On Debian/ubuntu systems this can be
30+
achieved with:
3331

34-
```
35-
vagrant plugin install vagrant-vbguest
36-
```
32+
$ sudo apt-get install nfs-kernel-server
33+
34+
On Fedora/CentOS systems you'll need to execute something like:
35+
36+
$ sudo dnf install nfs-utils && sudo systemctl enable nfs-server
37+
38+
If you use a version of VirtualBox that isn't 5.1.6 you may run into problems
39+
creating the NFS mount. You can either
40+
41+
* Upgrade to VirtualBox 5.2.4
42+
* Or you can try to install the [vagrant-vbguest](https://github.com/dotless-de/vagrant-vbguest)
43+
plugin, which will attempt to install your local version of GuestAdditions
44+
into the VM:
45+
46+
vagrant plugin install vagrant-vbguest
3747

3848
Booting the VM
3949
--------------
@@ -157,6 +167,39 @@ like so:
157167

158168
The test suite will sometimes hang when running selenium tests in parallel mode.
159169

170+
Troubleshooting
171+
---------------
172+
173+
### Strange errors when running tests
174+
175+
The `tox.ini` configuration file shipped with the Django source code directs
176+
tox to create the virtual environments it uses for every test matrix
177+
configuration below a `.tox` directory it creates on the Django source code top
178+
directory.
179+
180+
django-box reuses Django's tox configuration, but executes tox inside the VM,
181+
so that `.tox/` tree gets persisted between test runs and shared between a tox
182+
copy you could use on the host and the django-box tox.
183+
184+
So it might happen than when faced with a mismatch between the version of Python
185+
used to create a virtual environment and the version currently in use to run
186+
the tests (e.g. Python micro version gets upgraded from 3.6.3 to 3.6.4 and this
187+
upgrade reaches your Linux host and/or the repositories used by the django-box
188+
VM), weird errors happen.
189+
190+
You can solve this by removing the virtualenv tree, e.g.:
191+
192+
(host) $ rm -rf <Django souce code top dir>/.tox/py36-mysql
193+
(vm) $ rm -rf /django/.tox/py36-mysql
194+
195+
or more drastically, removing the `.tox` directory:
196+
197+
(host) $ rm -rf <Django souce code top dir>/.tox
198+
(vm) $ rm -rf /django/.tox
199+
200+
This way the next time you run the tests, tox will rebuild the virtual
201+
environment anew with the correct version of Python.
202+
160203
Building the documentation
161204
--------------------------
162205

0 commit comments

Comments
 (0)