Marmoset Course Configuration

TROUBLESHOOTING (Quick-n-Dirty)

Context

CS courses that use Marmoset have special processes called buildservers that run on csNNNt accounts in the linux.student.cs environment. You can check the status of these here: https://marmoset.student.cs.uwaterloo.ca/status/QueryBuildServerStatus.

The way I usually setup the buildervers for a course is to have 18 of them per course, with 9 on one host and 9 on another. I usually run them on the alphabetically last two hosts in the list of available hosts. So at the time of this writing, linux028.student.cs and linux032.student.cs are being used to run Marmoset buildservers.

If a course is reporting problems with the buildservers, the easiest solution is usually to restart them ...

Restarting buildservers for a course

You will have to do the following on both of the hosts that run the buildservers for the course, separately (replace NNN and MMM with relevant numbers):

  • Log in to csNNNt@linuxMMM.student.cs and make sure you cd ~csNNNt.
  • Type the following and hit ENTER: rm -rf buildserver/*linuxMMM*/*.pid; pkill -ucsNNNt java; /u/cs_build/bin/restartbuildservers
  • Do a sanity check by typing pgrep -ucsNNNt java and hitting ENTER. You should see a list of 9 process Ids.
  • Double check here: https://marmoset.student.cs.uwaterloo.ca/status/QueryBuildServerStatus to make sure the buildservers for csNNNt on linuxMMM.student.cs are back online.

The above should get you back the buildservers.

How to set up a course with Marmoset for a new term

0. Pre-requisite accounts and properties

Unless csNNN already has the properties listed immediately below this line, make the following requests to accounts@cs.uwaterloo.ca in one email, and do not proceed further in this document until these properties have been achieved:

  1. Unless it already exists, create the course account csNNN and ensure that it belongs to group cs_build.
  2. An auxillary account, csNNNt, should be created for testing purposes. It should belong to the eponymous group csNNNt.
  3. csNNN should also belong to group csNNNt.
  4. csNNN should be able to sudo as csNNNt.

1. Add course to Marmoset Submitserver ( takes a few seconds ! )

The submitserver is the front-end of the Marmoset system and is where students submit assignments and receive feedback from testing. Instructors and TAs can obtain more detailed information. It is accessed at https://marmoset.student.cs.uwaterloo.ca.

Every CSCF Point-of-contact is authorized to add courses. When first contacted by course staff to add a course to Marmoset, they usually expect that just this part of the setup be completed for them soon, and that the next step is done near the end of the term.

To create a course in Marmoset, go to https://marmoset.student.cs.uwaterloo.ca, log in and then select "Superuser" from the options on the top of the page. Then create a course using the following rules:

  1. A course name must be in the form of CSNNN (note uppercase 'CS' instead of lowercase 'cs')
  2. A semester must be in the form of Spring 2009 (or whichever term you are working with)
  3. You will automatically be added as an instructor, you can add others using the Register an Instructor for this course using a web interface option on this course's main Marmoset page. This option will ask you for some fields which should be straightforward. The password can be set to anything (like the userid) as it is not used.

Note: Sometimes ISG has requested course names such as CS246_PROJECT. This is OK and the course name may be specified as requested, and used as an argument to relevant scripts mentioned in the next section.

2. Configure Buildservers on the Course Testing Account (csNNNt) ( takes maybe 10-15 minutes ! )

After the above properties are achieved, proceed to setup the buildservers for your course: (this should be done every term)

A buildserver is a process that runs as csNNNt on a particular *.student.cs host. Its main job is to get student submissions and corresponding tests from marmoset.student.cs.uwaterloo.ca and run the former against the latter. Then it returns results to marmoset.student.cs.uwaterloo.ca for display to students and instructors alike. Experience has shown that one host should not run more than 6-9 buildserver processes.

Cleaning up a previous buildserver installation on the course testing account

  1. Go to the home directory for csNNNt and check to see if there is a buildserver directory in the root directory of the account. If there is no such directory, you have to do no cleanup - skip this section and go the next section. If there is a buildserver directory, this is most likely a previous installation and you should talk to course staff before proceeding and thereby turning off/affecting any currently running csNNN buildservers. Often course staff would like to start setting up stuff in the submitserver early on (see "Add course ..." above) and then use any new buildservers after exams have ended.
  2. Do an ls buildserver and write down any hostnames you see in the resulting subdirectory names.
  3. For every host you found in the previous step:
    1. Remove any cron jobs for csNNNt.
    2. Do a pkill -ucsNNNt java, to kill running buildserver processes.
  4. Now you can simply do an rm -rf buildserver and proceed to the next section to install new buildservers for csNNNt.

Installing the Buildservers into the course testing account

Buildservers are installed on the hosts they run on (the new linux hosts at the time of this writing) as csNNNt. For a course, we typically perform the following steps on two different linux.student.cs hosts. See https://marmoset.student.cs.uwaterloo.ca/status/QueryBuildServerStatus for examples of currently running buildservers.

Follow these steps:

  1. Log into the course account testing account (csNNNt) on the host you want to run the buildservers on.
  2. mkdir buildserver in the root directory of the course testing account (/u/csNNNt). You will only have to do this once if you're going to install buildservers on other hosts for this account.
  3. execute ~cs_build/bin/installbuildservers 'Spring 1999' CSNNN as csNNNt; this installs 9 buildservers in /u/csNNNt/buildserver for the Marmoset course CSNNN Spring 1999 on the host that the script is executed on.
  4. The previous step also installed a crontab on this host. Use crontab -l for what the command did.
  5. Go to https://marmoset.student.cs.uwaterloo.ca/status/QueryBuildServerStatus in about a minute to see if your buildservers are running successfully. If things aren't running, try executing the cron jobs manually to see what possible errors are occurring (as cron output is normally /dev/null'd to avoid auto-spamming). Also consider whether you specified the course name and semester correctly as they have to match with what's actually on the submitserver (see 'Add course ...' above).

If you encounter problems, please contact omnafees@uwaterloo.ca or and provide the output from the script above and any error messages.

3. Documentation on how to use marmoset, for course staff.

Marmoset usage and debugging tips are in the ISG wiki at https://www.cs.uwaterloo.ca/twiki/view/ISG/Marmoset

Other documentation links

Topic revision: r38 - 2014-12-16 - BillInce
 
This site is powered by the TWiki collaboration platform Powered by PerlCopyright © 2008-2019 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback