-
-
Notifications
You must be signed in to change notification settings - Fork 166
Ww216 patches stat updates #1424
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
… or the library browser will complain. 2. make www-data the owner of htdocs/tmp with write privileges
…l reconfiguration
|
I've added startup instructions -- I think that this PR is now ready for testing. If you are testing you will need to remove some cached files from your docker. Make sure these files are not being used it's important that both admin course directory and the admin entry in the database are removed (in this case we removed the entire database). If the course database entry and the course directory are not in sync then you will get anomolous behavior. return to webwork2 and follow the instructions in |
|
I have not tested yet, but my experience is that running |
|
in this case webwork2/htdocs/tmp is internally mounted. In fact everything is internally mounted for this "out of the box experience" version of setting up webwork except for the courses (including admin course). Once this works I plan to use your notes and create instructions for docker in which things are externally mounted and ready for production. I'll keep your experiences in mind. I'll also do more tests on the current configuration and see if I can find start up delays. ty |
|
update-OPL-statistics needs improvements. It balks if there is a course in the course directory but no corresponding tables in the database. This is a common reason why automatic docker builds fail. Fixing this could be part of a broader fix to reconcile or at least fail gracefully when there are discrepancies between the courses listed in the database and courses listed in the course directory |
|
I've never been happy with using the courses directory as the authoritative list of courses on the server, but short of creating a new data structure somewhere (e.g. additional DB table) I don't see a better way to generate the list. |
|
I think we could add a phase to which would return all the Another option might be to query if one specific the table exists for a "course" candidate using the There are calls using this approach in 2 places: so the potential to add such a test should be reasonable to implement. |
|
Checking both the courses directory and the courses table in the database would be a good sanity check -- particularly with regard to the admin course. Several times I have removed the admin course, but not the table entry when trying to rebuild the docker box from scratch and get errors that I wasn't expecting. |
taniwallach
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure there is a need for an "offline" file of instructions. There is already the Wiki page at https://github.com/openwebwork/webwork2/wiki/Docker-newbie-instructions.
I there is an intention to keep the file, I recommend moving it into either the docs of docker-config subdirectory and not to clutter up the root directory of the repository more than necessary.
| $WEBWORK_ROOT/bin/restore-OPL-tables.pl | ||
| $WEBWORK_ROOT/bin/load-OPL-global-statistics.pl | ||
| #$WEBWORK_ROOT/bin/update-OPL-statistics.pl | ||
| $WEBWORK_ROOT/bin/update-OPL-statistics.pl |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think that this should not be run on each startup.
I recommend touching a file in a suitable location once it was run once, and only running it if that file does not exist.
|
|
||
| chown -R www-data:www-data logs tmp DATA | ||
| chmod -R ug+w logs tmp DATA | ||
| chown -R www-data:www-data logs tmp DATA htdocs/tmp |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
On production servers, the recursive -R on htdocs/tmp is a real slow-down on startup time.
If you really have a need for the chown and chmod on htdocs/tmp - I recommend putting it into different lines and not using -R but just processing all first and second level directories/files without going deeper. Something like
chown www-data:www-data htdocs/tmp htdocs/tmp/* htdocs/tmp/*/*
chmod ug+w htdocs/tmp htdocs/tmp/* htdocs/tmp/*/*
which I suspect should handle most issues without needing to recursively process the entire directory tree under htdocs/tmp.
|
replaced by patch5 |
this makes www-data owner of htdocs/tmp
it also runs update-OPL-statistics to prevent complaints from the library about the statistics file not existing.