Size: 2202
Comment:
|
← Revision 40 as of 2022-10-25 16:12:21 ⇥
Size: 5817
Comment:
|
Deletions are marked like this. | Additions are marked like this. |
Line 1: | Line 1: |
#acl All:read |
|
Line 2: | Line 4: |
=== Work in Progress or Draft only === | Please read documentation: [[http://www.cse.unsw.edu.au/~virtualexam/| virtual exam]] |
Line 4: | Line 6: |
Please read the documentation of [[http://www.cse.unsw.edu.au/~virtualexam/| virtual exam]] /!\ The way the virtual exam white listed software (etc/vx.conf) will be rewritten early in Term 1 to better cope with software changes on CSE computers. |
In summary, logging into <class_account>vx e.g. cs1234vx starts the exam. The exam files are located in <class_account>exam e.g. cs1234exam, follow (symbolic link) ~+'''`currentexam`'''+~. You have ssh access to both these accounts if you have ssh access to the corresponding class account. |
Line 9: | Line 10: |
* ~give/stable/bin/prac_install_vx <from_prac> <to_prac> set up a standard virtual exam environment . if <from_prac> != <to_prac> . copy <from_prac> from virtual directory if exists . copy <from_prac> from gaol directory otherwise |
* '''~give/stable/bin/prac-install-vx [from_prac] to_prac''' set up a standard virtual exam environment in <class_account>exam . if from_prac != to_prac . copy from_prac from virtual directory if exists . copy from_prac from gaol directory otherwise |
Line 15: | Line 16: |
. copy <from_prac> from gaol directory | . copy from_prac from gaol directory ''gaol'' above refers to the old old old exam environment. |
Line 17: | Line 19: |
* priv passwd . change the vxN (eg vx6) password before and after the exam with this script . add the class account public key to the exam account (eg cs2521exam) |
* '''priv passwd''' . change the <class_account>vx password before and after the exam with this script * '''priv chown wildcard''' . change ownership of work directories from 90<uid> to exam account at the end of the exam to access the students' files . note that after changing ownership, students can't start the exam {{{ marimba % ls -la exams/19T1midterm/work total 16 drwxrwxrwt 4 en1811exam en1811exam 4096 Mar 14 21:19 . drwxr-x--- 6 en1811exam en1811exam 4096 Mar 12 17:50 .. drwxrws--- 14 929389 en1811exam 4096 Mar 14 21:36 z5016573 drwxrws--- 13 906444 en1811exam 4096 Mar 12 20:02 z8470184 }}} |
Line 21: | Line 34: |
* priv chown <path_wildcard> . change work directory ownership from 90<uid> to the exam account to access students' files . after changing ownership, students can't start the exam. so, do this only after the exam has finished. * ~give/stable/bin/vx-conf-product.pl * strace the command * feed the output of strace to this script * add vx.conf files as arguments . script will output files that are missing from the config files * dpkg-query, apt-cache depends |
* '''/home/vxconf/vx.conf.d''' is the repository for vx.conf files for commonly used products e.g. gcc, python, gedit, fluxbox . prac-install-vx creates ~/exams/<prac>/etc/vx.conf.d and fill it with symbolic links to vx.conf files in /home/vxconf/vx.conf.d . remove any sym links not needed. exam takes less time to start up if there are less software. {{{ -rw-r--r-- 1 vxconf vxconf 433 Mar 14 21:31 000-header.conf -rw-r--r-- 1 vxconf vxconf 220 Mar 14 21:31 100-basicx.conf -rw-r--r-- 1 vxconf vxconf 159 Mar 14 21:31 100-fontconfig.conf -rw-r--r-- 1 vxconf vxconf 99 Mar 14 21:31 100-rxvt.conf -rw-r--r-- 1 vxconf vxconf 202 Mar 14 21:31 200-wm-fluxbox.conf -rw-r--r-- 1 vxconf vxconf 351 Mar 14 21:31 200-wm-fvwm.conf -rw-r--r-- 1 vxconf vxconf 608 Mar 14 21:31 300-interp-perl.conf -rw-r--r-- 1 vxconf vxconf 210 Mar 14 21:31 300-interp-pylint.conf -rw-r--r-- 1 vxconf vxconf 1894 Mar 14 21:31 300-interp-python.conf -rw-r--r-- 1 vxconf vxconf 860 Mar 14 21:31 300-toolchain-binutils.conf -rw-r--r-- 1 vxconf vxconf 3374 Mar 14 21:31 300-toolchain-clang.conf -rw-r--r-- 1 vxconf vxconf 1690 Mar 14 21:31 300-toolchain-gcc.conf -rw-r--r-- 1 vxconf vxconf 105 Mar 14 21:31 300-toolchain-gdb.conf -rw-r--r-- 1 vxconf vxconf 79 Mar 14 21:31 300-toolchain-make.conf -rw-r--r-- 1 vxconf vxconf 212 Mar 14 21:31 300-toolchain-valgrind.conf -rw-r--r-- 1 vxconf vxconf 84 Mar 14 21:31 400-browser-firefox.conf -rw-r--r-- 1 vxconf vxconf 54 Mar 14 21:31 400-browser-midori.conf -rw-r--r-- 1 vxconf vxconf 369 Mar 14 21:31 400-browser-nautilus.conf -rw-r--r-- 1 vxconf vxconf 84 Mar 14 21:31 400-viewer-evince.conf -rw-r--r-- 1 vxconf vxconf 110 Mar 14 21:31 400-viewer-xpdf.conf -rw-r--r-- 1 vxconf vxconf 328 Mar 14 21:31 500-editor-emacs.conf -rw-r--r-- 1 vxconf vxconf 300 Mar 14 21:31 500-editor-gedit.conf -rw-r--r-- 1 vxconf vxconf 52 Mar 14 21:31 500-editor-idle.conf -rw-r--r-- 1 vxconf vxconf 47 Mar 14 21:31 500-editor-nedit.conf -rw-r--r-- 1 vxconf vxconf 96 Mar 14 21:31 500-editor-spyder3.conf -rw-r--r-- 1 vxconf vxconf 26 Mar 14 21:31 500-editor-vi.conf -rw-r--r-- 1 vxconf vxconf 161 Mar 14 21:31 500-editor-vim.conf }}} ~- thanks to Jashank for the original idea -~ |
Line 34: | Line 69: |
=== Tips === * when the exam crashes after you authenticated with your zid, check the stderr.log file under <exam_account>/var directory. Look at the latest directories. |
=== Problems - Tips on how to solve === * ensure that multiple logins are possible without files in the work directory being clobbered. use "cp -n" or "tar --keep-newer-files" or "unzip -n" * when the exam crashes after you authenticated with your zid, check stderr.log file under <exam_account>/var directory. Look at the latest directories. |
Line 45: | Line 81: |
* after changing ownership of the work directories (to exam account), you can't start the exam with the same work directories. | * after changing ownership of the work directories (e.g. under /home/cs1234exam/currentexam/work), you can't start the exam with the same work directories. |
Line 59: | Line 95: |
* path mounted on top of a previous mount cause the exam environment to abort on subsequent logins. The exam environment, on start, attempts to delete the old gaol if it exists by unmounting directories. {{{ vx08 % cat var/vx04-2104607/stderr.log umount: /var/gaol/meicheng/usr/lib/python3/dist-packages: not mounted. }}} * To fix the problem above, umount "/var/gaol/meicheng/usr/lib" to allow the gaol to be removed and therefore the student to log in. * To remove the gaol manually: {{{ # umount /var/gaol/meicheng/usr/lib /home/virtualexam/bin/delete_gaol <studentid> }}} * May need to remove any associated processes, look for user ID's equal to 900000 + the actual user ID. * The problem can be avoided by ensuring that a directory is not under [bind mounts] when its parent is already set to be mounted. Global bind mounts: {{{ [bind mounts] /lib /lib64 /usr/lib /usr/share /usr/include /etc/ssl /etc/fonts /etc/alternatives }}} |
Virtual Exam
Please read documentation: virtual exam
In summary, logging into <class_account>vx e.g. cs1234vx starts the exam. The exam files are located in <class_account>exam e.g. cs1234exam, follow (symbolic link) currentexam. You have ssh access to both these accounts if you have ssh access to the corresponding class account.
Useful scripts
~give/stable/bin/prac-install-vx [from_prac] to_prac
set up a standard virtual exam environment in <class_account>exam
- if from_prac != to_prac
- copy from_prac from virtual directory if exists
- copy from_prac from gaol directory otherwise
- else
- copy from_prac from gaol directory
gaol above refers to the old old old exam environment.
priv passwd
change the <class_account>vx password before and after the exam with this script
priv chown wildcard
change ownership of work directories from 90<uid> to exam account at the end of the exam to access the students' files
- note that after changing ownership, students can't start the exam
marimba % ls -la exams/19T1midterm/work total 16 drwxrwxrwt 4 en1811exam en1811exam 4096 Mar 14 21:19 . drwxr-x--- 6 en1811exam en1811exam 4096 Mar 12 17:50 .. drwxrws--- 14 929389 en1811exam 4096 Mar 14 21:36 z5016573 drwxrws--- 13 906444 en1811exam 4096 Mar 12 20:02 z8470184
/home/vxconf/vx.conf.d is the repository for vx.conf files for commonly used products e.g. gcc, python, gedit, fluxbox
prac-install-vx creates ~/exams/<prac>/etc/vx.conf.d and fill it with symbolic links to vx.conf files in /home/vxconf/vx.conf.d
- remove any sym links not needed. exam takes less time to start up if there are less software.
-rw-r--r-- 1 vxconf vxconf 433 Mar 14 21:31 000-header.conf -rw-r--r-- 1 vxconf vxconf 220 Mar 14 21:31 100-basicx.conf -rw-r--r-- 1 vxconf vxconf 159 Mar 14 21:31 100-fontconfig.conf -rw-r--r-- 1 vxconf vxconf 99 Mar 14 21:31 100-rxvt.conf -rw-r--r-- 1 vxconf vxconf 202 Mar 14 21:31 200-wm-fluxbox.conf -rw-r--r-- 1 vxconf vxconf 351 Mar 14 21:31 200-wm-fvwm.conf -rw-r--r-- 1 vxconf vxconf 608 Mar 14 21:31 300-interp-perl.conf -rw-r--r-- 1 vxconf vxconf 210 Mar 14 21:31 300-interp-pylint.conf -rw-r--r-- 1 vxconf vxconf 1894 Mar 14 21:31 300-interp-python.conf -rw-r--r-- 1 vxconf vxconf 860 Mar 14 21:31 300-toolchain-binutils.conf -rw-r--r-- 1 vxconf vxconf 3374 Mar 14 21:31 300-toolchain-clang.conf -rw-r--r-- 1 vxconf vxconf 1690 Mar 14 21:31 300-toolchain-gcc.conf -rw-r--r-- 1 vxconf vxconf 105 Mar 14 21:31 300-toolchain-gdb.conf -rw-r--r-- 1 vxconf vxconf 79 Mar 14 21:31 300-toolchain-make.conf -rw-r--r-- 1 vxconf vxconf 212 Mar 14 21:31 300-toolchain-valgrind.conf -rw-r--r-- 1 vxconf vxconf 84 Mar 14 21:31 400-browser-firefox.conf -rw-r--r-- 1 vxconf vxconf 54 Mar 14 21:31 400-browser-midori.conf -rw-r--r-- 1 vxconf vxconf 369 Mar 14 21:31 400-browser-nautilus.conf -rw-r--r-- 1 vxconf vxconf 84 Mar 14 21:31 400-viewer-evince.conf -rw-r--r-- 1 vxconf vxconf 110 Mar 14 21:31 400-viewer-xpdf.conf -rw-r--r-- 1 vxconf vxconf 328 Mar 14 21:31 500-editor-emacs.conf -rw-r--r-- 1 vxconf vxconf 300 Mar 14 21:31 500-editor-gedit.conf -rw-r--r-- 1 vxconf vxconf 52 Mar 14 21:31 500-editor-idle.conf -rw-r--r-- 1 vxconf vxconf 47 Mar 14 21:31 500-editor-nedit.conf -rw-r--r-- 1 vxconf vxconf 96 Mar 14 21:31 500-editor-spyder3.conf -rw-r--r-- 1 vxconf vxconf 26 Mar 14 21:31 500-editor-vi.conf -rw-r--r-- 1 vxconf vxconf 161 Mar 14 21:31 500-editor-vim.conf
thanks to Jashank for the original idea
Problems - Tips on how to solve
- ensure that multiple logins are possible without files in the work directory being clobbered. use "cp -n" or "tar --keep-newer-files" or "unzip -n"
when the exam crashes after you authenticated with your zid, check stderr.log file under <exam_account>/var directory. Look at the latest directories.
marimba % ls -lt ~/var | head -5 total 988 drwxr-xr-x 2 cs9024exam cs9024exam 4096 Feb 13 06:59 marimba-25528 drwxr-xr-x 2 cs9024exam cs9024exam 4096 Feb 12 20:49 wagner-7800 drwxr-xr-x 2 cs9024exam cs9024exam 4096 Feb 12 20:33 vx4-45795 drwxr-xr-x 2 cs9024exam cs9024exam 4096 Feb 12 18:39 vx4-34624
- after changing ownership of the work directories (e.g. under /home/cs1234exam/currentexam/work), you can't start the exam with the same work directories.
- create a new toplevel work directory.
cd ~/exams/18s2supp mv work work.19dec mkdir work chmod 1777 work
- or remove the student's work directory
cd ~/exams/18s2supp/work priv chown z5555555 rm -r z5555555
- create a new toplevel work directory.
- path mounted on top of a previous mount cause the exam environment to abort on subsequent logins. The exam environment, on start, attempts to delete the old gaol if it exists by unmounting directories.
vx08 % cat var/vx04-2104607/stderr.log umount: /var/gaol/meicheng/usr/lib/python3/dist-packages: not mounted.
- To fix the problem above, umount "/var/gaol/meicheng/usr/lib" to allow the gaol to be removed and therefore the student to log in.
- To remove the gaol manually:
# umount /var/gaol/meicheng/usr/lib /home/virtualexam/bin/delete_gaol <studentid>
- May need to remove any associated processes, look for user ID's equal to 900000 + the actual user ID.
- The problem can be avoided by ensuring that a directory is not under [bind mounts] when its parent is already set to be mounted. Global bind mounts:
[bind mounts] /lib /lib64 /usr/lib /usr/share /usr/include /etc/ssl /etc/fonts /etc/alternatives