Presentation is loading. Please wait.

Presentation is loading. Please wait.

Condor Project Computer Sciences Department University of Wisconsin-Madison Condor Administration.

Similar presentations


Presentation on theme: "Condor Project Computer Sciences Department University of Wisconsin-Madison Condor Administration."— Presentation transcript:

1 Condor Project Computer Sciences Department University of Wisconsin-Madison condor-admin@cs.wisc.edu http://www.cs.wisc.edu/condor Condor Administration Paradyn-Condor Week UW Campus March 2002

2 http://www.cs.wisc.edu/condor 2 Outline › Other sources of Information › User Priorities › Policy Expressions › Life-cycle of a job – submit to complete  Daemons – what they do and require  Startd states and activities › Useful admin commands › Authorization and Authentication  General Security Comments/Worries

3 http://www.cs.wisc.edu/condor 3 Outline, cont. › Installation Layout › Contrib Modules › Walk-thru of UW-Madison’s condor_config files

4 http://www.cs.wisc.edu/condor 4 Other Sources › Condor Manual › Condor Web Site › “How to Build a Beowulf Cluster on Linux” by Thomas Sterling, MIT Press, published in 2001 › Email to condor-admin@cs.wisc.edu

5 http://www.cs.wisc.edu/condor 5 User Priorities › Command condor_userprio › How it all works › About nice_user › Config file Settings:  Priority_Halflife, Default_Prio_Factor, Nice_User_Prio_Factor, Remote_Prio_Factor, Account_local_Domain

6 http://www.cs.wisc.edu/condor 6 Introduction to Condor’s Configuration Files › Condor’s configuration is a concatenation of multiple files, in order - definitions in later files overwrites previous definitions › Layout and purpose of the different files:  Global config file  Other shared files  Local config file  Root config file (optional)

7 http://www.cs.wisc.edu/condor 7 Global Config File › All shared settings across your entire pool › Found either in file pointed to with the CONDOR_CONFIG environment variable, /etc/condor/condor_config, or the home directory of the “condor” user › Most settings can be in this file › Only works as a “global” file if it is on a shared file system

8 http://www.cs.wisc.edu/condor 8 Other shared files › You can configure a number of other shared config files:  files to hold common settings to make it easier to maintain (for example, all policy expressions, which we’ll see later)  platform-specific config files

9 http://www.cs.wisc.edu/condor 9 Local config file › Any machine-specific settings  local policy settings for a given owner  different daemons to run (for example, on the Central Manager!) › Can either be on the local disk of each machine, or have separate files in a shared directory, each named by hostname

10 http://www.cs.wisc.edu/condor 10 Root config file (optional) › You can specify a “root” config file, which is always processed after all other files › This allows root to specify certain settings which cannot be changed by another user (like the path to the Condor daemons) › Only useful if daemons are started as root but someone else has access to edit Condor’s config files

11 http://www.cs.wisc.edu/condor 11 Basic syntax › # is a comment › A “\” at the end of a line is a line- continuation, so both lines are treated as one big entry › All names are case insensitive › “Macros” have the form:  Attribute_Name = value › You reference other macros with:  A = $(B)

12 http://www.cs.wisc.edu/condor 12 Policy Expressions Back to Frieda

13 http://www.cs.wisc.edu/condor 13 I am adding nodes to the Cluster… but the Engineering Department has priority on these nodes. (Boss Fat Cat) Policy Configuration

14 http://www.cs.wisc.edu/condor 14 The Machine (Startd) Policy Expressions START – When is this machine willing to start a job RANK - Job Preferences SUSPEND - When to suspend a job CONTINUE - When to continue a suspended job PREEMPT – When to nicely stop running a job KILL - When to immediately kill a preempting job

15 http://www.cs.wisc.edu/condor 15 Freida’s Current Settings START = True RANK = SUSPEND = False CONTINUE = PREEMPT = False KILL = False

16 http://www.cs.wisc.edu/condor 16 Freida’s New Settings for the Chemistry nodes START = True RANK = Department == “Chemistry” SUSPEND = False CONTINUE = PREEMPT = False KILL = False

