progetti:htcondor-tf:htcondor-ce
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
progetti:htcondor-tf:htcondor-ce [2020/12/02 11:12] – dalpra@infn.it | progetti:htcondor-tf:htcondor-ce [2021/01/11 16:57] (current) – dalpra@infn.it | ||
---|---|---|---|
Line 1: | Line 1: | ||
+ | ==== HTCondor-CE - manual setup ==== | ||
+ | |||
+ | === Prerequisites | ||
+ | |||
+ | The HTCondor-CE (htc-ce) must be installed on a HTCondor Submit Node (schedd), that is a machine where a SCHEDD daemon runs: | ||
+ | < | ||
+ | MASTER, SCHEDD | ||
+ | </ | ||
+ | The schedd shoud be already tested, a local user shoud be able to submit jobs to the HTCondor slaves (WNs). | ||
+ | |||
+ | Furthermore: | ||
+ | |||
+ | * The htc-ce must hold a valid X509 grid server certificate (IGTF) | ||
+ | * The htc-ce must have a public IP and be reachable from everywhere to the TCP port 9619. | ||
+ | * The htc-ce relies on Argus for authorization, | ||
+ | |||
+ | Suggestion: if you manage an HTCondor cluster, it’s a best-practice to set in all the machines (control manager, schedd, WNs, CE,…) the same uid and gid for the condor user. | ||
+ | |||
+ | == Common HTCondor rpm installation (valid not only for the condor-ce) == | ||
+ | The repo for the latest stable release (3.2.3 as of writing) is [[https:// | ||
+ | < | ||
+ | [root@htc-ce ~]# wget http:// | ||
+ | [root@htc-ce ~]# cd /root | ||
+ | [root@htc-ce ~]# wget http:// | ||
+ | [root@htc-ce ~]# rpm --import RPM-GPG-KEY-HTCondor</ | ||
+ | |||
+ | Suggestion: in the slaves (WNs) it’s better to create and set the working dir for HTCondor jobs; the configuration proposed in the following lines reflect this. | ||
+ | < | ||
+ | [root@htc-ce ~]# chown -R condor: | ||
+ | [root@htc-ce ~]# chmod 755 / | ||
+ | |||
+ | This configuration isn't the default for HTCondor. In the WNs configuration change accordingly the EXECUTE variable value in this way\\ | ||
+ | EXECUTE = / | ||
+ | |||
+ | This follow the strategy you may already have implemented with old CE to the placement of the user’s home and the exchange of input and output sandbox on a separate device from the one of the operating system. | ||
+ | |||
+ | === HTCondor-CE setup === | ||
+ | |||
+ | == Certificate configuration == | ||
+ | < | ||
+ | [root@htc-ce ~]# cd / | ||
+ | [root@htc-ce ~]# ll | ||
+ | -rw-r--r-- 1 root root 2366 Aug 12 14:40 hostcert.pem | ||
+ | -rw----- 1 root root 1675 Aug 12 14:40 hostkey.pem</ | ||
+ | |||
+ | Install grid CA certificates and VO data into / | ||
+ | it needs the EGI-trustanchors.repo [[http:// | ||
+ | < | ||
+ | Copy the "VO data" / | ||
+ | < | ||
+ | |||
+ | == Rpms installation == | ||
+ | * Needed RPMs are: | ||
+ | | ||
+ | < | ||
+ | Check the status of the service and eventually enable it | ||
+ | < | ||
+ | at the end of the configuration remember to start the condor-ce | ||
+ | < | ||
+ | Run the following command to update the CRLs the first time, it will take a while (several minutes) to complete so you can run it in background or from another shell: | ||
+ | < | ||
+ | [root@htc-ce ~]# systemctl enable fetch-crl-cron | ||
+ | [root@htc-ce ~]# systemctl start fetch-crl-cron</ | ||
+ | |||
+ | == GSI and authorization == | ||
+ | HTCondor-CE relies on Argus for authorization. Refer to the official documentation: | ||
+ | It needs the UMD-4-updates.repo in / | ||
+ | < | ||
+ | As root create the file / | ||
+ | < | ||
+ | globus_mapping / | ||
+ | It needs a copy of the certificates that will be accessed with non-root credentials: | ||
+ | < | ||
+ | [root@htc-ce ~]# cp -a / | ||
+ | [root@htc-ce ~]# chown condor: | ||
+ | As root create the file / | ||
+ | < | ||
+ | pep_ssl_server_capath / | ||
+ | pep_ssl_client_cert / | ||
+ | pep_ssl_client_key / | ||
+ | pep_url https:// | ||
+ | pep_timeout 30 # seconds | ||
+ | xacml_resourceid http://< | ||
+ | |||
+ | == HTCondor-CE registration in the Argus server == | ||
+ | The HTCondor-CE has to be registered in the Argus server.\\ | ||
+ | In the Argus server, as root, execute:\\ | ||
+ | < | ||
+ | [root@argus ~]# cp policies.txt policies-htcceAdd.txt</ | ||
+ | |||
+ | Add the new resource to the service (here an example, modify it as needed): | ||
+ | < | ||
+ | |||
+ | | ||
+ | | ||
+ | } | ||
+ | |||
+ | | ||
+ | rule permit { vo=" | ||
+ | rule permit { vo=" | ||
+ | rule permit { vo=" | ||
+ | rule permit { vo=" | ||
+ | rule permit { vo=" | ||
+ | rule permit { vo=" | ||
+ | rule permit { vo=" | ||
+ | } | ||
+ | | ||
+ | | ||
+ | Reset old policies and import new one: | ||
+ | < | ||
+ | [root@argus ~]# pap-admin lp ## list policies </ | ||
+ | |||
+ | You can consider installing the Argus service on the HTCondor-CE host itself. This would probably ease early setup.\\ | ||
+ | Be aware that Argus need read/write access to the / | ||
+ | |||
+ | == Argus client installation == | ||
+ | Install an Argus pep client on your HTCondor-CE | ||
+ | < | ||
+ | |||
+ | == Verify Argus service registration == | ||
+ | To verify that your Argus service is properly configured to work with your htc-ce you have to: | ||
+ | * Create a valid proxy of a supported VO i.e.: < | ||
+ | * Copy the proxy on the root dir of your htc-ce as '' | ||
+ | * Execute the following example command (adapt to your case) | ||
+ | < | ||
+ | |||
+ | On a working setup you should see an output like: | ||
+ | |||
+ | < | ||
+ | Decision: Permit | ||
+ | Obligation: http:// | ||
+ | Username: cms195 | ||
+ | Group: cms | ||
+ | Secondary Groups: cms</ | ||
+ | |||
+ | As a further check (i.e. Argus service) you should see that the empty file | ||
+ | ''/ | ||
+ | |||
+ | < | ||
+ | 383663 -rw-r--r-- 2 root root 0 26 giu 2019 / | ||
+ | [root@argus ~]# ls -li / | ||
+ | | ||
+ | | ||
+ | |||
+ | == HTCondor-CE mapfile == | ||
+ | //An entry has to be ADDED to the condor_mapfile to match the certificate DN for the hosts at your site. | ||
+ | These are mapped to the value defined by UID_DOMAIN (i.e. " | ||
+ | |||
+ | < | ||
+ | GSI " | ||
+ | GSI (.*) GSS_ASSIST_GRIDMAP | ||
+ | GSI " | ||
+ | CLAIMTOBE .* anonymous@claimtobe | ||
+ | FS (.*) \1 (default) | ||
+ | </ | ||
+ | Note on the first line the regular expression to match a set of Site certificates, | ||
+ | The GSI (.*) GSS_ASSIST_GRIDMAP line is the magic that exploit the external argus auth/authZ: | ||
+ | do not modify all the other default lines.\\ | ||
+ | Warning: the host that is installing as HTCondor-CE is also a HTCondor Submit Node. For this reason in both the condor configuration files the value of UID_DOMAIN has to be the same. | ||
+ | |||
+ | == HTCondor-CE config files == | ||
+ | The default configuration path is / | ||
+ | |||
+ | condor_ce_config_val usage examples: | ||
+ | * find where and how is defined an identifier (Knob) whose name is exactly known: | ||
+ | < | ||
+ | HTCONDORCE_VONames = alice, atlas, cdf, cms, dteam, lhcb, virgo | ||
+ | # at: / | ||
+ | |||
+ | * see names and value for identifiers matching a part: | ||
+ | < | ||
+ | # Configuration from machine: ce03-htc.cr.cnaf.infn.it | ||
+ | # Parameters with names that match HTCONDORCE: | ||
+ | HTCONDORCE_BDII_ELECTION = LEADER | ||
+ | HTCONDORCE_BDII_LEADER = ce03-htc.cr.cnaf.infn.it | ||
+ | HTCONDORCE_CORES = 16 # cores per node | ||
+ | […] </ | ||
+ | |||
+ | Most of the predefined values already have reasonable values and there should be no reason to alter them; by individually inspecting the configuration files there are comments providing hints about what should be customized. | ||
+ | |||
+ | Worth to mention entries are : | ||
+ | < | ||
+ | DAEMON_LIST = $(DAEMON_LIST), | ||
+ | from file / | ||
+ | |||
+ | Warning: the best practice should be to edit only the file / | ||
+ | |||
+ | The following are examples based on configuration in Legnaro-Padova T2: | ||
+ | < | ||
+ | [root@t2-cce-03 ~]# cd / | ||
+ | [root@t2-cce-03 config.d]# ll | ||
+ | total 36 | ||
+ | -rw-r--r-- 1 root root 2351 Jul 1 23:48 01-ce-auth.conf | ||
+ | -rw-r--r-- 1 root root 4000 Jul 2 16:20 01-ce-router.conf | ||
+ | -rw-r--r-- 1 root root 1029 Jul 1 23:48 01-common-auth.conf | ||
+ | -rw-r--r-- 1 root root 1149 Jul 1 23:48 01-pilot-env.conf | ||
+ | -rw-r--r-- 1 root root 476 Jul 1 23:48 02-ce-condor.conf | ||
+ | -rw-r--r-- 1 root root 240 Jul 1 23:48 03-managed-fork.conf | ||
+ | -rw-r--r-- 1 root root 364 Jul 1 23:48 05-ce-health.conf | ||
+ | -rw-r--r-- 1 root root 902 Jul 1 23:48 05-ce-view.conf | ||
+ | -rw-r--r-- 1 root root 291 Jul 1 23:48 50-ce-apel.conf | ||
+ | lrwxrwxrwx 1 root root 47 Oct 14 15:28 99-z10-ce-site-security.conf -> / | ||
+ | lrwxrwxrwx 1 root root 44 Oct 14 15:28 99-z20-ce-job-routes.conf -> / | ||
+ | lrwxrwxrwx 1 root root 39 Oct 14 15:28 99-z30-ce-local.conf -> / | ||
+ | |||
+ | [root@t2-cce-03 ~]# cat / | ||
+ | DEFAULT_DOMAIN_NAME = lnl.infn.it | ||
+ | |||
+ | FRIENDLY_DAEMONS = $(FULL_HOSTNAME)@daemon.htcondor.org/ | ||
+ | USERS = *@users.htcondor.org, | ||
+ | ALLOW_DAEMON = $(FRIENDLY_DAEMONS), | ||
+ | SCHEDD.ALLOW_WRITE = $(USERS), $(FULL_HOSTNAME)@daemon.htcondor.org/ | ||
+ | COLLECTOR.ALLOW_ADVERTISE_MASTER = $(FRIENDLY_DAEMONS), | ||
+ | COLLECTOR.ALLOW_ADVERTISE_SCHEDD = $(FRIENDLY_DAEMONS), | ||
+ | COLLECTOR.ALLOW_ADVERTISE_STARTD = $(UNMAPPED_USERS), | ||
+ | SCHEDD.ALLOW_NEGOTIATOR = $(FULL_HOSTNAME)@daemon.htcondor.org/ | ||
+ | ALLOW_ADMINISTRATOR = $(FULL_HOSTNAME)@daemon.htcondor.org/ | ||
+ | |||
+ | |||
+ | [root@t2-cce-03 ~]# cat / | ||
+ | JOB_ROUTER_ENTRIES @=jre | ||
+ | [ | ||
+ | name = " | ||
+ | TargetUniverse = 5; | ||
+ | Requirements = (regexp(" | ||
+ | # | ||
+ | # | ||
+ | MaxJobs = 20; | ||
+ | MaxIdleJobs = 10; | ||
+ | ] | ||
+ | [ | ||
+ | name = " | ||
+ | TargetUniverse = 5; | ||
+ | Requirements = (regexp(" | ||
+ | # | ||
+ | set_requirements = (TARGET.t2_wn_cms =?= true); | ||
+ | MaxJobs = 1000; | ||
+ | MaxIdleJobs = 500; | ||
+ | ] | ||
+ | @jre | ||
+ | |||
+ | [root@t2-cce-03 ~]# cat / | ||
+ | # ALL_DEBUG = D_FULLDEBUG D_CAT | ||
+ | # ALL_DEBUG = D_FULLDEBUG D_CAT D_SECURITY | ||
+ | # MASTER_DEBUG = D_ALWAYS:2 D_CAT | ||
+ | # SCHEDD_DEBUG = D_ALWAYS:2 D_CAT | ||
+ | # GSS_ASSIST_GRIDMAP_CACHE_EXPIRATION = 0 | ||
+ | |||
+ | # NETWORK_HOSTNAME = ce01-htc.cr.cnaf.infn.it | ||
+ | # NETWORK_INTERFACE = 131.154.193.64 | ||
+ | |||
+ | # emable ceview app | ||
+ | DAEMON_LIST = $(DAEMON_LIST), | ||
+ | |||
+ | UID_DOMAIN = t2-lp | ||
+ | |||
+ | # t2-ccm-03.lnl.infn.it is the Central Manager | ||
+ | JOB_ROUTER_SCHEDD2_POOL = t2-ccm-03.lnl.infn.it: | ||
+ | START_LOCAL_UNIVERSE = False | ||
+ | START_SCHEDULER_UNIVERSE = $(START_LOCAL_UNIVERSE) | ||
+ | SUBMIT_EXPRS = getenv | ||
+ | DELEGATE_JOB_GSI_CREDENTIALS_LIFETIME = 0 | ||
+ | MERGE_JOB_ROUTER_DEFAULT_ADS = True | ||
+ | JOB_ROUTER_DEFAULTS = $(JOB_ROUTER_DEFAULTS_GENERATED) [set_Periodic_Hold = (NumJobStarts >= 1 && JobStatus == 1) || NumJobStarts > 1;] | ||
+ | |||
+ | HTCONDORCE_SPEC = [ specfp2000 = 3326; hep_spec06 = 11.088; specint2000 = 2772 ] | ||
+ | </ | ||
+ | The files before " | ||
+ | |||
+ | The UID_DOMAIN is the same you chosen on the condor batch system side. It’s suggested to not set it as a network domain name as to distinguish objects on the logs.\\ | ||
+ | \\ | ||
+ | The job router config is a very basic example!\\ | ||
+ | The '' | ||
+ | '' | ||
+ | |||
+ | == BDI configuration in the HTCondor batch system == | ||
+ | |||
+ | The rpm creates two configuration files and python script: | ||
+ | < | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | |||
+ | Warning: the path is under ''/ | ||
+ | |||
+ | In the / | ||
+ | Here the example related to Legnaro | ||
+ | < | ||
+ | HTCONDORCE_SiteName = INFN-LNL-2 | ||
+ | HTCONDORCE_SPEC = [ specfp2000 = 2506; hep_spec06 = 10.63; specint2000 = 2656 ] | ||
+ | # CPU Benchmarks | ||
+ | HTCONDORCE_VONames = alice, cms, lhcb, dteam | ||
+ | HTCONDORCE_BDII_ELECTION = LEADER | ||
+ | HTCONDORCE_BDII_LEADER = t2-cce-02.lnl.infn.it | ||
+ | HTCONDORCE_CORES = 16 # cores per node | ||
+ | GLUE2DomainID = $(HTCONDORCE_SiteName) </ | ||
+ | |||
+ | To check that the configuration is formally fine just execute | ||
+ | < | ||
+ | a dump of the glue2 schema shoud appear on stdout. | ||
+ | |||
+ | Finally, activate the service with | ||
+ | < | ||
+ | [root@htc-ce ~]# systemctl start bdii </ | ||
+ | |||
+ | == Create grid-users in the HTCondor-CE == | ||
+ | You must define all the local users that the Argus will map on the CE and all the WNs (it is supposed that you already gridified the WNs with also the same local users) | ||
+ | Here an example based on yaim (CE side): | ||
+ | < | ||
+ | [root@htc-ce ~]# / | ||
+ | 2>&1 | tee / | ||
+ | as default this command returns “INFO: Assuming the node types: UI”. Press “y” because the config_users isn’t supported in the UI profile. | ||
+ | It’s supposed that your WNs are all “grid-ified” (meddleware, | ||
+ | |||
+ | == Start HTCondor-CE process == | ||
+ | < | ||
+ | NB: there is a bug that cause the stop of the daemon to be very slow (order of minutes): at the end the master daemon will issue a kill -9. You can do it yourself without worries. | ||
+ | |||
+ | == Testing the HTCondor-CE == | ||
+ | |||
+ | From a User Interface having the htcondor-ce-client rpm, after generating a valid proxy, the htc-ce can be tested by | ||
+ | < | ||
+ | use the –debug option to get more details. | ||
+ | |||
+ | |||
+ | === Tips and trick === | ||
+ | |||
+ | == How to change the uid and gid of an already created condor user == | ||
+ | 993 old condor uid,will be mapped to 601, 990 old condor group will be mapped to 601 | ||
+ | < | ||
+ | id condor | ||
+ | find / -xdev -uid 993 -exec ls -lnd {} \; | wc -l | ||
+ | find / -xdev -gid 990 -exec ls -lnd {} \; | wc -l | ||
+ | vim /etc/passwd | ||
+ | vim /etc/group | ||
+ | find / -xdev -uid 993 -exec chown 601 {} \; | ||
+ | find / -xdev -gid 990 -exec chgrp 601 {} \; | ||
+ | find / -xdev -uid 601 -exec ls -lnd {} \; | wc -l | ||
+ | find / -xdev -gid 601 -exec ls -lnd {} \; | wc -l | ||
+ | reboot </ | ||
+ | |||
+ | == If condor does not start correctly (config from shared FS) == | ||
+ | Sometimes, if you have the HTCondor configuration of nodes in a shared (nfs, gpfs,…) file system, it could happen the nfs client is ready even if not all mount points still completely mounted.\\ | ||
+ | The solution is to add the mount point (in the example is named “sx”) in the / | ||
+ | < | ||
+ | nfs.client.target autofs.service sx.mount </ | ||
+ | The example is referred to a mount point described in the fstab as: | ||
+ | < | ||
+ | |||
+ | == Alternative solution to Argus service (to be implemented) == | ||
+ | Assuming to use LCMAPS, the configuration of files is like the configuration of cream-ce | ||
+ | < | ||
+ | globus_mapping / | ||
+ | [root@htc-ce config.d]# cat / | ||
+ | globus_mapping liblcas_lcmaps_gt4_mapping.so lcmaps_callout </ | ||
+ | (gsi-authz.conf must end with a new line as reported in [[https:// | ||
+ | |||
+ | == / | ||
+ | If you have the Argus server installed on another host, the only files you need are: | ||
+ | < | ||
+ | -rw-r--r-- | ||
+ | -rw------- | ||
+ | -rw-r--r-- | ||
+ | -rw-r--r-- | ||
+ | -rw-r--r-- | ||
+ | -rw-r--r-- | ||
+ | -rw------- | ||
+ | drwxr-xr-x 13 root | ||
+ | |||
+ | In case you install the Argus server on the same node, or you plan to use lcas/ | ||
+ | < | ||
+ | -rw-r--r-- | ||
+ | -rw-r--r-- | ||
+ | -rw-r--r-- | ||
+ | -rw-r--r-- | ||
+ | The gridmapdir is shared among all nodes that actually map a grid user to a local user.\\ | ||
+ | The voms-grid-mapfile and voms-mapfile generally are a copy of the grid-mapfile and voms-mapfile; | ||
+ | |||
+ | == Alias for HTCondor command == | ||
+ | It’s useful to define the alias in / | ||
+ | < | ||
+ | alias cccv=' | ||
+ | |||
+ | == The restart of HTCondor startd (WNs) kills running jobs == | ||
+ | Instead of the restart of services, in order to apply a new configuration, | ||
+ | |||
+ | == gsi-pep-callout.conf (file name details) == | ||
+ | If you already have a production Argus, your defaults could be different and depends of what decided by your farming department that manage the hosts installation and configuration processes (puppet/ | ||
+ | The name of this file come from the definition file here (the version numbers could be different): | ||
+ | ''/ | ||
+ | (installed by argus-gsi-pep-callout-1.3.1-2.el7.centos.x86_64.rpm) and could be modified in:\\ | ||
+ | ''/ | ||
+ | |||