The 'getpapers' system

These packages are required to allow package retrieval on exam desktops. To install, see exam-desktop.h for required packages and detailed installation notes.

Usage:

  getpapers [--test] [--restore]

getpapers requires the package spython, a restrictive python suid wrapper (which may only be of limited use in general-purpose scripts).

Development

Development of getpapers is hosted on the Inf subversion server.

At its core getpapers does little more than cp -r, but with unambiguous user feedback and robust, verging on paranoid, validity checking. Future versions may also perform checks on the student's registered courses.

Errata

Fixed in 1.5.4:

  • The manual page incorrectly names the paper source directory 'resources'. The correct name is of course 'papers'.

Configuring for Exam

Exam course and paper (actually diet) must to be defined for getpapers to function; this information is also needed for the examsubmit script amongst other things.

This is performed during lockdown using the examlockdown-lock command:

  examlockdown-lock {course} {paper} {host|room [...]}

NOTE: it is no longer valid to amend the live/exam-desktop.h header. This functionality has been deprecated.

In lockdown mode, the examlock.course and examlock.paper component resources write the configuration file which controls the paper retrieval (and exam submission) destination. Without a valid configuration file, getpapers will do nothing (and inform the user, and log that this is the case). See the getpapers manual page for details on where and how this config is written if for some reason the file must be manually edited.

If the source directory is readable, getpapers follows the procedure below (this is also outlined in the command's manual page):

  • A local staging directory is created for the user on the exam machine. This directory is readonly to the user and contains a mirror of the files in the source. Each time getpapers is run, this directory will be removed and rewritten.

Then, using the staging directory as a new source:

  • A target path in the user's home directory is created, named course-paper after the variables defined at lockdown. It will not overwrite any files or directories here, and will request that the user remove any obstacle. Typically users cannot remove directories created previously by getpapers, and instead would be instructed to issue mv mod-ex mod-ex.old if the need were to arise.

  • If files are found in the root of the source directory, they will be copied into the user's home directory, emulating previous versions of getpapers

  • If files are found in a subdirectory named papers a link, ~/course-paper/papers, will be created in the user's home directory pointing to the staging copy of the files. This ensures that large, unmodifiable files are not backed up alongside the user's work. The user will not be able to modify these files.

  • If files are found in a subdirectory named templates, these files will be copied into new subdirectory ~/module-exam/templates/ and their permissions altered to ensure that the user can edit and submit these files. additionally a symlink named original_templates will be created which directs the user to a readonly copy of the same files.

Restoration and unlocking

Note that, by keeping papers and other resources out of the user's home directory, these files are not backed up periodically along with the user's work, nor are they available to the examrestore command. For this purpose, getpapers supports a --restore mode which will recreate the local cache on a machine without attempting to write any files to the user's home directory.

Finally, when an exam machine is unlocked, the file component removes all getpapers configuration, preventing its use even if the program remains installed.

Suspected NFS / AMD problems

As of DICE SL6 this section appears to no longer be important, but is kept for reference:

By default getpapers performs a series of stat() operations up the directory tree to the specified one, in an attempt to mitigate any timeouts or other server errors. This has not been a successful strategy so far as we are aware(!) The tickle option can be disabled by adding the line tickle = false to the configuration file using the file component or other means.

As of getpapers 1.3, the tickle option attempted proper read operations rather than mere stats. This appears to have had more success though it's really not clear if it's the tickle or some external change which allows getpapers (and subsequent submissions) to run more successfully.

In order to detect or prevent NFS mounting problems getpapers has a --test option which checks if access to the files will succeed without copying them from their secure location. It is recommended that this be run at time of lockdown, or just before exams begin, on all examination machines.

Further configuration

Beyond exam and module, all values (such as source and target directories) are hard-coded. If frequent configuration of these is required it would be trivial to have them read from configuration file, but for now an edit and re-release would be required (see Development).

The exception to this is the staging directory, which can be configured using the staging configuration file option for testing purposes. See the getpapers (1) manual page for more details.

Monitoring

The retrieval process is logged extensively into syslog and collated on the exam log host. All logs are tagged with getpapers for ease of grepping.

Edit | Attach | Print version | History: r18 | r15 < r14 < r13 < r12 | Backlinks | Raw View | Raw edit | More topic actions...
Topic revision: r13 - 25 Mar 2013 - 12:50:38 - GrahamDutton
 
This site is powered by the TWiki collaboration platformCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback
This Wiki uses Cookies