17 http://www.cs.wisc.edu/condor 17 Submit file with Custom Attribute Executable = charm-run Universe = standard +Department = Chemistry queue

18 http://www.cs.wisc.edu/condor 18 What if “Department” not specified? START = True RANK = Department =!= UNDEFINED && Department == “Chemistry” SUSPEND = False CONTINUE = PREEMPT = False KILL = False

19 http://www.cs.wisc.edu/condor 19 Another example START = True RANK = Department =!= UNDEFINED && ((Department == “Chemistry”)*2 + Department == “Physics”) SUSPEND = False CONTINUE = PREEMPT = False KILL = False

20 http://www.cs.wisc.edu/condor 20 The Cluster is fine. But not the desktop machines. Condor can only use the desktops when they would otherwise be idle. (Boss Fat Cat) Policy Configuration, cont

21 http://www.cs.wisc.edu/condor 21 So Frieda decides she wants the desktops to: › START jobs when their has been no activity on the keyboard/mouse for 5 minutes and the load average is low › SUSPEND jobs as soon as activity is detected › PREEMPT jobs if the activity continues for 5 minutes or more › KILL jobs if they take more than 5 minutes to preempt

22 http://www.cs.wisc.edu/condor 22 Macros in the Config File NonCondorLoadAvg = (LoadAvg - CondorLoadAvg) BackgroundLoad = 0.3 HighLoad = 0.5 KeyboardBusy = (KeyboardIdle < 10) CPU_Busy = ($(NonCondorLoadAvg) >= $(HighLoad)) MachineBusy = ($(CPU_Busy) || $(KeyboardBusy)) ActivityTimer= (CurrentTime - EnteredCurrentActivity)

23 http://www.cs.wisc.edu/condor 23 Desktop Machine Policy START = $(CPU_Idle) && KeyboardIdle > 300 SUSPEND= $(MachineBusy) CONTINUE = $(CPU_Idle) && KeyboardIdle > 120 PREEMPT= (Activity == "Suspended") && $(ActivityTimer) > 300 KILL = $(ActivityTimer) > 300

24 http://www.cs.wisc.edu/condor 24 Policy Review › Users submitting jobs can specify Requirements and Rank expressions › Administrators can specify Startd Policy expressions individually for each machine (Start,Suspend,etc) › Expressions can use any job or machine ClassAd attribute › Custom attributes easily added › Bottom Line: Enforce almost any policy!

25 http://www.cs.wisc.edu/condor 25 Additional Policy Parameters › WANT_SUSPEND › WANT_VACATE

26 http://www.cs.wisc.edu/condor 26 True Road Map of the Policy Expressions STARTSTART WANT SUSPEND SUSPENDSUSPEND VacatingVacating PREEMPTPREEMPT KILLKILL True False WANT VACATE KillingKilling False = Expression = Activity

27 http://www.cs.wisc.edu/condor 27 Negotiator Policy Expressions › PREEMPTION_REQUIREMENTS › PREEMPTION_RANK Examples: PREEMPTION_REQUIREMENTS = $(StateTimer) > (1 * $(HOUR)) && RemoteUserPrio > SubmittorPrio * 1.2 PREEMPTION_RANK = (RemoteUserPrio * 1000000) - ImageSize

28 http://www.cs.wisc.edu/condor 28 The Condor Daemons › condor_master (controls everything else) › condor_startd (executing jobs)  condor_starter (helper for starting jobs) › condor_schedd (submitting jobs)  condor_shadow (submit-side helper) › condor_collector (only on Central Manager) › condor_negotiator (only on CM) › You only have to run the daemon(s) for the service(s) you want to provide

29 http://www.cs.wisc.edu/condor 29 condor_master › Starts up all other Condor daemons › If there are any problems and a daemon exists, it restarts the daemon and sends email to the administrator › Checks the time stamps on the binaries it is configured to spawn, and if new binaries appear, the master will gracefully shutdown the currently running version and start the new version

30 http://www.cs.wisc.edu/condor 30 condor_master (cont’d) › Provides access to many remote administration commands:  condor_reconfig  condor_restart, condor_off, condor_on › Default server for many other commands:  condor_config_val, etc. › Periodically runs condor_preen to clean up any files Condor might have left on the machine (the rest of the daemons clean up after themselves, as well)

31 http://www.cs.wisc.edu/condor 31 condor_startd › Represents a machine to the Condor pool › Enforces the wishes of the machine owner (the owner’s “policy”) › Responsible for starting, suspending, and stopping jobs › Spawns the appropriate condor_starter, depending on the type of job › Provides other administrative commands: (for example, condor_vacate)

32 http://www.cs.wisc.edu/condor 32 condor_starter › Spawned by the condor_startd to handle all the details of starting and managing the job (for example, transferring the job’s binary to the executing machine or sending back exit status) › On SMP machines, you get one condor_starter per CPU › For PVM jobs, the starter also spawns a PVM daemon (condor_pvmd)

33 http://www.cs.wisc.edu/condor 33 condor_schedd › Represents users to the Condor pool › Maintains persistent queue of jobs  Queue is not strictly FIFO (priority based) › Responsible for contacting available machines and spawning waiting jobs › Services most user commands:  condor_submit  condor_rm  condor_q

34 http://www.cs.wisc.edu/condor 34 condor_shadow › Represents the job on the submit machine › Services requests from “standard” jobs for “remote system calls”, including all file I/O › Is responsible for making decisions on behalf of the job (for example, where to store the checkpoint file) › There will be one condor_shadow process running on your submit machine for each currently running Condor job

35 http://www.cs.wisc.edu/condor 35 condor_shadow (cont’d) › The shadow doesn’t put much load on your submit machine:  Almost always blocked waiting for requests from the job or doing I/O  Relatively small memory footprint › Still, you can limit the impact of the shadows on a given submit machine:  They can be started by Condor with a “nice-level” that you configure ( renice )  Can put a limit on the total number of shadows running on a machine

36 http://www.cs.wisc.edu/condor 36 condor_collector › Collects information from all other Condor daemons in the pool › Each daemon sends a periodic update called a “ClassAd” to the collector › Services queries for information:  Queries from other Condor daemons  Queries from users (condor_status)

37 http://www.cs.wisc.edu/condor 37 condor_negotiator › Performs “matchmaking” in Condor  Gets information from the collector about all available machines and all idle jobs  Tries to match jobs with machines that will serve them  Both the job and the machine must satisfy each other’s requirements (this is called “2-way matching”) › Handles User Priorities

38 http://www.cs.wisc.edu/condor 38 Layout of a General Condor Pool Central Manager master collector negotiator schedd startd = ClassAd Communication Pathway = Process Spawned Submit-Only master schedd Execute-Only master startd Regular Node schedd startd master Regular Node schedd startd master Execute-Only master startd

39 http://www.cs.wisc.edu/condor 39 Customer Job Job Startup Submit Schedd Shadow Startd Starter Condor Syscall Lib

40 http://www.cs.wisc.edu/condor 40 Machine States PREEMPTING CLAIMED UNCLAIMED OWNER MATCHED begin

41 http://www.cs.wisc.edu/condor 41 Useful Admin Commands

42 http://www.cs.wisc.edu/condor 42 Viewing things with condor_status › condor_status has lots of different options to display various kinds of info › Supports “-constraint” so you can only view ClassAds that match an expression you specify › Supports “-format” so you can get the data in whatever form you want (very useful for writing scripts) › View any kind of daemon ClassAd

43 http://www.cs.wisc.edu/condor 43 Viewing things with condor_q › View the job queue › The “-long” option is useful to see the entire ClassAd for a given job › Also supports the “-constraint” option › Can view job queues on remote machines with the “-name” option

44 http://www.cs.wisc.edu/condor 44 Looking at condor_q - analyze › You specify a job or set of jobs you want to analyze › condor_q will try to figure out why the job isn’t running › The output is not as user-friendly as we’d like (though we’re working on it) › Good at finding errors in Requirements expressions set by users

45 http://www.cs.wisc.edu/condor 45 Host/IP Security in Condor › You can configure each machine in your pool to allow or deny certain actions from different groups of machines:  “read” access - querying information condor_status, condor_q, etc  “write” access - updating information condor_submit, adding a node to the pool, etc  “administrator” access condor_on, off, reconfig, restart...  “owner” access Things a machine owner can do (vacate)

46 http://www.cs.wisc.edu/condor 46 Setting up Host/IP- address Security in Condor (part 1) › To configure, you list what hosts are allowed or denied to perform each action  If you list hosts that are allowed, everything else is denied  If you list hosts that are denied, everything else is allowed  If you list both, only hosts that are listed in “allow” but not in “deny” are allowed

47 http://www.cs.wisc.edu/condor 47 Setting up Host/IP- address Security in Condor (part 2) › There are many possibilities for specifying which hosts are allowed or denied:  Host names, domain names  IP addresses, subnets  Wildcards ‘*’ can be used anywhere (once) in a host name (for example, “infn-corsi*.corsi.infn.it) ‘*’ can be used at the end of any IP address (e.g. “128.105.101.*” or “128.105.*”)

48 http://www.cs.wisc.edu/condor 48 Setting up Host/IP- address Security in Condor (part 3) › Can define values that effect all daemons:  HOSTALLOW_WRITE, HOSTDENY_READ, HOSTALLOW_ADMINISTRATOR, etc. › Can define daemon-specific settings:  HOSTALLOW_READ_SCHEDD, HOSTDENY_WRITE_COLLECTOR, etc. › Write access doesn’t automatically provide read access: you must grant both!

49 http://www.cs.wisc.edu/condor 49 Example Host/IP Security Settings HOSTALLOW_WRITE = *.infn.it HOSTALLOW_ADMINISTRATOR = infn-corsi1*, \ $(CONDOR_HOST), axpb07.bo.infn.it, \ $(FULL_HOSTNAME) HOSTDENY_ADMINISTRATOR = infn-corsi15 HOSTDENY_READ = *.gov, *.mil HOSTDENY_ADMINISTRATOR_NEGOTIATOR = *

50 http://www.cs.wisc.edu/condor 50 New Security Features in v6.3 › AUTHENTICATION_METHODS  Kerberos, GSI (X.509 certs), FS, NTSSPI › Strong Encryption › Demo/BoF in 3397

51 http://www.cs.wisc.edu/condor 51 Considerations for Installing a Condor Pool › What machine should be your central manager? › Does your pool have a shared file system? › Where should you install your Condor binaries and configuration files? › Where should you put the local directories for each machine? › Will you start the daemons as root or as some other user?

52 http://www.cs.wisc.edu/condor 52 What machine should be your central manager? › The central manager (CM) is very important for the proper functioning of your pool › You want a machine that will be online all the time, or will be rebooted quickly if there is a problem › If the CM crashes, jobs that are currently matched will continue to run, but new jobs will not be matched › A good network connection helps

53 http://www.cs.wisc.edu/condor 53 Does your pool have a shared file system? › A shared file system is essential in v6.2 if you wish to run “vanilla” jobs  In v6.3, it is not essential, but helpful › It can also make administration of a large pool easier › NFS works better with Condor than AFS, since Condor does not manage AFS tokens (yet), though either one will work

54 http://www.cs.wisc.edu/condor 54 Where should you install your binaries and configuration files? › Putting the config files on a shared file system makes administration much easier › Putting the binaries on a shared file system makes installing a new version easier, but it can be less stable (since problems with the network can cause daemons to crash) › condor_master on the local disk is a good compromise

55 http://www.cs.wisc.edu/condor 55 Where should you put the local directories for each machine? › You need a fair amount of disk space in the spool directory for each condor_schedd (to hold the job queue and the binaries for each job submitted). › The execute directory is used by the condor_starter to hold the binary for any Condor job running on a machine › The log directory is used by all daemons… more space = more saved info

56 http://www.cs.wisc.edu/condor 56 Will you start the daemons as root or some other user? › If you have root access, we recommend you start the daemons as root  More secure  Less confusion for users › If you don’t have root access, Condor will still work, users just have to take some extra steps to submit jobs › Can have “personal Condor” installed - only you can submit jobs

57 http://www.cs.wisc.edu/condor 57 Basic Installation Procedure › 1) Decide what version and parts of Condor to install and download them › 2) Install the “release directory” - all the Condor binaries and libraries › 3) Setup the Central Manager › 4) (optional) Setup Condor on any other machines you wish to add to the pool › 5) Spawn the Condor daemons

58 http://www.cs.wisc.edu/condor 58 The Different Versions of Condor › We distribute two versions of Condor:  Stable Series Heavily tested, recommended for use 2nd number of version string is even (6.0.3)  Development Series Latest features, not necessarily well-tested 2nd number of version string is odd (6.1.8) Not recommended unless you know what you are doing and/or need a new feature

59 http://www.cs.wisc.edu/condor 59 Condor Versions (cont’d) › All daemons advertise a CondorVersion attribute in the ClassAd they publish › You can also view the version string by running ident on any Condor binary › All parts of Condor on a single machine should run the same version! › Machines in a pool can usually run different versions and communicate with each other › It will be made very clear when a version is incompatible with older versions

60 http://www.cs.wisc.edu/condor 60 Downloading Condor › Go to http://www.cs.wisc.edu/condor/ › Fill out the form and download the different pieces you need › Normally, you want the full stable release › There are also “contrib” modules for non- standard parts of Condor, or individual pieces of the development release that you might need (e.g. SMP support) › Distributed as compressed “tar” files › Once you download, unpack them

61 http://www.cs.wisc.edu/condor 61 Install the Release Directory › In the directory where you unpacked the tar file, you’ll find a release.tar file with all the binaries and libraries › condor_install will install this as the release directory for you › In a pool with a shared release directory, you should run condor_install somewhere with write access to the shared directory › You need a separate release directory for each platform!

62 http://www.cs.wisc.edu/condor 62 Setup the Central Manager › You must configure Condor specially on your central manager, so that it knows it needs to spawn the additional daemons › Easiest way to do this is by using condor_install › There’s a special option for setting up a central manager

63 http://www.cs.wisc.edu/condor 63 Setup any other machines you wish to add to the pool › If you have a shared file system, once you run condor_install on your file server (and again on your central manager if it’s a separate machine) you can just run condor_init on any other machine you wish to add to your pool › Without a shared file system, you must run condor_install on each host

64 http://www.cs.wisc.edu/condor 64 Spawn the Condor daemons › Once Condor is configured and setup, you just have to spawn the condor_master on each host to “start” Condor › You should startup Condor on the Central Manager first › The user you spawn the condor_master as makes a big difference: root vs. “condor” vs. another user

65 http://www.cs.wisc.edu/condor 65 Having a shared release directory is key › Keep all of your config files in one place  Allows you to have a real global config file, with common values across the whole pool  Much easier to make changes (even for “local” config files in one shared directory) › Keep all of your binaries in one place  Prevents having different versions accidentally left on different machines  Easier to upgrade

66 http://www.cs.wisc.edu/condor 66 Thank you! Check us out on the Web: http://www.cs.wisc.edu/condor Email: condor-admin@cs.wisc.edu

67 http://www.cs.wisc.edu/condor 67 The rest of the slides › The rest of the slides are in no particular order, and may or may not have been used during the actual presentation – so if you’re looking at these months after this presentation, it was more organized!

68 http://www.cs.wisc.edu/condor 68 Administering a Real Pool › Having a shared release directory is key › Viewing things with condor_status › Viewing things with condor_q

69 http://www.cs.wisc.edu/condor 69 Viewing things with condor_status › condor_status has lots of different options to display various kinds of info › Supports “-constraint” so you can only view ClassAds that match an expression you specify › Supports “-format” so you can get the data in whatever form you want (very useful for writing scripts) › View any kind of daemon ClassAd

70 http://www.cs.wisc.edu/condor 70 Viewing things with condor_q › View the job queue › The “-long” option is useful to see the entire ClassAd for a given job › Also supports the “-constraint” option › Can view job queues on remote machines with the “-name” option

71 http://www.cs.wisc.edu/condor 71 Hands-On Exercise #3 › Please point your browser to the new instructions:  Go back to the tutorial homepage  Click on Shared Release Directory › Again, read the instructions carefully and execute any commands on a line beginning with % in your xterm › If you exited Netscape, just click on “Tutorial” from your Start menu

72 http://www.cs.wisc.edu/condor 72 Advanced Installation Options › Spawning the Condor daemons automatically at reboot › “Full installation” of condor_compile › Advertising your own attributes in the machine ClassAd › Setting up Host/IP security in Condor (which we already talked about) › Customizing the startd policy

73 http://www.cs.wisc.edu/condor 73 Spawning the Condor Daemons automatically at reboot › If you are running Condor as root, you probably want to have your boot scripts start the condor_master automatically › Provides more robust service, less manual work for the administrators › We provide a “SysV-style” init script:  /etc/examples/condor.boot › Exact details depends on your operating system platform

74 http://www.cs.wisc.edu/condor 74 Why Perform a “Full Installation” of condor_compile? › condor_compile used to re-link user jobs with the Condor libraries so they become “standard” jobs › By default, condor_compile only works with certain commands ( gcc, g++, g77, cc, CC, f77, f90, ld ) › With a “full-installation”, condor_compile will work with any command (in particular, “make”)

75 http://www.cs.wisc.edu/condor 75 How to Perform a Full Installation of condor_compile: › Move your real ld binary, the “linker”, to “ld.real”  The path to “ld” varies from platform to platform… though it’s usually “/bin/ld” › Install Condor’s “ld” script in its place › If condor_compile is used, our ld will do the Condor-specific magic › If not, our ld will just call the real ld and everything will work like normal

76 http://www.cs.wisc.edu/condor 76 Advertising Your Own Attributes in the Machine ClassAd › Add new macro(s) to the config file  This is usually done in the local config file  Can name the macros anything, so long as the names don’t conflict with existing ones › Tell the condor_startd to include these other macros in the ClassAd it sends out  Edit the STARTD_EXPRS macro to include the names of the macros you want to advertise (comma separated)

77 Condor Project Computer Sciences Department University of Wisconsin-Madison condor-admin@cs.wisc.edu http://www.cs.wisc.edu/condor Hands-On Exercise #4 Defining Your Own Attributes in the Startd Classad

78 http://www.cs.wisc.edu/condor 78 Hands-On Exercise #4 › Please point your browser to the new instructions:  Go back to the tutorial homepage  Click on Local Startd Attributes › Again, read the instructions carefully and execute any commands on a line beginning with % in your xterm › If you exited Netscape, just click on “Tutorial” from your Start menu

79 Condor Project Computer Sciences Department University of Wisconsin-Madison condor-admin@cs.wisc.edu http://www.cs.wisc.edu/condor 10 Minute Break Questions are welcome….

80 http://www.cs.wisc.edu/condor 80 Configuring the Startd Policy › Allows administrators or machine owners the power to control when and if Condor starts and stops jobs on a machine › Lots of flexibility: can base any policy expression on any attributes in the startd’s ClassAd, or the ClassAd of the currently running job › Many mechanisms available: suspending, checkpointing, hard kill, etc.

81 http://www.cs.wisc.edu/condor 81 Basic Progression a Job Can Pass Through When an Owner Returns › No owner: job is running › The owner returns: job is suspended  If the owner leaves again shortly, the job is resumed › The owner is still there: job is vacated  soft-kill... do a checkpoint if possible › The vacate is taking too long:  job is hard-killed ( kill -9 )

82 http://www.cs.wisc.edu/condor 82 Introduction to the Policy Expressions › The policy expressions control the transitions between various “states” and “activities” a machine can be in › All expressions use boolean logic › It is common to define macros for complicated terms in your expressions to make them easier to read › Often, you only need to edit these macros to customize your policy

83 http://www.cs.wisc.edu/condor 83 Machin e States PREEMPTING CLAIMED UNCLAIMED OWNER MATCHED begin

84 http://www.cs.wisc.edu/condor 84 Machin e Activiti es PREEMPTING CLAIMED UNCLAIMED OWNER MATCHED Benchmarking begin Idle Suspended Busy Idle Killing Vacating Idle

85 http://www.cs.wisc.edu/condor 85 The Policy Expressions START RANK WANT_SUSPEND SUSPEND CONTINUE PREEMPT WANT_VACATE KILL

86 http://www.cs.wisc.edu/condor 86 True Road Map of the Policy Expressions STARTSTART WANT SUSPEND SUSPENDSUSPEND VacatingVacating PREEMPTPREEMPT KILLKILL True False WANT VACATE KillingKilling False = Expression = Activity

87 http://www.cs.wisc.edu/condor 87 The START expression › The most important policy expression › This is the “requirements” expression for machines › Controls when Condor will start jobs › Can reference attributes of the job (such as its size or the user who submitted it) › A machine will only leave the Owner state if START evaluates to True (or Undefined)

88 http://www.cs.wisc.edu/condor 88 Example Start Expressions KeyboardIsIdle = (KeyboardIdle > (15 * $(MINUTE))) CPUIsIdle = (LoadAvg - CondorLoadAvg < 0.3) START : $(KeyboardIsIdle) && $(CPUIsIdle) or START : Owner == “wright” || Owner == “condor” || \ ($(KeyboardIsIdle) && $(CPUIsIdle)) or START : True

89 http://www.cs.wisc.edu/condor 89 The RANK Expressions › Both machines and jobs can “rank” what they’re looking for › If a machine is claimed, it still advertises that it’s available  Always looking for a higher-ranked job  Will preempt the current job if a better one is available. › Jobs can rank machines - in a large pool, users can prefer certain hosts

90 http://www.cs.wisc.edu/condor 90 Using Machine RANK Expressions › The expression is a floating point number  Use “+” instead of “&&”  (X == Y) evaluates to 0 or 1  Allows unlimited flexibility › Often used in large pools made up of individual groups that machines owned by one group will always run jobs submitted by the users in that group

91 http://www.cs.wisc.edu/condor 91 Example Rank Expression MachineOwner = (Owner == “wright”) Friend = (Owner == "tannenba" || \ Owner == ”ballard”) ResearchGroup = (Owner == "jbasney" || \ Owner == "raman”) Rank : Friend + ResearchGroup*10 + \ MachineOwner*20 Startd_Exprs = $(Startd_Exprs), Friend, \ MachineOwner, ResearchGroup

92 http://www.cs.wisc.edu/condor 92 Example Rank Expression Explained › First, we define different groups of people that we’re interested in (Friend, ResearchGroup and MachineOwner) › Then, we define the Rank (it’s an expression, so we need to use “:”) to give different weights each group › Finally, we add these new attributes to the list of attributes we publish so that Rank can be evaluated remotely

93 http://www.cs.wisc.edu/condor 93 WANT_SUSPEND vs. SUSPEND › WANT_SUSPEND determines if the startd should even consider entering the Suspended activity:  If WANT_SUSPEND is True, while a job is running, SUSPEND is checked, and if it evaluates to True, the job is suspended  If WANT_SUSPEND if False, SUSPEND is never evaluated, and while the job is running, PREEMPT is checked

94 http://www.cs.wisc.edu/condor 94 CONTINUE › Only evaluated while in the Suspended activity (WANT_SUSPEND must therefore be True) › If CONTINUE evaluates to True, the job is resumed and the machine goes back to the Busy activity

95 http://www.cs.wisc.edu/condor 95 PREEMPT › Specifies when a machine enters the Preempting state › Must handle two cases (and usually has two separate terms in the expression):  WANT_SUSPEND is True, and the job has been suspended longer than the owner wants  WANT_SUSPEND is False, and the owner is using the machine again

96 http://www.cs.wisc.edu/condor 96 WANT_VACATE vs. KILL › WANT_VACATE is only evaluated when PREEMPT is True and the machine is entering the Preempting state › Determines if a vacate (checkpoint) is wanted, or if the job should be immediately hard killed › KILL is only evaluated if the job is checkpointing (WANT_VACATE was True) › If True, the job is hard-killed

97 http://www.cs.wisc.edu/condor 97 Final Notes on Startd Policy › Please read the Administrator’s Manual to Condor for a complete explanation of the previous diagram  See the chapter on “Configuring the Startd Policy” › This is all pretty confusing and complex:  If you have questions, please send them to condor-admin@cs.wisc.edu  We can try to translate an English explanation of the policy you want into expressions for Condor

98 http://www.cs.wisc.edu/condor 98 When something goes wrong... › Looking at “condor_q -analyze” › Looking at the “UserLog” › Looking at the “ShadowLog” › Looking at the other daemon’s log files › Condor is a large, distributed system, so analyzing problems can be very difficult:  We’ll give you the basics of where to begin  If you can’t figure it out, send us email and we’ll be able to help you

99 http://www.cs.wisc.edu/condor 99 Looking at condor_q - analyze › You specify a job or set of jobs you want to analyze › condor_q will try to figure out why the job isn’t running › The output is not as user-friendly as we’d like (though we’re working on it) › Good at finding errors in Requirements expressions set by users

100 http://www.cs.wisc.edu/condor 100 Looking at the UserLog › When the user submits a job, she/he can specify a “UserLog” in their submit file › This will contain a record of if and where the job ran, if it checkpointed, if it was kicked off without a checkpoint, etc. › Very useful in figuring out where a job was running when it was having problems, and to monitor the progress of the job › Required by DAGMan and others

101 http://www.cs.wisc.edu/condor 101 Looking at the ShadowLog › Of the log files generated by the Condor daemons, the ShadowLog usually has the most useful information when debugging a problem with a job › You often want to increase the “Debug Level” of the Shadow and increase the maximum size of the file to get more info: SHADOW_DEBUG = D_SYSCALLS D_FULLDEBUG MAX_SHADOW_LOG = 1000000

102 http://www.cs.wisc.edu/condor 102 Analyzing the ShadowLog › Incorrect file permissions or files that were removed are the most common errors › Often useful to grep for a certain job ID  grep “25\.3” ShadowLog | less › At the end of the log, you might find an entry that looks something like “ERROR:”  While not always the most clear, these entries usually give a very good indication of the problem

103 http://www.cs.wisc.edu/condor 103 Looking at the Other Daemon’s Log Files › If there is no ShadowLog, or no ShadowLog entries for the job with problems, you might have a problem even finding a match for the job › Look in the SchedLog to see if there are errors communicating with the Negotiator › Check for host permission problems › Look at the NegotiatorLog on the CM: is it even negotiating jobs at all

104 http://www.cs.wisc.edu/condor 104 Analyzing the Logs › All daemons can display more debugging:  D_FULLDEBUG and D_COMMAND › Can also get timestamps in the logs that include seconds, which can help pinpoint a problem w/ D_SECONDS › Logs will often rotate quickly with heavy debugging output, so increase MAX_*_LOG as much as your disk space allows › Unfortunately, Condor’s logs are still primarily useful only to the developers › We’re working on changing that

105 http://www.cs.wisc.edu/condor 105 Thank you! Check us out on the Web: http://www.cs.wisc.edu/condor Email: condor-admin@cs.wisc.edu


Download ppt "Condor Project Computer Sciences Department University of Wisconsin-Madison Condor Administration."

Similar presentations


Ads by Google