diff -Nru condor-8.4.9~dfsg.1/build/packaging/srpm/condor.spec condor-8.4.11~dfsg.1/build/packaging/srpm/condor.spec --- condor-8.4.9~dfsg.1/build/packaging/srpm/condor.spec 2016-10-04 19:38:28.000000000 +0000 +++ condor-8.4.11~dfsg.1/build/packaging/srpm/condor.spec 2017-01-25 20:10:42.000000000 +0000 @@ -397,6 +397,11 @@ Requires(postun):/sbin/service %endif +%if 0%{?rhel} >= 7 +Requires(post): policycoreutils-python +Requires(post): selinux-policy-targeted >= 3.13.1-102 +%endif + #Provides: user(condor) = 43 #Provides: group(condor) = 43 @@ -1799,6 +1804,7 @@ if [ $? = 0 ]; then restorecon -R -v /var/lock/condor setsebool -P condor_domain_can_network_connect 1 + setsebool -P daemons_enable_cluster_mode 1 semanage port -a -t condor_port_t -p tcp 12345 # the number of extraneous SELinux warnings on f17 is very high fi @@ -1806,8 +1812,15 @@ %if 0%{?rhel} >= 7 test -x /usr/sbin/selinuxenabled && /usr/sbin/selinuxenabled if [ $? = 0 ]; then - /usr/sbin/setsebool -P condor_domain_can_network_connect 1 /usr/sbin/semodule -i /usr/share/condor/htcondor.pp + /usr/sbin/setsebool -P condor_domain_can_network_connect 1 + /usr/sbin/setsebool -P daemons_enable_cluster_mode 1 + /usr/sbin/semanage permissive -a condor_collector_t + /usr/sbin/semanage permissive -a condor_master_t + /usr/sbin/semanage permissive -a condor_negotiator_t + /usr/sbin/semanage permissive -a condor_procd_t + /usr/sbin/semanage permissive -a condor_schedd_t + /usr/sbin/semanage permissive -a condor_startd_t fi %endif if [ $1 -eq 1 ] ; then @@ -1895,6 +1908,19 @@ %endif %changelog +* Mon Jan 23 2017 Tim Theisen - 8.4.11-1 +- Fixed a bug which delayed startd access to stard cron job results +- Fixed a bug in pslot preemption that could delay jobs starting +- Fixed a bug in job cleanup at job lease expiration if using glexec +- Fixed a bug in locating ganglia shared libraries on Debian and Ubuntu + +* Tue Dec 13 2016 Tim Theisen - 8.4.10-1 +- Updated SELinux profile for Enterprise Linux +- Fixed a performance problem in the schedd when RequestCpus was an expression +- Preserve permissions when transferring sub-directories of the job's sandbox +- Fixed HOLD_IF_CPUS_EXCEEDED and LIMIT_JOB_RUNTIMES metaknobs +- Fixed a bug in handling REMOVE_SIGNIFICANT_ATTRIBUTES + * Thu Sep 29 2016 Tim Theisen - 8.4.9-1 - The condor_startd removes orphaned Docker containers on restart - Job Router and HTCondor-C job job submission prompts schedd reschedule Binary files /tmp/tmp78ZZOH/BbUC9pPcSE/condor-8.4.9~dfsg.1/build/packaging/srpm/htcondor.pp and /tmp/tmp78ZZOH/YemYZRQwSO/condor-8.4.11~dfsg.1/build/packaging/srpm/htcondor.pp differ diff -Nru condor-8.4.9~dfsg.1/build/packaging/srpm/htcondor.te condor-8.4.11~dfsg.1/build/packaging/srpm/htcondor.te --- condor-8.4.9~dfsg.1/build/packaging/srpm/htcondor.te 2016-10-04 19:38:28.000000000 +0000 +++ condor-8.4.11~dfsg.1/build/packaging/srpm/htcondor.te 2017-01-25 20:10:42.000000000 +0000 @@ -1,40 +1,90 @@ +# requires package selinux-policy-devel for macros +# Build using: +# make -f /usr/share/selinux/devel/Makefile htcondor.pp -module htcondor 1.0; +module htcondor 1.1; require { - type fs_t; - type autofs_t; - type nfs_t; - type user_home_dir_t; - type user_home_t; - type user_tmp_t; - type condor_master_t; - type condor_schedd_t; - type sysctl_fs_t; - type sysctl_kernel_t; - type sysctl_net_t; - type sendmail_exec_t; - class process { setrlimit setsched }; - class dir { search getattr }; - class file { getattr open read write append ioctl execute }; - class filesystem getattr; + type autofs_t; + type condor_collector_t; + type condor_master_t; + type condor_negotiator_t; + type condor_procd_t; + type condor_schedd_t; + type condor_schedd_tmp_t; + type condor_var_lock_t; + type etc_t; + type fs_t; + type hostname_exec_t; + type nfs_t; + type sendmail_exec_t; + type sendmail_t; + type sysctl_fs_t; + type sysctl_kernel_t; + type sysctl_net_t; + type tmp_t; + type user_fonts_t; + type user_home_dir_t; + type user_home_t; + type user_tmp_t; + type var_lib_t; + type var_log_t; + + class capability { chown net_admin }; + class dir { getattr read search write }; + class fd { use }; + class fifo_file { append create getattr ioctl lock open read setattr unlink write }; + class file { append execute execute_no_trans getattr ioctl open read rename setattr unlink write }; + class filesystem getattr; + class process { setrlimit setsched sigchld transition }; + class unix_stream_socket { accept connectto getattr read setopt write }; } +#============= condor_collector_t ============== +allow condor_collector_t condor_master_t:unix_stream_socket { accept getattr read setopt write }; +allow condor_collector_t tmp_t:dir { write }; +allow condor_collector_t var_lib_t:file { getattr open read }; +allow condor_collector_t var_log_t:file { open rename setattr unlink }; + +#============= condor_negotiator_t ============== +allow condor_negotiator_t condor_master_t:unix_stream_socket { getattr setopt accept }; + #============= condor_master_t ============== +allow condor_master_t etc_t:file { write append }; +allow condor_master_t condor_var_lock_t:fifo_file { create open read unlink write }; +allow condor_master_t self:capability { chown net_admin }; +allow condor_master_t self:unix_stream_socket { connectto }; allow condor_master_t sysctl_fs_t:dir search; +allow condor_master_t sysctl_fs_t:file { getattr open read }; allow condor_master_t sysctl_kernel_t:file write; allow condor_master_t sysctl_net_t:dir search; +allow condor_master_t sysctl_net_t:file { getattr open read write }; +allow condor_master_t var_lib_t:file { getattr open read }; +allow condor_master_t var_log_t:file { open read rename setattr unlink }; + +#============= condor_procd_t ============== +allow condor_procd_t condor_var_lock_t:fifo_file { create getattr open read setattr unlink write }; +allow condor_procd_t var_log_t:file { open rename unlink }; #============= condor_schedd_t ============== +#domain_transition_pattern(condor_schedd_t, condor_schedd_tmp_t, condor_schedd_tmp_t); +domtrans_pattern(condor_schedd_t, sendmail_exec_t, sendmail_t); +allow condor_schedd_t autofs_t:dir search; +allow condor_schedd_t condor_master_t:unix_stream_socket { accept getattr read setopt write }; +allow condor_schedd_t condor_schedd_tmp_t:file { execute execute_no_trans }; +allow condor_schedd_t condor_var_lock_t:fifo_file { open read write }; allow condor_schedd_t fs_t:filesystem getattr; -allow condor_schedd_t self:process setrlimit; +allow condor_schedd_t hostname_exec_t:file { getattr }; # Based on condor-ce job payload +#allow condor_schedd_t nfs_t:dir { read }; # Based on condor-ce job payload (reading an nfs-mounted home directory) +allow condor_schedd_t nfs_t:dir { getattr read search }; +allow condor_schedd_t nfs_t:file { getattr open read write append ioctl }; +allow condor_schedd_t self:process { setrlimit setsched }; +allow condor_schedd_t sendmail_exec_t:file { getattr open read execute }; +allow condor_schedd_t user_fonts_t:dir { getattr }; allow condor_schedd_t user_home_dir_t:dir { search getattr }; allow condor_schedd_t user_home_t:dir { search getattr }; -allow condor_schedd_t user_home_t:file { getattr open read write append ioctl }; +allow condor_schedd_t user_home_t:file { getattr open read write append ioctl setattr }; allow condor_schedd_t user_tmp_t:dir getattr; -allow condor_schedd_t autofs_t:dir search; -allow condor_schedd_t nfs_t:dir { search getattr }; -allow condor_schedd_t nfs_t:file { getattr open read write append ioctl }; -allow condor_schedd_t self:process setsched; -allow condor_schedd_t sendmail_exec_t:file { getattr open read execute }; +allow condor_schedd_t var_lib_t:file { getattr open read }; +allow condor_schedd_t var_log_t:file { open rename setattr unlink }; diff -Nru condor-8.4.9~dfsg.1/CMakeLists.txt condor-8.4.11~dfsg.1/CMakeLists.txt --- condor-8.4.9~dfsg.1/CMakeLists.txt 2016-10-04 19:38:28.000000000 +0000 +++ condor-8.4.11~dfsg.1/CMakeLists.txt 2017-01-25 20:10:42.000000000 +0000 @@ -29,7 +29,7 @@ # Condor and other systems parse this number. Keep it simple: # Number.Number.Number. Do nothing else. If you need to add # more information, PRE_RELEASE is usually the right location. -set(VERSION "8.4.9") +set(VERSION "8.4.11") # Set PRE_RELEASE to either a string (i.e. "PRE-RELEASE-UWCS") or OFF # This shuld be "PRE-RELEASE-UWCS most of the time, and OFF when diff -Nru condor-8.4.9~dfsg.1/debian/changelog condor-8.4.11~dfsg.1/debian/changelog --- condor-8.4.9~dfsg.1/debian/changelog 2016-11-27 07:45:09.000000000 +0000 +++ condor-8.4.11~dfsg.1/debian/changelog 2017-01-25 15:45:20.000000000 +0000 @@ -1,3 +1,13 @@ +condor (8.4.11~dfsg.1-1) unstable; urgency=medium + + * New upstream bugfix release. + - Various bugfixes for a number of HTCondor subsystems + http://research.cs.wisc.edu/htcondor/manual/v8.4.11/10_3Stable_Release.html + * Add Tim Theisen as a maintainer. + * Remove Brian Lin as a maintainer. + + -- Tim Theisen Wed, 25 Jan 2017 09:45:20 -0600 + condor (8.4.9~dfsg.1-2) unstable; urgency=medium * Add patch to fix FTBFS due to -fPIE being default now. Thanks diff -Nru condor-8.4.9~dfsg.1/debian/control condor-8.4.11~dfsg.1/debian/control --- condor-8.4.9~dfsg.1/debian/control 2016-11-27 07:45:09.000000000 +0000 +++ condor-8.4.11~dfsg.1/debian/control 2017-01-25 15:45:20.000000000 +0000 @@ -1,7 +1,7 @@ Source: condor Maintainer: HTCondor Developers Uploaders: Michael Hanke , - Brian Lin + Tim Theisen Section: science Priority: extra Build-Depends: autotools-dev, @@ -51,6 +51,7 @@ debconf | debconf-2.0, libdate-manip-perl, python, + lsb-base (>= 3.0-6), libclassad7 (= ${binary:Version}), ${misc:Depends}, ${perl:Depends}, diff -Nru condor-8.4.9~dfsg.1/debian/patches/fix-PIE.patch condor-8.4.11~dfsg.1/debian/patches/fix-PIE.patch --- condor-8.4.9~dfsg.1/debian/patches/fix-PIE.patch 2016-11-04 11:34:28.000000000 +0000 +++ condor-8.4.11~dfsg.1/debian/patches/fix-PIE.patch 1970-01-01 00:00:00.000000000 +0000 @@ -1,22 +0,0 @@ -Description: Fix the PIE build - -fno-PIC also disables PIE, which is now the default in Debian. - . - Linking PIE binaries fails when there are objects compiled without PIE. - . - Add -fPIE after passing -fno-PIC. -Author: Adrian Bunk -Bug-Debian: https://bugs.debian.org/837402 - ---- condor-8.4.9~dfsg.1.orig/src/condor_sysapi/CMakeLists.txt -+++ condor-8.4.9~dfsg.1/src/condor_sysapi/CMakeLists.txt -@@ -35,8 +35,8 @@ condor_exe(condor_kflops "kflops_main.cp - - if (NOT WINDOWS) - # compiling everything with -fPIC is needed to dynamically load libraries, but it messes up the benchmarks so turn it back off here -- set_property(SOURCE clinpack.cpp APPEND_STRING PROPERTY COMPILE_FLAGS " -fno-PIC") -- set_property(SOURCE dhry21a.cpp APPEND_STRING PROPERTY COMPILE_FLAGS " -fno-PIC") -+ set_property(SOURCE clinpack.cpp APPEND_STRING PROPERTY COMPILE_FLAGS " -fno-PIC -fPIE") -+ set_property(SOURCE dhry21a.cpp APPEND_STRING PROPERTY COMPILE_FLAGS " -fno-PIC -fPIE") - endif (NOT WINDOWS) - - condor_exe(condor_mips "mips_main.cpp;dhry21a.cpp;../condor_utils/utc_time.cpp" ${C_LIBEXEC} "" OFF) diff -Nru condor-8.4.9~dfsg.1/debian/patches/openssl_1.1.patch condor-8.4.11~dfsg.1/debian/patches/openssl_1.1.patch --- condor-8.4.9~dfsg.1/debian/patches/openssl_1.1.patch 2016-11-27 07:44:12.000000000 +0000 +++ condor-8.4.11~dfsg.1/debian/patches/openssl_1.1.patch 1970-01-01 00:00:00.000000000 +0000 @@ -1,471 +0,0 @@ -diff --git a/src/condor_includes/condor_crypt_3des.h b/src/condor_includes/condor_crypt_3des.h -index e2967d8..dc29b6a 100644 ---- a/src/condor_includes/condor_crypt_3des.h -+++ b/src/condor_includes/condor_crypt_3des.h -@@ -61,7 +61,7 @@ class Condor_Crypt_3des : public Condor_Crypt_Base { - //------------------------------------------ - // Private constructor - //------------------------------------------ -- des_key_schedule keySchedule1_, keySchedule2_, keySchedule3_; -+ DES_key_schedule keySchedule1_, keySchedule2_, keySchedule3_; - unsigned char ivec_[8]; - int num_; - }; -diff --git a/src/condor_io/condor_auth_ssl.cpp b/src/condor_io/condor_auth_ssl.cpp -index b8bb6cf..3c366b3 100644 ---- a/src/condor_io/condor_auth_ssl.cpp -+++ b/src/condor_io/condor_auth_ssl.cpp -@@ -36,7 +36,9 @@ - #endif - - // Symbols from libssl -+#if OPENSSL_VERSION_NUMBER < 0x10100000L - static long (*SSL_CTX_ctrl_ptr)(SSL_CTX *, int, long, void *) = NULL; -+#endif - static void (*SSL_CTX_free_ptr)(SSL_CTX *) = NULL; - static int (*SSL_CTX_load_verify_locations_ptr)(SSL_CTX *, const char *, const char *) = NULL; - #if OPENSSL_VERSION_NUMBER < 0x10000000L -@@ -55,8 +57,12 @@ static void (*SSL_free_ptr)(SSL *) = NULL; - static int (*SSL_get_error_ptr)(const SSL *, int) = NULL; - static X509 *(*SSL_get_peer_certificate_ptr)(const SSL *) = NULL; - static long (*SSL_get_verify_result_ptr)(const SSL *) = NULL; -+#if OPENSSL_VERSION_NUMBER < 0x10100000L - static int (*SSL_library_init_ptr)() = NULL; - static void (*SSL_load_error_strings_ptr)() = NULL; -+#else -+static int (*OPENSSL_init_ssl_ptr)(uint64_t, const OPENSSL_INIT_SETTINGS *) = NULL; -+#endif - static SSL *(*SSL_new_ptr)(SSL_CTX *) = NULL; - static int (*SSL_read_ptr)(SSL *, void *, int) = NULL; - static void (*SSL_set_bio_ptr)(SSL *, BIO *, BIO *) = NULL; -@@ -79,7 +85,11 @@ Condor_Auth_SSL :: Condor_Auth_SSL(ReliSock * sock, int /* remote */) - - Condor_Auth_SSL :: ~Condor_Auth_SSL() - { -+#if OPENSSL_VERSION_NUMBER < 0x10000000L - ERR_remove_state( 0 ); -+#elif OPENSSL_VERSION_NUMBER < 0x10100000L -+ ERR_remove_thread_state( 0 ); -+#endif - if(m_crypto) delete(m_crypto); - } - -@@ -96,7 +106,9 @@ bool Condor_Auth_SSL::Initialize() - - if ( Condor_Auth_Kerberos::Initialize() == false || - (dl_hdl = dlopen(LIBSSL_SO, RTLD_LAZY)) == NULL || -+#if OPENSSL_VERSION_NUMBER < 0x10100000L - !(SSL_CTX_ctrl_ptr = (long (*)(SSL_CTX *, int, long, void *))dlsym(dl_hdl, "SSL_CTX_ctrl")) || -+#endif - !(SSL_CTX_free_ptr = (void (*)(SSL_CTX *))dlsym(dl_hdl, "SSL_CTX_free")) || - !(SSL_CTX_load_verify_locations_ptr = (int (*)(SSL_CTX *, const char *, const char *))dlsym(dl_hdl, "SSL_CTX_load_verify_locations")) || - #if OPENSSL_VERSION_NUMBER < 0x10000000L -@@ -115,8 +127,12 @@ bool Condor_Auth_SSL::Initialize() - !(SSL_get_error_ptr = (int (*)(const SSL *, int))dlsym(dl_hdl, "SSL_get_error")) || - !(SSL_get_peer_certificate_ptr = (X509 *(*)(const SSL *))dlsym(dl_hdl, "SSL_get_peer_certificate")) || - !(SSL_get_verify_result_ptr = (long (*)(const SSL *))dlsym(dl_hdl, "SSL_get_verify_result")) || -+#if OPENSSL_VERSION_NUMBER < 0x10100000L - !(SSL_library_init_ptr = (int (*)())dlsym(dl_hdl, "SSL_library_init")) || - !(SSL_load_error_strings_ptr = (void (*)())dlsym(dl_hdl, "SSL_load_error_strings")) || -+#else -+ !(OPENSSL_init_ssl_ptr = (int (*)(uint64_t, const OPENSSL_INIT_SETTINGS *))dlsym(dl_hdl, "OPENSSL_init_ssl")) || -+#endif - !(SSL_new_ptr = (SSL *(*)(SSL_CTX *))dlsym(dl_hdl, "SSL_new")) || - !(SSL_read_ptr = (int (*)(SSL *, void *, int))dlsym(dl_hdl, "SSL_read")) || - !(SSL_set_bio_ptr = (void (*)(SSL *, BIO *, BIO *))dlsym(dl_hdl, "SSL_set_bio")) || -@@ -141,7 +157,9 @@ bool Condor_Auth_SSL::Initialize() - m_initSuccess = true; - } - #else -+#if OPENSSL_VERSION_NUMBER < 0x10100000L - SSL_CTX_ctrl_ptr = SSL_CTX_ctrl; -+#endif - SSL_CTX_free_ptr = SSL_CTX_free; - SSL_CTX_load_verify_locations_ptr = SSL_CTX_load_verify_locations; - SSL_CTX_new_ptr = SSL_CTX_new; -@@ -156,8 +174,12 @@ bool Condor_Auth_SSL::Initialize() - SSL_get_error_ptr = SSL_get_error; - SSL_get_peer_certificate_ptr = SSL_get_peer_certificate; - SSL_get_verify_result_ptr = SSL_get_verify_result; -+#if OPENSSL_VERSION_NUMBER < 0x10100000L - SSL_library_init_ptr = SSL_library_init; - SSL_load_error_strings_ptr = SSL_load_error_strings; -+#else -+ OPENSSL_init_ssl_ptr = OPENSSL_init_ssl; -+#endif - SSL_new_ptr = SSL_new; - SSL_read_ptr = SSL_read; - SSL_set_bio_ptr = SSL_set_bio; -@@ -747,10 +769,17 @@ Condor_Auth_SSL::unwrap(char * input, - - int Condor_Auth_SSL :: init_OpenSSL(void) - { -+#if OPENSSL_VERSION_NUMBER < 0x10100000L - if (!(*SSL_library_init_ptr)()) { - return AUTH_SSL_ERROR; - } - (*SSL_load_error_strings_ptr)(); -+#else -+ if (!(*OPENSSL_init_ssl_ptr)(OPENSSL_INIT_LOAD_SSL_STRINGS \ -+ | OPENSSL_INIT_LOAD_CRYPTO_STRINGS, NULL)) { -+ return AUTH_SSL_ERROR; -+ } -+#endif - // seed_pnrg(); TODO: - return AUTH_SSL_A_OK; - } -@@ -1125,9 +1154,11 @@ SSL_CTX *Condor_Auth_SSL :: setup_ssl_ctx( bool is_server ) - goto setup_server_ctx_err; - } - -+#if OPENSSL_VERSION_NUMBER < 0x10100000L - // disable SSLv2. it has vulnerabilities. - //SSL_CTX_set_options( ctx, SSL_OP_NO_SSLv2 ); - (*SSL_CTX_ctrl_ptr)( ctx, SSL_CTRL_OPTIONS, SSL_OP_NO_SSLv2, NULL ); -+#endif - - if( (*SSL_CTX_load_verify_locations_ptr)( ctx, cafile, cadir ) != 1 ) { - ouch( "Error loading CA file and/or directory\n" ); -@@ -1147,8 +1178,10 @@ SSL_CTX *Condor_Auth_SSL :: setup_ssl_ctx( bool is_server ) - // TODO where's this? - (*SSL_CTX_set_verify_ptr)( ctx, SSL_VERIFY_PEER, verify_callback ); - (*SSL_CTX_set_verify_depth_ptr)( ctx, 4 ); // TODO arbitrary? -+#if OPENSSL_VERSION_NUMBER < 0x10100000L - //SSL_CTX_set_options( ctx, SSL_OP_ALL|SSL_OP_NO_SSLv2 ); - (*SSL_CTX_ctrl_ptr)( ctx, SSL_CTRL_OPTIONS, SSL_OP_ALL|SSL_OP_NO_SSLv2, NULL ); -+#endif - if((*SSL_CTX_set_cipher_list_ptr)( ctx, cipherlist ) != 1 ) { - ouch( "Error setting cipher list (no valid ciphers)\n" ); - goto setup_server_ctx_err; -diff --git a/src/condor_io/condor_crypt_3des.cpp b/src/condor_io/condor_crypt_3des.cpp -index 2537e2f..5c8b4e7 100644 ---- a/src/condor_io/condor_crypt_3des.cpp -+++ b/src/condor_io/condor_crypt_3des.cpp -@@ -35,9 +35,9 @@ Condor_Crypt_3des :: Condor_Crypt_3des(const KeyInfo& key) - unsigned char * keyData = k.getPaddedKeyData(24); - ASSERT(keyData); - -- des_set_key((des_cblock *) keyData , keySchedule1_); -- des_set_key((des_cblock *) (keyData+8) , keySchedule2_); -- des_set_key((des_cblock *) (keyData+16), keySchedule3_); -+ DES_set_key((DES_cblock *) keyData , &keySchedule1_); -+ DES_set_key((DES_cblock *) (keyData+8) , &keySchedule2_); -+ DES_set_key((DES_cblock *) (keyData+16), &keySchedule3_); - - // initialize ivsec - resetState(); -@@ -71,9 +71,9 @@ bool Condor_Crypt_3des :: encrypt(unsigned char * input, - output = (unsigned char *) malloc(input_len); - - if (output) { -- des_ede3_cfb64_encrypt(input, output, output_len, -- keySchedule1_, keySchedule2_, keySchedule3_, -- (des_cblock *)ivec_, &num_, DES_ENCRYPT); -+ DES_ede3_cfb64_encrypt(input, output, output_len, -+ &keySchedule1_, &keySchedule2_, &keySchedule3_, -+ (DES_cblock *)ivec_, &num_, DES_ENCRYPT); - return true; - } - else { -@@ -95,9 +95,9 @@ bool Condor_Crypt_3des :: decrypt(unsigned char * input, - if (output) { - output_len = input_len; - -- des_ede3_cfb64_encrypt(input, output, output_len, -- keySchedule1_, keySchedule2_, keySchedule3_, -- (des_cblock *)ivec_, &num_, DES_DECRYPT); -+ DES_ede3_cfb64_encrypt(input, output, output_len, -+ &keySchedule1_, &keySchedule2_, &keySchedule3_, -+ (DES_cblock *)ivec_, &num_, DES_DECRYPT); - - return true; // Should be changed - } -diff --git a/src/condor_utils/condor_dh.cpp b/src/condor_utils/condor_dh.cpp -deleted file mode 100644 -index 8450244..0000000 ---- a/src/condor_utils/condor_dh.cpp -+++ /dev/null -@@ -1,204 +0,0 @@ --/*************************************************************** -- * -- * Copyright (C) 1990-2011, Condor Team, Computer Sciences Department, -- * University of Wisconsin-Madison, WI. -- * -- * Licensed under the Apache License, Version 2.0 (the "License"); you -- * may not use this file except in compliance with the License. You may -- * obtain a copy of the License at -- * -- * http://www.apache.org/licenses/LICENSE-2.0 -- * -- * Unless required by applicable law or agreed to in writing, software -- * distributed under the License is distributed on an "AS IS" BASIS, -- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -- * See the License for the specific language governing permissions and -- * limitations under the License. -- * -- ***************************************************************/ -- -- --#include "condor_common.h" --#include "condor_dh.h" --#include "condor_debug.h" --#include "condor_config.h" -- --#if HAVE_EXT_OPENSSL -- --//#include --//#include -- --const char DH_CONFIG_FILE[] = "CONDOR_DH_CONFIG"; -- --Condor_Diffie_Hellman :: Condor_Diffie_Hellman() -- : dh_ (0), -- secret_ (0), -- keySize_(0) --{ -- initialize(); --} -- --Condor_Diffie_Hellman :: ~Condor_Diffie_Hellman() --{ -- if (dh_) { -- DH_free(dh_); -- } -- if (secret_) { -- free(secret_); -- } -- keySize_ = 0; -- --} -- --int Condor_Diffie_Hellman :: compute_shared_secret(const char * pk) --{ -- // the input pk is assumed to be an encoded string representing -- // the binary data for the remote party's public key -- y (or x) -- // the local DH knows about g and x, now, it will compute -- // (g^x)^y, or (g^y)^x -- -- BIGNUM * remote_pubKey = NULL; -- -- if (BN_hex2bn(&remote_pubKey, pk) == 0) { -- dprintf(D_ALWAYS, "Unable to obtain remote public key\n"); -- goto error; -- } -- -- if ((dh_ != NULL) && (remote_pubKey != NULL)) { -- -- secret_ = (unsigned char *) malloc(DH_size(dh_)); -- -- // Now compute -- keySize_ = DH_compute_key(secret_, remote_pubKey, dh_); -- BN_clear_free(remote_pubKey); -- -- if (keySize_ == -1) { -- dprintf(D_ALWAYS, "Unable to compute shared secret\n"); -- goto error; -- } -- } -- else { -- goto error; -- } -- return 1; -- -- error: -- if (remote_pubKey) { -- BN_clear_free(remote_pubKey); -- } -- if (secret_) { -- free(secret_); -- secret_ = NULL; -- } -- return 0; --} -- --char * Condor_Diffie_Hellman :: getPublicKeyChar() --{ -- // This will return g^x, x is the secret, encoded in HEX format -- if (dh_ && dh_->pub_key) { -- return BN_bn2hex(dh_->pub_key); -- } -- else { -- return NULL; -- } --} -- --BIGNUM * Condor_Diffie_Hellman::getPrime() --{ -- if (dh_) { -- return dh_->p; -- } -- else { -- return 0; -- } --} -- --char * Condor_Diffie_Hellman :: getPrimeChar() --{ -- if (dh_ && dh_->p) { -- return BN_bn2hex(dh_->p); -- } -- else { -- return NULL; -- } --} -- --BIGNUM * Condor_Diffie_Hellman :: getGenerator() --{ -- if (dh_) { -- return dh_->g; -- } -- else { -- return 0; -- } --} -- --char * Condor_Diffie_Hellman :: getGeneratorChar() --{ -- if (dh_ && dh_->g) { -- return BN_bn2hex(dh_->g); -- } -- else { -- return NULL; -- } --} -- --const unsigned char * Condor_Diffie_Hellman :: getSecret() const --{ -- return secret_; --} -- --int Condor_Diffie_Hellman :: getSecretSize() const --{ -- return keySize_; --} -- --int Condor_Diffie_Hellman :: initialize() --{ -- // First, check the config file to find out where is the file -- // with all the parameters -- config(); -- char * dh_config = param(DH_CONFIG_FILE); -- -- FILE * fp = 0; -- if ( dh_config ) { -- if ( (fp = safe_fopen_wrapper_follow(dh_config, "r")) == NULL) { -- dprintf(D_ALWAYS, "Unable to open condor_dh_config file %s\n", dh_config); -- goto error; -- } -- -- dh_ = PEM_read_DHparams(fp, NULL, NULL, NULL); -- if (dh_ == NULL) { -- dprintf(D_ALWAYS, "Unable to read DH structure from the configuration file.\n"); -- goto error; -- } -- -- // Now generate private key -- if (DH_generate_key(dh_) == 0) { -- dprintf(D_ALWAYS, "Unable to generate a private key \n"); -- goto error; -- } -- } -- else { -- dprintf(D_ALWAYS, "The required configuration parameter CONDOR_DH_CONFIG is not specified in the condor configuration file!\n"); -- goto error; -- } -- fclose(fp); -- free(dh_config); -- return 1; -- error: -- if (dh_) { -- DH_free(dh_); -- dh_ = 0; -- } -- if (dh_config) { -- free(dh_config); -- } -- if (fp) { -- fclose(fp); -- } -- return 0; --} -- --#endif -diff --git a/src/condor_utils/condor_dh.h b/src/condor_utils/condor_dh.h -deleted file mode 100644 -index 63ba8ed..0000000 ---- a/src/condor_utils/condor_dh.h -+++ /dev/null -@@ -1,73 +0,0 @@ --/*************************************************************** -- * -- * Copyright (C) 1990-2007, Condor Team, Computer Sciences Department, -- * University of Wisconsin-Madison, WI. -- * -- * Licensed under the Apache License, Version 2.0 (the "License"); you -- * may not use this file except in compliance with the License. You may -- * obtain a copy of the License at -- * -- * http://www.apache.org/licenses/LICENSE-2.0 -- * -- * Unless required by applicable law or agreed to in writing, software -- * distributed under the License is distributed on an "AS IS" BASIS, -- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -- * See the License for the specific language governing permissions and -- * limitations under the License. -- * -- ***************************************************************/ -- --#ifndef CONDOR_DH --#define CONDOR_DH -- --#include "condor_common.h" -- --#if HAVE_EXT_OPENSSL -- --#include --//#include -- --//---------------------------------------------------------------------- --// Diffie-Hellman key exchange, based on API provided by OpenSSL --// privately known variables: x and y -- the secret, one for each --// party --// publicly known variables: g -- the generator, p -- the prime, --// g^x -- the public key --//---------------------------------------------------------------------- -- --class Condor_Diffie_Hellman { -- -- public: -- Condor_Diffie_Hellman(); -- ~Condor_Diffie_Hellman(); -- -- char * getPublicKeyChar(); -- //------------------------------------------ -- // PURPOSE: Return public key in HEX encoded format -- // REQUIRE: None -- // RETURNS: HEX string or NULL -- //------------------------------------------ -- -- BIGNUM * getPrime(); -- BIGNUM * getGenerator(); -- // These two methods return the prime and the generator -- -- char * getPrimeChar(); -- char * getGeneratorChar(); -- // These two methods return the prime and the generator -- // in HEX encoded format if they exist. Otherwise, NULL is returned. -- -- int compute_shared_secret(const char * pk); -- const unsigned char * getSecret() const; -- int getSecretSize() const; -- -- private: -- int initialize(); -- -- DH * dh_; -- unsigned char * secret_; -- int keySize_; --}; --#endif -- --#endif diff -Nru condor-8.4.9~dfsg.1/debian/patches/series condor-8.4.11~dfsg.1/debian/patches/series --- condor-8.4.9~dfsg.1/debian/patches/series 2016-11-27 07:44:35.000000000 +0000 +++ condor-8.4.11~dfsg.1/debian/patches/series 2017-01-25 15:45:20.000000000 +0000 @@ -15,5 +15,3 @@ qsub_sentinel_robustness raspbian_detection fix_bashisms -fix-PIE.patch -openssl_1.1.patch diff -Nru condor-8.4.9~dfsg.1/debian/rules condor-8.4.11~dfsg.1/debian/rules --- condor-8.4.9~dfsg.1/debian/rules 2016-11-27 07:43:01.000000000 +0000 +++ condor-8.4.11~dfsg.1/debian/rules 2017-01-25 15:45:20.000000000 +0000 @@ -8,7 +8,7 @@ # then described this commit relative to the last release tag (V...) # If this should make any sense the local upstream branch must track upstream's # master or whatever other source branch. -gitver = $(shell [ -x /usr/bin/git ] && git describe --tags --match 'V[0-9]_[0-9]_[0-9]' $$(git merge-base -a HEAD upstream) | sed -e 's/^V//' -e 's/_/./g' -e 's/-/+git/')~dfsg.1 +gitver = $(shell [ -x /usr/bin/git ] && git describe --tags --match 'V[0-9]_[0-9]_*[0-9]' $$(git merge-base -a HEAD upstream) | sed -e 's/^V//' -e 's/_/./g' -e 's/-/+git/')~dfsg.1 # one ring to rule them all ... %: diff -Nru condor-8.4.9~dfsg.1/doc/admin-man/configure.tex condor-8.4.11~dfsg.1/doc/admin-man/configure.tex --- condor-8.4.9~dfsg.1/doc/admin-man/configure.tex 2016-10-04 19:38:28.000000000 +0000 +++ condor-8.4.11~dfsg.1/doc/admin-man/configure.tex 2017-01-25 20:10:42.000000000 +0000 @@ -773,9 +773,12 @@ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \index{configuration change requiring a restart of HTCondor} When any of the following listed configuration variables are changed, -HTCondor must be restarted. -Reconfiguration using \Condor{reconfig} will not be enough. +HTCondor must be restarted; +reconfiguration using \Condor{reconfig} will not be enough +to cause the new values to take effect. +% It would be nice to have a note here (maybe just in a comment) as +% to what version this list is correct for... \begin{itemize} \item \verb@BIND_ALL_INTERFACES@ \item \verb@FetchWorkDelay@ diff -Nru condor-8.4.9~dfsg.1/doc/admin-man/install.tex condor-8.4.11~dfsg.1/doc/admin-man/install.tex --- condor-8.4.9~dfsg.1/doc/admin-man/install.tex 2016-10-04 19:38:28.000000000 +0000 +++ condor-8.4.11~dfsg.1/doc/admin-man/install.tex 2017-01-25 20:10:42.000000000 +0000 @@ -15,37 +15,53 @@ use of HTCondor is acknowledgment that you have read and agree to the terms. +Before installing HTCondor, please consider joining the htcondor-world mailing +list. +Traffic on this list is kept to an absolute minimum; +it is only used to announce new releases of HTCondor. +To subscribe, go to +\URL{https://lists.cs.wisc.edu/mailman/listinfo/htcondor-world}, +and fill out the online form. + +You might also want to consider joining the htcondor-users mailing list. +This list is meant to be a forum for HTCondor users to learn from each +other and discuss using HTCondor. It is an excellent place to ask +the HTCondor community about using and configuring HTCondor. +To subscribe, go to +\URL{https://lists.cs.wisc.edu/mailman/listinfo/htcondor-users}, +and fill out the online form. + +\Bold{Note that forward and reverse DNS lookup must be enabled +for HTCondor to work properly.} + %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \subsection{\label{sec:pre-install-procedure} -Obtaining HTCondor} +Obtaining the HTCondor Software} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \index{installation!download} \index{Unix installation!download} \index{download} The first step to installing HTCondor is to download it from the HTCondor -web site, \URL{http://research.cs.wisc.edu/htcondor/}. +web site, \URL{http://htcondor.org/}. The downloads are available from the downloads page, -at \URL{http://research.cs.wisc.edu/htcondor/downloads/}. - -The platform-dependent HTCondor files are currently available from two sites. -The main site is at the University of Wisconsin--Madison, -Madison, Wisconsin, USA. -A second site is the Istituto Nazionale di Fisica Nucleare Sezione di -Bologna, Bologna, Italy. -Please choose the site nearest to you. +at \URL{http://htcondor.org/downloads/}. -Make note of the location of where you download the binary into. +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +\subsection{\label{sec:Unix-Install} +Installation on Unix} +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% The HTCondor binary distribution is packaged in the following files and directories: \begin{description} -\item[\File{LICENSE-2.0.TXT}] the licensing agreement. +\item[\File{LICENSE-2.0.txt}] the licensing agreement. By installing HTCondor, you agree to the contents of this file \item[\File{README}] general information \item[\File{bin}] directory which contains the distribution HTCondor user programs. +\item[\File{bosco\_install}] the Perl script used to install Bosco. \item[\File{condor\_configure}] the Perl script used to install and configure HTCondor. \item[\File{condor\_install}] the Perl script used to install HTCondor. @@ -65,20 +81,12 @@ \item[\File{src}] directory containing source for some interfaces. \end{description} -Before you install, please consider joining the htcondor-world mailing -list. -Traffic on this list is kept to an absolute minimum; -it is only used to announce new releases of HTCondor. -To subscribe, go to -\URL{https://lists.cs.wisc.edu/mailman/listinfo/htcondor-world}, -and fill out the online form. -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -\subsection{\label{sec:Preparing-to-Install}Preparation} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +\subsubsection{\label{sec:Preparing-to-Install}Preparation} -Before installation, make a few important +Before installation, you need to make a few important decisions about the basic layout of your pool. -The decisions answer the questions: +These decisions answer the following questions: \begin{enumerate} \item What machine will be the central manager? @@ -104,6 +112,9 @@ \item Do I have enough disk space for HTCondor? \end{enumerate} +% Note: I guess this is a description rather than an enumerate because +% enumerate isn't bold. Need to make sure to keep numbers correct! +% wenger 2017-01-12 \begin{description} \item[1. What machine will be the central manager?] @@ -135,6 +146,9 @@ A faster CPU will speed up matchmaking. +Generally jobs should not be either submitted or run on the central +manager machine. + \item[2. Which machines should be allowed to submit jobs?] HTCondor can restrict the machines allowed to submit jobs. Alternatively, @@ -149,15 +163,17 @@ \item[3. Will HTCondor run as root or not?] \index{installation!running as root} -Start up the HTCondor daemons as the Unix user root. +We strongly recommend that the HTCondor daemons be installed and run +as the Unix user root. Without this, HTCondor can do very little to enforce security and policy decisions. -You can install HTCondor as any user, -however there are both serious security and performance consequences. -Please see section~\ref{sec:Non-Root} on page~\pageref{sec:Non-Root} +You can install HTCondor as any user; +however there are serious security and performance consequences +do doing a non-root installation. +Please see section~\ref{sec:Non-Root} in the manual for the details and ramifications of -running HTCondor as a Unix user other than root. +installing and running HTCondor as a Unix user other than root. \item[4. Who will administer HTCondor?] @@ -171,6 +187,7 @@ % 2. to customize policies % 3. to receive e-mail +%TEMP -- I'd like to re-word this... Either root will be administering HTCondor directly, or someone else will be acting as the HTCondor administrator. If root has delegated the responsibility to another person, keep in mind that as long as @@ -191,7 +208,7 @@ directory be shared?] \index{Unix user!condor} -To simplify installation of HTCondor, +To simplify installation of HTCondor, you should create a Unix user named condor on all machines in the pool. The HTCondor daemons will create files (such as the log files) owned by this user, @@ -221,18 +238,20 @@ \Env{CONDOR\_IDS} environment variable or the \Macro{CONDOR\_IDS} config file setting which uid.gid pair should be used for the ownership of various HTCondor files. -See section~\ref{sec:uids} on UIDs in HTCondor on -page~\pageref{sec:uids} in the Administrator's Manual for details. +See section~\ref{sec:uids} on UIDs in HTCondor +in the Administrator's Manual for details. \item[6. Where should the machine-specific directories for HTCondor go?] HTCondor needs a few directories that are unique on every machine in your pool. These are +\File{execute}, \File{spool}, -\File{log}, and -\File{execute}. Generally, all -three are subdirectories of a single machine specific directory called +\File{log}, +(and possibly \File{lock}). +Generally, all +of them are subdirectories of a single machine specific directory called the local directory (specified by the \Macro{LOCAL\_DIR} macro in the configuration file). \index{owner!of directories} @@ -262,7 +281,7 @@ there must be enough space for it. (HTCondor will not send a job to a machine that does not have enough disk space to hold the initial -binary). In addition, if the remote job dumps core for some reason, +binary..) In addition, if the remote job dumps core for some reason, it is first dumped to the execute directory before it is sent back to the submit machine. So, put the execute directory on a partition with enough space to hold a possible core file from the @@ -279,7 +298,7 @@ executables or image sizes. By using a checkpoint server (see section~\ref{sec:Ckpt-Server} on Installing a Checkpoint Server on -page~\pageref{sec:Ckpt-Server} for details), +for details), you can ease the disk space requirements, since all checkpoint files are stored on the server instead of the spool directories for each machine. However, @@ -354,7 +373,7 @@ \label{sec:Config-File-Locations} \begin{description} -\item[Configuration Files] There may be more than one configuration file. +\item[Configuration Files] There can be more than one configuration file. They allow different levels of control over how HTCondor is configured on each machine in the pool. @@ -369,7 +388,7 @@ Multiple Platforms for details. \index{configuration files!location} -The location of configuration files is specified in +The location of configuration files is described in section~\ref{sec:Ordering-Config-File}. \item[Release Directory] @@ -388,7 +407,7 @@ \begin{itemize} \item User Binaries: - All of the files in the \File{bin} directory are programs the end + All of the files in the \File{bin} directory are programs that HTCondor users should expect to have in their path. You could either put them in a well known location (such as \File{/usr/local/condor/bin}) which you have HTCondor users add to @@ -438,14 +457,14 @@ HTML, Postscript and PDF (Adobe Acrobat). It can be locally installed wherever is customary at your site. You can also find the HTCondor documentation on the web at: - \URL{http://www.cs.wisc.edu/condor/manual}. + \URL{http://htcondor.org/manual}. \end{description} -\item[7. Am I using AFS?] +\item[8. Am I using AFS?] If you are using AFS at your site, be sure to read the -section~\ref{sec:HTCondor-AFS} on page~\pageref{sec:HTCondor-AFS} in the +section~\ref{sec:HTCondor-AFS} in the manual. HTCondor does not currently have a way to authenticate itself to AFS. A solution is not ready for @@ -459,12 +478,12 @@ you submit jobs to HTCondor from a directory on AFS. Again, read manual section~\ref{sec:HTCondor-AFS} for all the details. -\item[8. Do I have enough disk space for HTCondor?] +\item[9. Do I have enough disk space for HTCondor?] \index{disk space requirement!all versions} -The compressed downloads of HTCondor currently range from a low of about 12 -Mbytes for 32-bit Debian 6.0 GNU/Linux to about 94 Mbytes for Windows. The -compressed source code takes approximately 18 Mbytes. +The compressed downloads of HTCondor currently range from a low of about 13 +Mbytes for 64-bit Ubuntu 12/Linux to about 115 Mbytes for Windows. The +compressed source code takes approximately 17 Mbytes. In addition, you will need a lot of disk space in the local directory of any machines that are submitting jobs to HTCondor. See question 6 @@ -473,29 +492,182 @@ \end{description} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -\subsection{\label{sec:new-install-procedure} -Newer Unix Installation Procedure} +\subsubsection{\label{sec:install-rpms} +Unix Installation from an RPM} +\index{installation!using Red Hat RPMs} +\index{RPM installation on Red Hat} + +RPMs are available for HTCondor \VersionNotice. +We provide a Yum repository, as well as +installation and configuration in one easy step. +This RPM installation is currently available for Red Hat-compatible +systems only. +As of HTCondor version 7.5.1, +the HTCondor RPM installs into File Hierachy Standard locations. + +Yum repositories and instructions are at + \URL{http://htcondor.org/yum/} . +The repositories are named to distinguish stable releases from +development releases and by Red Hat version number. +The 4 repositories are: +\begin{itemize} + \item \File{condor-stable-rhel6.repo} + \item \File{condor-stable-rhel7.repo} + \item \File{condor-development-rhel6.repo} + \item \File{condor-development-rhel7.repo} +\end{itemize} + +Here is an ordered set of steps that get HTCondor running using the RPM. +\begin{enumerate} +\item The HTCondor package will automatically add a \Login{condor} user/group, +if it does not exist already. +Sites wishing to control the attributes of this user/group +should add the \Login{condor} user/group manually before installation. + +\item Download and install the meta-data that describes +the appropriate YUM repository. +This example is for the stable series, on RHEL 7. +\footnotesize +\begin{verbatim} + cd /etc/yum.repos.d + wget http://htcondor.org/yum/repo.d/condor-stable-rhel7.repo +\end{verbatim} +\normalsize +Note that this step need be done only once; +do not get the same repository more than once. + +\item Import signing key +The RPMs are signed in the Redhat 6 and RedHat 7 repositories. +\begin{verbatim} + wget http://htcondor.org/yum/RPM-GPG-KEY-HTCondor + rpm --import RPM-GPG-KEY-HTCondor +\end{verbatim} + +\item Install HTCondor. +\begin{verbatim} + yum install condor-all +\end{verbatim} + +\item As needed, edit the HTCondor configuration files to customize. +The configuration files are in the directory \File{/etc/condor/} . +Do \emph{not} use \Condor{configure} or \Condor{install} for configuration. +The installation will be able to find configuration files without +additional administrative intervention, +as the configuration files are placed in \File{/etc}, +and HTCondor searches this directory. + +\item Start HTCondor daemons: +\begin{verbatim} + /sbin/service condor start +\end{verbatim} + +\end{enumerate} + +% Alain thinks that upgrades DO work. +%RPM upgrade (\Opt{-u} option) does not currently +%work for HTCondor \VersionNotice. + %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +\subsubsection{\label{sec:install-debs} +Unix Installation from a Debian Package} +\index{installation!using Debian packages} +\index{Debian installation with Debian packages} -\index{installation!with \Condor{configure}} -\index{condor\_configure command} -The Perl script \Condor{configure} installs HTCondor. -Command-line arguments specify all needed information to this -script. The script can be executed multiple times, to modify or further -set the configuration. \Condor{configure} has been tested using Perl 5.003. -Use this or a more recent version of Perl. +Debian packages are available in HTCondor \VersionNotice. +We provide an APT repository, as well as +installation and configuration in one easy step. +These Debian packages of HTCondor are currently available for +Debian 7 (wheezy) and Debian 8 (jessie). +As of HTCondor version 7.5.1, +the HTCondor Debian package installs into File Hierachy Standard locations. + +The HTCondor APT repositories are specified at + \URL{http://htcondor.org/debian/} . +See this web page for repository information. + +Here is an ordered set of steps that get HTCondor running. +\begin{enumerate} +\item The HTCondor package will automatically add a \Login{condor} user/group, +if it does not exist already. +Sites wishing to control the attributes of this user/group +should add the \Login{condor} user/group manually before installation. + +\item If not already present, +set up access to the appropriate APT repository; +they are distinguished as stable or development release, +and by operating system. +Ensure that the correct one of the following release and +operating system-specific lines is in +the file \File{/etc/apt/sources.list} . +\footnotesize +\begin{verbatim} +deb http://htcondor.org/debian/stable/ wheezy contrib +deb http://htcondor.org/debian/development/ wheezy contrib +deb http://htcondor.org/debian/stable/ jessie contrib +deb http://htcondor.org/debian/development/ jessie contrib +\end{verbatim} +\normalsize +Note that this step need be done only once; +do not add the same repository more than once. + +\item Install and start HTCondor services: +\begin{verbatim} + apt-get update + apt-get install condor +\end{verbatim} + +\item As needed, edit the HTCondor configuration files to customize. +The configuration files are in the directory \File{/etc/condor/} . +Do \emph{not} use \Condor{configure} or \Condor{install} for configuration. +The installation will be able to find configuration files without +additional administrative intervention, +as the configuration files are placed in \File{/etc}, +and HTCondor searches this directory. + +Then, if any configuration changes are made, restart HTCondor with +\begin{verbatim} + /etc/init.d/condor restart +\end{verbatim} + +\end{enumerate} + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +\subsubsection{\label{sec:unix-install-from-tarball} +Unix Installation from a Tarball} + +\Bold{Note that installation from a tarball is no longer the preferred +method for installing HTCondor on Unix systems. Installation +via RPM or Debian package is recommended if available for your +Unix version.} + +An overview of the tarball-based installation process is as follows: +\begin{enumerate} +\item Untar the HTCondor software. +\item Run \Condor{install} or \Condor{configure} to install the software. +\end{enumerate} +Details are given below. + +\medskip After download, all the files are in a compressed, tar format. They need to be untarred, as \begin{verbatim} - tar xzf completename.tar.gz + tar xzf .tar.gz \end{verbatim} After untarring, the directory will have the Perl scripts -\Condor{configure} and \Condor{install}, as well as +\Condor{configure} and \Condor{install} (and \Bosco{install}), as well as \File{bin}, \File{etc}, \File{examples}, \File{include}, \File{lib}, \File{libexec}, \File{man}, \File{sbin}, \File{sql} and \File{src} subdirectories. +\index{installation!with \Condor{configure}} +\index{condor\_configure command} +The Perl script \Condor{configure} installs HTCondor. +Command-line arguments specify all needed information to this +script. The script can be executed multiple times, to modify or further +set the configuration. \Condor{configure} has been tested using Perl 5.003. +Use this or a more recent version of Perl. + \Condor{configure} and \Condor{install} are the same program, but have different default behaviors. \Condor{install} is identical to running @@ -536,7 +708,7 @@ specifies the path to the local directory. The \verb@--@\Opt{type} option to \Condor{configure} -specifies one or more of the roles that a machine may take on +specifies one or more of the roles that a machine can take on within the HTCondor pool: central manager, submit or execute. These options are given in a comma separated list. So, if a machine is both a submit and execute @@ -580,15 +752,15 @@ --local-dir=/scratch/condor --type=execute,submit \end{verbatim} -See the \Condor{configure} manual page in -section~\ref{man-condor-configure} on -page~\pageref{man-condor-configure} for details. +See the \Condor{configure} manual +page~\pageref{man-condor-configure} +for details. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -\subsection{\label{installed-now-what} +\subsubsection{\label{installed-now-what} Starting HTCondor Under Unix After Installation} -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + \index{starting HTCondor!Unix platforms} Now that HTCondor has been installed on the machine(s), there are a few @@ -599,8 +771,8 @@ lot of possible settings and you should at least take a look at the first two main sections to make sure everything looks okay. In particular, you might want to set up security for - HTCondor. See the section~\ref{sec:Config-Security} on - page~\pageref{sec:Config-Security} to learn how to do this. + HTCondor. See the section~\ref{sec:Config-Security} + to learn how to do this. \item For Linux platforms, run the \Condor{kbdd} to monitor keyboard and mouse activity on all machines within the pool that will @@ -636,11 +808,11 @@ \end{enumerate} -To start up the HTCondor daemons, execute +To start up the HTCondor daemons, execute the command \Release{sbin/condor\_master}. This is the HTCondor master, whose only job in life is to make sure the other HTCondor daemons are running. The master keeps track of the daemons, restarts them if they crash, -and periodically checks to see if you have installed new binaries (and +and periodically checks to see if you have installed new binaries (and, if so, restarts the affected daemons). If you are setting up your own pool, you should start HTCondor on your @@ -721,21 +893,18 @@ gcc, g++, g77, cc, acc, c89, CC, f77, fort77 and ld. If you complete the full install, you will be able to use \condor{compile} with any command whatsoever, in particular, make. - See section~\ref{sec:full-condor-compile} on - page~\pageref{sec:full-condor-compile} in the manual for - directions. + See section~\ref{sec:full-condor-compile} in the manual for directions. \item Try building and submitting some test jobs. See \File{examples/README} for details. \item If your site uses the AFS network file system, see -section~\ref{sec:HTCondor-AFS} on page~\pageref{sec:HTCondor-AFS} in the +section~\ref{sec:HTCondor-AFS} in the manual. \item We strongly recommend that you start up HTCondor (run the \Condor{master} daemon) as user root. If you must start HTCondor as -some user other than root, see section~\ref{sec:Non-Root} on -page~\pageref{sec:Non-Root}. +some user other than root, see section~\ref{sec:Non-Root}. \end{enumerate} @@ -744,157 +913,6 @@ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -\subsection{\label{sec:install-rpms} RPMs} -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% - -\index{installation!using Red Hat RPMs} -\index{RPM installation on Red Hat} -RPMs are available in HTCondor \VersionNotice. -We provide a Yum repository, as well as -installation and configuration in one easy step. -This RPM installation is currently available for Red Hat-compatible -systems only. -As of HTCondor version 7.5.1, -the HTCondor RPM installs into File Hierachy Standard locations. - -Yum repositories and instructions are at - \URL{http://research.cs.wisc.edu/htcondor/yum/} . -The repositories are named to distinguish stable releases from -development releases and by Red Hat version number. -The 6 repositories are: -\begin{itemize} - \item \File{condor-stable-rhel5.repo} - \item \File{condor-stable-rhel6.repo} - \item \File{condor-stable-rhel7.repo} - \item \File{condor-development-rhel5.repo} - \item \File{condor-development-rhel6.repo} - \item \File{condor-development-rhel7.repo} -\end{itemize} - -For HTCondor to work properly under RHEL5, -the Red Hat Network channel called \AdStr{RHEL Virtualization} -must be explicitly enabled. - -Here is an ordered set of steps that get HTCondor running using the RPM. -\begin{enumerate} -\item The HTCondor package will automatically add a \Login{condor} user/group, -if it does not exist already. -Sites wishing to control the attributes of this user/group -should add the \Login{condor} user/group manually before installation. - -\item Download and install the meta-data that describes -the appropriate YUM repository. -This example is for the stable series, on RHEL 5. -\footnotesize -\begin{verbatim} - cd /etc/yum.repos.d - wget http://research.cs.wisc.edu/htcondor/yum/repo.d/condor-stable-rhel5.repo -\end{verbatim} -\normalsize -Note that this step need be done only once; -do not get the same repository more than once. - -\item Import signing key -The RPMs are signed in the Redhat 6 and RedHat 7 repositories. -\begin{verbatim} - wget http://research.cs.wisc.edu/htcondor/yum/RPM-GPG-KEY-HTCondor - rpm --import RPM-GPG-KEY-HTCondor -\end{verbatim} - -\item Install HTCondor. -For 32-bit machines: -\begin{verbatim} - yum install condor-all -\end{verbatim} -For 64-bit machines: -\begin{verbatim} - yum install condor-all.x86_64 -\end{verbatim} - -\item As needed, edit the HTCondor configuration files to customize. -The configuration files are in the directory \File{/etc/condor/} . -Do \emph{not} use \Condor{configure} or \Condor{install} for configuration. -The installation will be able to find configuration files without -additional administrative intervention, -as the configuration files are placed in \File{/etc}, -and HTCondor searches this directory. - -\item Start HTCondor daemons: -\begin{verbatim} - /sbin/service condor start -\end{verbatim} - -\end{enumerate} - -% Alain thinks that upgrades DO work. -%RPM upgrade (\Opt{-u} option) does not currently -%work for HTCondor \VersionNotice. - -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -\subsection{\label{sec:install-debs} Debian Packages} -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -\index{installation!using Debian packages} -\index{Debian installation with Debian packages} - -Debian packages are available in HTCondor \VersionNotice. -We provide an APT repository, as well as -installation and configuration in one easy step. -These Debian packages of HTCondor are currently available for -Debian 6 (squeeze) and Debian 7 (wheezy). -As of HTCondor version 7.5.1, -the HTCondor Debian package installs into File Hierachy Standard locations. - -The HTCondor APT repositories are specified at - \URL{http://research.cs.wisc.edu/htcondor/debian/} . -See this web page for repository information. - -Here is an ordered set of steps that get HTCondor running. -\begin{enumerate} -\item The HTCondor package will automatically add a \Login{condor} user/group, -if it does not exist already. -Sites wishing to control the attributes of this user/group -should add the \Login{condor} user/group manually before installation. - -\item If not already present, -set up access to the appropriate APT repository; -they are distinguished as stable or development release, -and by operating system. -Ensure that the correct one of the following release and -operating system-specific lines is in -the file \File{/etc/apt/sources.list} . -\footnotesize -\begin{verbatim} -deb http://research.cs.wisc.edu/htcondor/debian/stable/ squeeze contrib -deb http://research.cs.wisc.edu/htcondor/debian/development/ squeeze contrib -deb http://research.cs.wisc.edu/htcondor/debian/stable/ wheezy contrib -deb http://research.cs.wisc.edu/htcondor/debian/development/ wheezy contrib -\end{verbatim} -\normalsize -Note that this step need be done only once; -do not add the same repository more than once. - -\item Install and start HTCondor services: -\begin{verbatim} - apt-get update - apt-get install condor -\end{verbatim} - -\item As needed, edit the HTCondor configuration files to customize. -The configuration files are in the directory \File{/etc/condor/} . -Do \emph{not} use \Condor{configure} or \Condor{install} for configuration. -The installation will be able to find configuration files without -additional administrative intervention, -as the configuration files are placed in \File{/etc}, -and HTCondor searches this directory. - -Then, if any configuration changes are made, restart HTCondor with -\begin{verbatim} - /etc/init.d/condor restart -\end{verbatim} - -\end{enumerate} - -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \subsection{\label{sec:Pool-Upgrade} Upgrading -- Installing a New Version on an Existing Pool} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% @@ -946,7 +964,7 @@ note that the configuration settings must be modified for security reasons. Specifically, the \Macro{HOSTALLOW\_WRITE} configuration variable must be explicitly changed, -or no jobs may be submitted, +or no jobs can be submitted, and error messages will be issued by HTCondor tools. Another way to upgrade leaves HTCondor running. @@ -1022,8 +1040,7 @@ As such, the commands must be either run from a machine that has the proper authorization, or run by a user that is authorized to issue the commands. -Section~\ref{sec:Security} on -page~\pageref{sec:Security} details the implementation of +Section~\ref{sec:Security} details the implementation of security in HTCondor. \begin{description} @@ -1154,8 +1171,7 @@ configuration variables. For those, a restart of HTCondor is required. Those configuration variables that require a restart are listed in -section~\ref{sec:Macros-Requiring-Restart} -on page~\pageref{sec:Macros-Requiring-Restart}. +section~\ref{sec:Macros-Requiring-Restart}. The manual page for \Condor{restart} is at -~\ref{man-condor-restart}. +~\pageref{man-condor-restart}. diff -Nru condor-8.4.9~dfsg.1/doc/admin-man/install-windows.tex condor-8.4.11~dfsg.1/doc/admin-man/install-windows.tex --- condor-8.4.9~dfsg.1/doc/admin-man/install-windows.tex 2016-10-04 19:38:28.000000000 +0000 +++ condor-8.4.11~dfsg.1/doc/admin-man/install-windows.tex 2017-01-25 20:10:42.000000000 +0000 @@ -7,31 +7,44 @@ This section contains the instructions for installing the Windows version of HTCondor. The install program will set up a slightly customized configuration -file that may be further customized after the installation has completed. +file that can be further customized after the installation has completed. -Please read the copyright and disclaimer information in -section~\ref{sec:license} on -page~\pageref{sec:license} of the manual. -Installation and -use of HTCondor is acknowledgment that you have read and agree to the -terms. +%TEMP -- do we really need to have this (it's already in the "main" +% installation section)? +%Please read the copyright and disclaimer information in +%section~\ref{sec:license} of the manual. +%Installation and +%use of HTCondor is acknowledgment that you have read and agree to the +%terms. Be sure that the HTCondor tools are of the same version as the daemons installed. The HTCondor executable for distribution is packaged in -a single file named similar to: +a single file named similarly to: \begin{verbatim} - condor-7.9.6-122785-Windows-x86.msi + condor-8.4.11-390598-Windows-x86.msi \end{verbatim} \index{Windows!installation!initial file size} -This file is approximately 87 Mbytes in size, and it may be +This file is approximately 107 Mbytes in size, and it can be removed once HTCondor is fully installed. -Before installing HTCondor, please consider joining the condor-world mailing -list. Traffic on this list is kept to an absolute minimum. It is only -used to announce new releases of HTCondor. -To subscribe, follow the directions given at -\URL{http://www.cs.wisc.edu/condor/mail-lists/}. +%TEMP -- do we really need to have this (it's already in the "main" +% installation section)? +%Before installing HTCondor, please consider joining the condor-world mailing +%list. Traffic on this list is kept to an absolute minimum. It is only +%used to announce new releases of HTCondor. +%To subscribe, follow the directions given at +%\URL{http://www.cs.wisc.edu/condor/mail-lists/}. + +%TEMP -- do we really need to have this (it's already in the "main" +% installation section)? +%You might also want to con the htcondor-usrs mailing list. +%This list is meant to be a forum for HTCondor users to learn from each +%other and discuss using HTCondor. It is an excellent place to ask +%the HTCondor community about using and configuring HTCondor. +%To subscribe, go to +%\URL{https://lists.cs.wisc.edu/mailman/listinfo/htcondor-users}, +%and fill out the online form. For any installation, HTCondor services are installed and run as the Local System account. @@ -46,7 +59,7 @@ or a more recent version. \item 300 megabytes of free disk space is recommended. Significantly more -disk space could be desired to be able to run jobs with large data files. +disk space could be necessary to be able to run jobs with large data files. \item HTCondor for Windows will operate on either an NTFS or FAT32 file system. However, for security purposes, NTFS is preferred. @@ -70,8 +83,7 @@ If the answers to these questions are already known, skip to the Windows Installation Procedure section below, -section~\ref{sec:nt-install-procedure} on -page~\pageref{sec:nt-install-procedure}. +section~\ref{sec:nt-install-procedure}. If unsure, read on. \begin{itemize} @@ -98,6 +110,8 @@ Install HTCondor on the central manager before installing on the other machines within the pool. +Generally jobs should not be either submitted or run on the central manager machine. + %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \item{Is there enough disk space for HTCondor?} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% @@ -179,7 +193,7 @@ \item[STEP 3: This Machine's Roles.] - Each machine within an HTCondor pool may either + Each machine within an HTCondor pool can either submit jobs or execute submitted jobs, or both submit and execute jobs. A check box determines if this machine will be a submit point for @@ -227,8 +241,8 @@ Enter the machine's accounting (or UID) domain. On this version of HTCondor for Windows, this setting is only used for user - priorities (see section~\ref{sec:UserPrio} on - page~\pageref{sec:UserPrio}) and to form a default e-mail address for + priorities (see section~\ref{sec:UserPrio}) + and to form a default e-mail address for the user. \item[STEP 5: E-mail Settings.] @@ -283,8 +297,7 @@ For more details on these access permissions, and others that can be manually changed in your configuration file, please see the section titled Setting Up IP/Host-Based Security in HTCondor - in section section~\ref{sec:Host-Security} - on page~\pageref{sec:Host-Security}. + in section section~\ref{sec:Host-Security}. \item[STEP 8: VM Universe Setting.] A radio button determines whether @@ -293,7 +306,7 @@ In addition to having the VMware Server installed, HTCondor also needs \Prog{Perl} installed. The resources available for \SubmitCmdNI{vm} universe jobs can be tuned - with these settings, or the defaults listed may be used. + with these settings, or the defaults listed can be used. \begin{description} \item[Version] @@ -393,7 +406,7 @@ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \subsubsection{\label{sec:nt-unattended-install-procedure} -Unattended Installation Procedure Using the Included Set Up Program} +Unattended Installation Procedure Using the Included Setup Program} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \index{Windows!installation!unattended install} @@ -478,20 +491,20 @@ is a list of host names that are allowed to issue READ commands to HTCondor daemons. This value should be set in accordance with the \Macro{HOSTALLOW\_READ} setting in the configuration file, as described in -section~\ref{sec:Host-Security} on page~\pageref{sec:Host-Security}. +section~\ref{sec:Host-Security}. \item[HOSTALLOWWRITE] is a list of host names that are allowed to issue WRITE commands to HTCondor daemons. This value should be set in accordance with the \Macro{HOSTALLOW\_WRITE} setting in the configuration file, as described in -section~\ref{sec:Host-Security} on page~\pageref{sec:Host-Security}. +section~\ref{sec:Host-Security}. \item[HOSTALLOWADMINISTRATOR] is a list of host names that are allowed to issue ADMINISTRATOR commands to HTCondor daemons. This value should be set in accordance with the \Macro{HOSTALLOW\_ADMINISTRATOR} setting in the configuration file, as described in -section~\ref{sec:Host-Security} on page~\pageref{sec:Host-Security}. +section~\ref{sec:Host-Security}. \item[INSTALLDIR] defines the path to the directory where HTCondor will be installed. @@ -531,8 +544,8 @@ \item[LOCALCONFIG] defines the location of the local configuration file. -The value may be the path to a file on the local machine, -or it may be a URL beginning with \Expr{http}. +The value can be the path to a file on the local machine, +or it can be a URL beginning with \Expr{http}. If the value is a URL, then the \Condor{urlfetch} tool is invoked to fetch configuration whenever the configuration is read. @@ -689,5 +702,4 @@ Once HTCondor services are running, try submitting test jobs. Example 2 within section~\ref{sec:sample-submit-files} -on page~\pageref{sec:sample-submit-files} presents a vanilla -universe job. +presents a vanilla universe job. diff -Nru condor-8.4.9~dfsg.1/doc/admin-man/userprio.tex condor-8.4.11~dfsg.1/doc/admin-man/userprio.tex --- condor-8.4.9~dfsg.1/doc/admin-man/userprio.tex 2016-10-04 19:38:28.000000000 +0000 +++ condor-8.4.11~dfsg.1/doc/admin-man/userprio.tex 2017-01-25 20:10:42.000000000 +0000 @@ -251,7 +251,7 @@ The RUP of a user $u$ at time $t$, $\pi_r(u,t)$, is calculated every time interval $\delta t$ using the formula -$$\pi_r(u,t) = \beta\times\pi(u,t-\delta t) + (1-\beta)\times\rho(u,t)$$ +$$\pi_r(u,t) = \beta\times\pi_r(u,t-\delta t) + (1-\beta)\times\rho(u,t)$$ where $\rho(u,t)$ is the number of resources used by user $u$ at time $t$, and $\beta=0.5^{{\delta t}/h}$. $h$ is the half life period set by \Macro{PRIORITY\_HALFLIFE}. diff -Nru condor-8.4.9~dfsg.1/doc/condor-macros.tex condor-8.4.11~dfsg.1/doc/condor-macros.tex --- condor-8.4.9~dfsg.1/doc/condor-macros.tex 2016-10-04 19:38:28.000000000 +0000 +++ condor-8.4.11~dfsg.1/doc/condor-macros.tex 2017-01-25 20:10:42.000000000 +0000 @@ -6,7 +6,7 @@ % Set up version, author and copyright notices % \newcommand{\AuthorNotice}{Center for High Throughput Computing, University of Wisconsin--Madison} -\newcommand{\VersionNotice}{Version 8.4.9} +\newcommand{\VersionNotice}{Version 8.4.11} %\newcommand{\CondorR}{\Reg{Condor}} \newcommand{\CondorTM}{\TM{HTCondor}} diff -Nru condor-8.4.9~dfsg.1/doc/grids/job_router.tex condor-8.4.11~dfsg.1/doc/grids/job_router.tex --- condor-8.4.9~dfsg.1/doc/grids/job_router.tex 2016-10-04 19:38:28.000000000 +0000 +++ condor-8.4.11~dfsg.1/doc/grids/job_router.tex 2017-01-25 20:10:42.000000000 +0000 @@ -75,7 +75,7 @@ A good place to learn about the syntax of New ClassAds is the Informal Language Description in the C++ ClassAds -tutorial: \URL{http://research.cs.wisc.edu/htcondor/classad/c++tut.html}. +tutorial: \URL{http://htcondor.org/classad/c++tut.html}. Two essential differences distinguish the New ClassAd language from the current one. In the New ClassAd language, diff -Nru condor-8.4.9~dfsg.1/doc/man-pages/condor_history.tex condor-8.4.11~dfsg.1/doc/man-pages/condor_history.tex --- condor-8.4.9~dfsg.1/doc/man-pages/condor_history.tex 2016-10-04 19:38:28.000000000 +0000 +++ condor-8.4.11~dfsg.1/doc/man-pages/condor_history.tex 2017-01-25 20:10:42.000000000 +0000 @@ -132,7 +132,7 @@ \OptItem{\Opt{-xml}}{Display job ClassAds in XML format. The XML format is fully defined in the reference manual, obtained from the ClassAds web page, with a link at - \URL{http://research.cs.wisc.edu/htcondor/research.html}.} + \URL{http://htcondor.org/classad/classad.html}.} \end{Options} \ExitStatus diff -Nru condor-8.4.9~dfsg.1/doc/man-pages/condor_q.tex condor-8.4.11~dfsg.1/doc/man-pages/condor_q.tex --- condor-8.4.9~dfsg.1/doc/man-pages/condor_q.tex 2016-10-04 19:38:28.000000000 +0000 +++ condor-8.4.11~dfsg.1/doc/man-pages/condor_q.tex 2017-01-25 20:10:42.000000000 +0000 @@ -271,7 +271,7 @@ in XML format. The XML format is fully defined in the reference manual, obtained from the ClassAds web page, with a link at - \URL{http://research.cs.wisc.edu/htcondor/research.html}.} + \URL{http://htcondor.org/classad/classad.html}.} \OptItem{\OptArg{-attributes}{Attr1[,Attr2 \Dots]}}{(output option) Explicitly list the attributes, by name in a comma separated list, diff -Nru condor-8.4.9~dfsg.1/doc/man-pages/condor_status.tex condor-8.4.11~dfsg.1/doc/man-pages/condor_status.tex --- condor-8.4.9~dfsg.1/doc/man-pages/condor_status.tex 2016-10-04 19:38:28.000000000 +0000 +++ condor-8.4.11~dfsg.1/doc/man-pages/condor_status.tex 2017-01-25 20:10:42.000000000 +0000 @@ -145,7 +145,7 @@ in XML format. The XML format is fully defined in the reference manual, obtained from the ClassAds web page, with a link at - \URL{http://research.cs.wisc.edu/htcondor/research.html}.} + \URL{http://htcondor.org/classad/classad.html}.} \OptItem{\OptArg{-constraint}{const}}{(Custom option) Add constraint expression. } \OptItem{\OptArg{-format}{fmt attr}}{(Custom option) Display attribute diff -Nru condor-8.4.9~dfsg.1/doc/misc/classad.tex condor-8.4.11~dfsg.1/doc/misc/classad.tex --- condor-8.4.9~dfsg.1/doc/misc/classad.tex 2016-10-04 19:38:28.000000000 +0000 +++ condor-8.4.11~dfsg.1/doc/misc/classad.tex 2017-01-25 20:10:42.000000000 +0000 @@ -82,8 +82,8 @@ ClassAds, all of which will remain invisible to users of HTCondor for this version. A complete description of New ClassAds can be found at -\URL{http://research.cs.wisc.edu/htcondor/classad/classad.html}, -and in the ClassAd Language Reference Manual found on this web page. +\URL{http://htcondor.org/classad/classad.html}, +and in the ClassAd Language Reference Manual found on that web page. Some of the features of New ClassAds that are \emph{not} in Old ClassAds are lists, nested ClassAds, time values, and matching groups of ClassAds. diff -Nru condor-8.4.9~dfsg.1/doc/misc/misc.tex condor-8.4.11~dfsg.1/doc/misc/misc.tex --- condor-8.4.9~dfsg.1/doc/misc/misc.tex 2016-10-04 19:38:28.000000000 +0000 +++ condor-8.4.11~dfsg.1/doc/misc/misc.tex 2017-01-25 20:10:42.000000000 +0000 @@ -5,7 +5,7 @@ Details of checkpoints are presented. -Description and useage of COD (Computing on Demand) extensions to HTCondor +Description and usage of COD (Computing on Demand) extensions to HTCondor are presented. The various hooks that HTCondor implements are described. diff -Nru condor-8.4.9~dfsg.1/doc/overview/overview.tex condor-8.4.11~dfsg.1/doc/overview/overview.tex --- condor-8.4.9~dfsg.1/doc/overview/overview.tex 2016-10-04 19:38:28.000000000 +0000 +++ condor-8.4.11~dfsg.1/doc/overview/overview.tex 2017-01-25 20:10:42.000000000 +0000 @@ -303,7 +303,7 @@ \index{supported platforms} \index{platforms supported} HTCondor is currently available as a free download from the Internet via the World Wide Web at -URL \URL{http://research.cs.wisc.edu/htcondor/downloads/}. +URL \URL{http://htcondor.org/downloads/}. Binary distributions of this HTCondor \VersionNotice\ release are available for the platforms detailed in Table~\ref{table:supported-platforms}. A platform is an @@ -396,26 +396,27 @@ The latest software releases, publications/papers regarding HTCondor and other High-Throughput Computing research can be found at the official web site for HTCondor at -\URL{http://research.cs.wisc.edu/htcondor/}. +\URL{http://htcondor.org/}. \index{HTCondor!mailing lists} \index{mailing lists} -In addition, there is an e-mail list at htcondor-world@cs.wisc.edu. +In addition, there is an e-mail list at \Bold{htcondor-world@cs.wisc.edu}. The HTCondor Team uses this e-mail list to announce new releases of HTCondor and other major HTCondor-related news items. To subscribe or unsubscribe from the the list, follow the instructions at -\URL{http://research.cs.wisc.edu/htcondor/mail-lists/}. +\URL{http://htcondor.org/mail-lists/}. Because many of us receive too much e-mail as it is, you will be happy to know that the HTCondor World e-mail list group is moderated, and only major announcements of wide interest are distributed. Our users support each other by belonging to an unmoderated mailing -list targeted at solving problems with HTCondor. -HTCondor team members attempt to monitor traffic to HTCondor Users, +list (\Bold{htcondor-users@cs.wisc.edu}) +targeted at solving problems with HTCondor. +HTCondor team members attempt to monitor traffic to htcondor-users, responding as they can. Follow the instructions at -\URL{http://research.cs.wisc.edu/htcondor/mail-lists/}. +\URL{http://htcondor.org/mail-lists/}. Finally, you can reach the HTCondor Team directly. The HTCondor Team is comprised of the @@ -435,7 +436,7 @@ % % Note to developers: % If you change this text, also change -% http://www.cs.wisc.edu/condor/privacy.html +% http://htcondor.org/privacy.html % The HTCondor software periodically sends short messages diff -Nru condor-8.4.9~dfsg.1/doc/user-man/dagman.tex condor-8.4.11~dfsg.1/doc/user-man/dagman.tex --- condor-8.4.9~dfsg.1/doc/user-man/dagman.tex 2016-10-04 19:38:28.000000000 +0000 +++ condor-8.4.11~dfsg.1/doc/user-man/dagman.tex 2017-01-25 20:10:42.000000000 +0000 @@ -994,6 +994,7 @@ no new node jobs will be submitted, and no PRE or POST scripts will be run. Any node jobs already in the HTCondor queue will continue undisturbed. +Any running PRE or POST scripts will be killed. If the \Condor{dagman} job is left on hold, it will remain in the HTCondor queue after all of the currently running node jobs are finished. diff -Nru condor-8.4.9~dfsg.1/doc/version-history/8-2.history.tex condor-8.4.11~dfsg.1/doc/version-history/8-2.history.tex --- condor-8.4.9~dfsg.1/doc/version-history/8-2.history.tex 2016-10-04 19:38:28.000000000 +0000 +++ condor-8.4.11~dfsg.1/doc/version-history/8-2.history.tex 2017-01-25 20:10:42.000000000 +0000 @@ -1042,7 +1042,7 @@ \item \Security This release of HTCondor fixes a security-related bug described at -\URL{http://research.cs.wisc.edu/htcondor/security/vulnerabilities/HTCONDOR-2014-0001.html}. +\URL{http://htcondor.org/security/vulnerabilities/HTCONDOR-2014-0001.html}. \Ticket{4420} \end{itemize} diff -Nru condor-8.4.9~dfsg.1/doc/version-history/8-4.history.tex condor-8.4.11~dfsg.1/doc/version-history/8-4.history.tex --- condor-8.4.9~dfsg.1/doc/version-history/8-4.history.tex 2016-10-04 19:38:28.000000000 +0000 +++ condor-8.4.11~dfsg.1/doc/version-history/8-4.history.tex 2017-01-25 20:10:42.000000000 +0000 @@ -16,6 +16,184 @@ The details of each version are described below. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +\subsection*{\label{sec:New-8-4-11}Version 8.4.11} +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +\noindent Release Notes: + +\begin{itemize} + +\item HTCondor version 8.4.11 released on January 23, 2016. + +\end{itemize} + + +\noindent New Features: + +\begin{itemize} + +\item None. + +\end{itemize} + +\noindent Bugs Fixed: + +\begin{itemize} + +\item Fixed a bug where the effects of a startd cron job would not be used by +the \Condor{startd} when making policy decisions (e.g., evaluating the +\MacroNI{START} expression) until an \MacroNI{UPDATE\_INTERVAL} had passed. This +was generally only noticeable if you set \MacroNI{STARTD\_CRON\_AUTOPUBLISH} +to a value other than \Expr{NEVER}, which could cause the startd to reject claims +from the negotiator that had been made based on the cron-updated value(s). +\Ticket{6057} + +\item Fixed a bug in pslot preemption where it could cause matching jobs to +not start for a long time. +\Ticket{6055} + +\item Fixed a bug that caused a job to not be cleaned up when the job +lease expires, if glexec is in use. +\Ticket{6058} + +\item Fixed a problem, found while testing on Ubuntu 16, where the negotiator +would crash at the end of the negotiation cycle. +\Ticket{6064} + +\item Updated the default configuration in the Debian and Ubuntu packages to +look for the Ganglia shared libraries in the proper place. +\Ticket{5939} + +\item Updated the Enterprise Linux 7 RPM to require the proper SELinux +utilities for its post-install script. +\Ticket{6081} + +\end{itemize} + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +\subsection*{\label{sec:New-8-4-10}Version 8.4.10} +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +\noindent Release Notes: + +\begin{itemize} + +\item HTCondor version 8.4.10 released on December 13, 2016. + +\end{itemize} + + +\noindent New Features: + +\begin{itemize} + +\item None. + +\end{itemize} + +\noindent Bugs Fixed: + +\begin{itemize} + +\item Added additional SELinux type enforcement rules on Enterprise Linux 7 for +the \Condor{shared\_port} daemon and Linux tuning script. The RPM post install +script makes the HTCondor SELinux domains permissive. +\Ticket{5449} +\Ticket{5560} +\Ticket{5835} + +\item Fixed a performance problem in the \Condor{schedd} when +\MacroNI{RequestCpus} was an expression. Added a new parameter +\MacroNI{SCHEDD\_SLOT\_WEIGHT}, which may be needed +if \MacroNI{SLOT\_WEIGHT} is not the default value of "Cpus", and refers to +expressions in the job ad. +\Ticket{5996} + +\item When transferring a job's sandbox, the permissions on sub-directories +are now preserved in the same that they are for regular files. +Previously, the permissions were modified by HTCondor daemon's umask, +and directories transferred from a Windows machine to a UNIX machine had +no permissions enabled. +\Ticket{5948} + +\item Fixed bug in the \MacroNI{HOLD\_IF\_CPUS\_EXCEEDED} configuration template metaknob. +\Ticket{5933} + +\item Fixed a bug in the \MacroNI{LIMIT\_JOB\_RUNTIMES} configuration template metaknob +so that it works in the face of a non-default MaxJobRuntime. +\Ticket{5961} + +\item Fixed a bug that made it so a restart of the \Condor{schedd} was required +in order to change \MacroNI{REMOVE\_SIGNIFICANT\_ATTRIBUTES} to remove an attribute that +the \Condor{schedd}s had already marked as significant. +\Ticket{5983} + +\item When creating a Google Compute Engine instance, instruct the server +to delete the auto-created disk image when the instance is removed. +\Ticket{5999} + +\item Fixed a bug in our support for Google Compute Engine which would +cause authorization tokens to be renewed five minutes after the deadline +instead of five minutes before. Naturally, this led to ten minutes of +interrupted service for jobs (or workloads) which lasted longer than the +initial valid duration of the tokens. +\Ticket{6009} + +\item Fixed a bug that would cause the \Condor{schedd} to crash when a +condor cron job was scheduled to start during the one hour gap in daylight +savings time when the clocks are moved backwards one hour. +\Ticket{5995} + +\item Fixed a bug that would cause a core dump when running the condor\_history +command against a remote schedd. The results would be returned correctly, but a +core file would appear in the log directory after the command exited. +\Ticket{5956} + +\item In the Python bindings, fixed bugs in the LogReader and EventIterator +classes that could cause invocations of poll() to return prematurely with +no event. +\Ticket{5920} + +\item Fixed a bug in \Condor{dagman} that caused a file named +\File{''} (two single quotes) to be created if the +\MacroNI{DAGMAN\_SUPPRESS\_JOB\_LOGS} configuration macro was set +to \Expr{True}. +\Ticket{5941} + +\item Fixed a bug that can cause the \Condor{starter} to crash if the +connection to the \Condor{shadow} is lost during file transfer. +\Ticket{5972} + +\item Fixed a bug that allowed a user to bypass the \MacroNI{MAX\_JOBS\_PER\_OWNER} +limit by specifying an accounting group or nice\_user in their submit file. +\Ticket{5946} + +\item When there are no GPUs on a machine, \Condor{gpu\_discovery} would write + to stderr in addition to its normal output, this made it hard to use the + \Opt{-config} option as intended. \Condor{gpu\_discovery} has been changed so + that it will never write to stderr when the \Opt{-config} option is specified, + instead it will write error messages as configuration comments to stdout. + \Ticket{5989} + +\item Removed obsolete ControlGroup option from HTCondor's systemd service +unit configuration file. +\Ticket{5997} + +\item Compiled benchmarking programs as a Position Independent Executable. +Position Independent Executables are a requirement for entry into Debian 9. +\Ticket{5994} + +\item Fixed a denial of service vulnerability when using the \Condor{credd} +on the Windows platform. +\Ticket{5984} + +\item Fixed a bug where the \Opt{-pool} argument would be ignored by +\Condor{ssh\_to\_job} under certain circumstances. +\Ticket{5919} + +\end{itemize} + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \subsection*{\label{sec:New-8-4-9}Version 8.4.9} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% diff -Nru condor-8.4.9~dfsg.1/nmi_tools/glue/build/remote_declare.pl condor-8.4.11~dfsg.1/nmi_tools/glue/build/remote_declare.pl --- condor-8.4.9~dfsg.1/nmi_tools/glue/build/remote_declare.pl 2016-10-04 19:38:28.000000000 +0000 +++ condor-8.4.11~dfsg.1/nmi_tools/glue/build/remote_declare.pl 2017-01-25 20:10:42.000000000 +0000 @@ -71,11 +71,13 @@ print TASKLIST "$BUILD_TESTS_TASK 4h\n"; print TASKLIST "$UNSTRIPPED_TASK 4h\n"; print TASKLIST "$CHECK_UNSTRIPPED_TASK 4h\n"; - if (!($ENV{NMI_PLATFORM} =~ /(x86_RedHat6|x86_64_RedHat6|x86_64_RedHat7)/)) { + if (!($ENV{NMI_PLATFORM} =~ /(x86_RedHat6|x86_64_RedHat6|x86_64_RedHat7|x86_64_Ubuntu16)/)) { print TASKLIST "$NATIVE_DEBUG_TASK 4h\n"; } - print TASKLIST "$NATIVE_TASK 4h\n"; - print TASKLIST "$CHECK_NATIVE_TASK 4h\n"; + if (!($ENV{NMI_PLATFORM} =~ /x86_64_Ubuntu16/)) { + print TASKLIST "$NATIVE_TASK 4h\n"; + print TASKLIST "$CHECK_NATIVE_TASK 4h\n"; + } print TASKLIST "$TAR_TASK 4h\n"; print TASKLIST "$CHECK_TAR_TASK 4h\n"; print TASKLIST "$RUN_UNIT_TESTS 4h\n"; diff -Nru condor-8.4.9~dfsg.1/nmi_tools/glue/SubmitInfo.pm condor-8.4.11~dfsg.1/nmi_tools/glue/SubmitInfo.pm --- condor-8.4.9~dfsg.1/nmi_tools/glue/SubmitInfo.pm 2016-10-04 19:38:28.000000000 +0000 +++ condor-8.4.11~dfsg.1/nmi_tools/glue/SubmitInfo.pm 2017-01-25 20:10:42.000000000 +0000 @@ -303,6 +303,10 @@ }, }, + 'x86_64_CentOS7' => 'x86_64_RedHat7', + 'x86_64_SL7' => 'x86_64_RedHat7', + + ########################################################################## # Platform RedHat and SL ########################################################################## @@ -333,8 +337,6 @@ # Add the SWAMP's (temporary) platform name 'swamp:rhel-6.4-64' => 'x86_64_RedHat6', - 'x86_64_SL7' => 'x86_64_SL6', - # for now SL6 is the same as RedHat6 'x86_64_SL6' => 'x86_64_RedHat6', 'x86_64_sl_6.0' => 'x86_64_SL6', @@ -604,6 +606,22 @@ 'build' => { 'configure_args' => { @default_build_configure_args, '-DCLIPPED:BOOL' => 'OFF', + }, + 'prereqs' => [ @default_prereqs ], + }, + + 'test' => { + 'configure_args' => { @default_test_configure_args }, + 'prereqs' => [ @default_prereqs ], + 'testclass' => [ @default_testclass ], + }, + }, + + # Only Ubuntu 16.04 has standard universe port. + 'x86_64_Ubuntu16' => { + 'build' => { + 'configure_args' => { @default_build_configure_args, + '-DCLIPPED:BOOL' => 'OFF', }, 'prereqs' => [ @default_prereqs ], }, diff -Nru condor-8.4.9~dfsg.1/nmi_tools/nmi-build-platforms condor-8.4.11~dfsg.1/nmi_tools/nmi-build-platforms --- condor-8.4.9~dfsg.1/nmi_tools/nmi-build-platforms 2016-10-04 19:38:28.000000000 +0000 +++ condor-8.4.11~dfsg.1/nmi_tools/nmi-build-platforms 2017-01-25 20:10:42.000000000 +0000 @@ -8,6 +8,7 @@ x86_64_RedHat7 x86_64_Ubuntu12 x86_64_Ubuntu14 +x86_64_Ubuntu16 x86_64_Windows7 x86_64_Windows8 x86_64_Windows10 @@ -16,8 +17,8 @@ # Not yet officially supported. # We want to build all branches on Fedora because it is our "warning check" platform -x86_64_Fedora23 x86_64_Fedora24 -# We might as well build on SL +# We might as well build on CentOS and SL +x86_64_CentOS7 x86_64_SL7 diff -Nru condor-8.4.9~dfsg.1/src/ccb/ccb_server.cpp condor-8.4.11~dfsg.1/src/ccb/ccb_server.cpp --- condor-8.4.9~dfsg.1/src/ccb/ccb_server.cpp 2016-10-04 19:38:28.000000000 +0000 +++ condor-8.4.11~dfsg.1/src/ccb/ccb_server.cpp 2017-01-25 20:10:42.000000000 +0000 @@ -253,7 +253,7 @@ close(m_epfd); m_epfd = pipes[0]; - // Inform DC we want to recieve notifications from this FD. + // Inform DC we want to receive notifications from this FD. daemonCore->Register_Pipe(m_epfd,"CCB epoll FD", static_cast(&CCBServer::EpollSockets),"CCB Epoll Handler", this, HANDLE_READ); } } diff -Nru condor-8.4.9~dfsg.1/src/condor_collector.V6/CollectorPlugin.h condor-8.4.11~dfsg.1/src/condor_collector.V6/CollectorPlugin.h --- condor-8.4.9~dfsg.1/src/condor_collector.V6/CollectorPlugin.h 2016-10-04 19:38:28.000000000 +0000 +++ condor-8.4.11~dfsg.1/src/condor_collector.V6/CollectorPlugin.h 2017-01-25 20:10:42.000000000 +0000 @@ -66,7 +66,7 @@ virtual void update(int command, const ClassAd &) = 0; /** - * Recieve a ClassAd INVALIDATE_ command, command int + * Receive a ClassAd INVALIDATE_ command, command int * provided. */ virtual void invalidate(int command, const ClassAd &) = 0; diff -Nru condor-8.4.9~dfsg.1/src/condor_contrib/condor_pigeon/src/condor_pigeon_client/topic_listener_skype.cpp condor-8.4.11~dfsg.1/src/condor_contrib/condor_pigeon/src/condor_pigeon_client/topic_listener_skype.cpp --- condor-8.4.9~dfsg.1/src/condor_contrib/condor_pigeon/src/condor_pigeon_client/topic_listener_skype.cpp 2016-10-04 19:38:28.000000000 +0000 +++ condor-8.4.11~dfsg.1/src/condor_contrib/condor_pigeon/src/condor_pigeon_client/topic_listener_skype.cpp 2017-01-25 20:10:42.000000000 +0000 @@ -106,7 +106,7 @@ } -//Function: for the recieved message from the queue susbscribed to +//Function: for the received message from the queue susbscribed to //optional: the received message from the broker queue can be then sent to //external agents like skype IM's /write to file/send emails etc void Listener::received(Message& message) { diff -Nru condor-8.4.9~dfsg.1/src/condor_daemon_client/dc_schedd.cpp condor-8.4.11~dfsg.1/src/condor_daemon_client/dc_schedd.cpp --- condor-8.4.9~dfsg.1/src/condor_daemon_client/dc_schedd.cpp 2016-10-04 19:38:28.000000000 +0000 +++ condor-8.4.11~dfsg.1/src/condor_daemon_client/dc_schedd.cpp 2017-01-25 20:10:42.000000000 +0000 @@ -41,6 +41,10 @@ { } +DCSchedd::DCSchedd( const ClassAd& ad, const char* the_pool ) + : Daemon( &ad, DT_SCHEDD, the_pool ) +{ +} DCSchedd::~DCSchedd( void ) { diff -Nru condor-8.4.9~dfsg.1/src/condor_daemon_client/dc_schedd.h condor-8.4.11~dfsg.1/src/condor_daemon_client/dc_schedd.h --- condor-8.4.9~dfsg.1/src/condor_daemon_client/dc_schedd.h 2016-10-04 19:38:28.000000000 +0000 +++ condor-8.4.11~dfsg.1/src/condor_daemon_client/dc_schedd.h 2017-01-25 20:10:42.000000000 +0000 @@ -62,6 +62,13 @@ */ DCSchedd( const char* const name = NULL, const char* pool = NULL ); + /** Constructor. Same as a Daemon object. + @param ad gets all the info out of this ad + @param pool The name of the pool, NULL if you want local + */ + DCSchedd( const ClassAd& ad, const char* pool = NULL ); + + /// Destructor ~DCSchedd(); diff -Nru condor-8.4.9~dfsg.1/src/condor_daemon_client/dc_starter.cpp condor-8.4.11~dfsg.1/src/condor_daemon_client/dc_starter.cpp --- condor-8.4.9~dfsg.1/src/condor_daemon_client/dc_starter.cpp 2016-10-04 19:38:28.000000000 +0000 +++ condor-8.4.11~dfsg.1/src/condor_daemon_client/dc_starter.cpp 2017-01-25 20:10:42.000000000 +0000 @@ -611,7 +611,7 @@ if (file_count != remote_file_count) { std::stringstream ss; - ss << "Recieved " << file_count << " files, but remote side thought it sent " << remote_file_count << " files"; + ss << "Received " << file_count << " files, but remote side thought it sent " << remote_file_count << " files"; error_msg = ss.str(); return false; } diff -Nru condor-8.4.9~dfsg.1/src/condor_daemon_core.V6/daemon_command.cpp condor-8.4.11~dfsg.1/src/condor_daemon_core.V6/daemon_command.cpp --- condor-8.4.9~dfsg.1/src/condor_daemon_core.V6/daemon_command.cpp 2016-10-04 19:38:28.000000000 +0000 +++ condor-8.4.11~dfsg.1/src/condor_daemon_core.V6/daemon_command.cpp 2017-01-25 20:10:42.000000000 +0000 @@ -744,7 +744,7 @@ using_cookie = true; } else { // bad cookie!!! - dprintf ( D_ALWAYS, "DC_AUTHENTICATE: recieved invalid cookie from %s!!!\n", m_sock->peer_description()); + dprintf ( D_ALWAYS, "DC_AUTHENTICATE: received invalid cookie from %s!!!\n", m_sock->peer_description()); m_result = FALSE; return CommandProtocolFinished; } diff -Nru condor-8.4.9~dfsg.1/src/condor_daemon_core.V6/daemon_core.cpp condor-8.4.11~dfsg.1/src/condor_daemon_core.V6/daemon_core.cpp --- condor-8.4.9~dfsg.1/src/condor_daemon_core.V6/daemon_core.cpp 2016-10-04 19:38:28.000000000 +0000 +++ condor-8.4.11~dfsg.1/src/condor_daemon_core.V6/daemon_core.cpp 2017-01-25 20:10:42.000000000 +0000 @@ -9023,7 +9023,7 @@ } #if defined(LINUX) && defined(TDP) if( WIFSIGNALED(status) && WTERMSIG(status) == SIGTRAP ) { - // This means the process has recieved a SIGTRAP to be + // This means the process has received a SIGTRAP to be // stopped. Oddly, on Linux, this generates a // SIGCHLD. So, we don't want to call the reaper for // this process, since it hasn't really exited. So, diff -Nru condor-8.4.9~dfsg.1/src/condor_dagman/dagman_submit.cpp condor-8.4.11~dfsg.1/src/condor_dagman/dagman_submit.cpp --- condor-8.4.9~dfsg.1/src/condor_dagman/dagman_submit.cpp 2016-10-04 19:38:28.000000000 +0000 +++ condor-8.4.11~dfsg.1/src/condor_dagman/dagman_submit.cpp 2017-01-25 20:10:42.000000000 +0000 @@ -234,24 +234,24 @@ args.AppendArg( dm.condorSubmitExe ); - args.AppendArg( "-a" ); + args.AppendArg( "-a" ); // -a == -append; using -a to save chars MyString nodeName = MyString(ATTR_DAG_NODE_NAME_ALT) + " = " + DAGNodeName; args.AppendArg( nodeName.Value() ); // append a line adding the parent DAGMan's cluster ID to the job ad - args.AppendArg( "-a" ); + args.AppendArg( "-a" ); // -a == -append; using -a to save chars MyString dagJobId = MyString( "+" ) + ATTR_DAGMAN_JOB_ID + " = " + dm.DAGManJobId._cluster; args.AppendArg( dagJobId.Value() ); // now we append a line setting the same thing as a submit-file macro // (this is necessary so the user can reference it in the priority) - args.AppendArg( "-a" ); + args.AppendArg( "-a" ); // -a == -append; using -a to save chars MyString dagJobIdMacro = MyString( "" ) + ATTR_DAGMAN_JOB_ID + " = " + dm.DAGManJobId._cluster; args.AppendArg( dagJobIdMacro.Value() ); - args.AppendArg( "-a" ); + args.AppendArg( "-a" ); // -a == -append; using -a to save chars MyString submitEventNotes = MyString( "submit_event_notes = DAG Node: " ) + DAGNodeName; args.AppendArg( submitEventNotes.Value() ); @@ -260,7 +260,7 @@ // We need to append the DAGman default log file to // the log file list - args.AppendArg( "-a" ); + args.AppendArg( "-a" ); // -a == -append; using -a to save chars std::string dlog( "dagman_log = " ); dlog += workflowLogFile; args.AppendArg( dlog.c_str() ); @@ -269,7 +269,7 @@ // Now append the mask debug_printf( DEBUG_VERBOSE, "Masking the events recorded in the DAGMAN workflow log\n" ); - args.AppendArg( "-a" ); + args.AppendArg( "-a" ); // -a == -append; using -a to save chars std::string dmask("+"); dmask += ATTR_DAGMAN_WORKFLOW_MASK; dmask += " = \""; @@ -283,12 +283,12 @@ // Suppress the job's log file if that option is enabled. if ( dm._suppressJobLogs ) { debug_printf( DEBUG_VERBOSE, "Suppressing node job log file\n" ); - args.AppendArg( "-a" ); - args.AppendArg( "log = ''" ); + args.AppendArg( "-a" ); // -a == -append; using -a to save chars + args.AppendArg( "log=" ); } ArgList parentNameArgs; - parentNameArgs.AppendArg( "-a" ); + parentNameArgs.AppendArg( "-a" ); // -a == -append; using -a to save chars MyString parentNodeNames = MyString( "+DAGParentNodeNames = " ) + "\"" + DAGParentNodeNames + "\""; parentNameArgs.AppendArg( parentNodeNames.Value() ); @@ -307,20 +307,20 @@ value.replaceString( "$(RETRY)", retryStr.Value() ); MyString varStr = nodeVar._name + " = " + value; - args.AppendArg( "-a" ); + args.AppendArg( "-a" ); // -a == -append; using -a to save chars args.AppendArg( varStr.Value() ); } // Set the special DAG_STATUS variable (mainly for use by // "final" nodes). - args.AppendArg( "-a" ); + args.AppendArg( "-a" ); // -a == -append; using -a to save chars MyString var = "DAG_STATUS = "; var += dm.dag->_dagStatus; args.AppendArg( var.Value() ); // Set the special FAILED_COUNT variable (mainly for use by // "final" nodes). - args.AppendArg( "-a" ); + args.AppendArg( "-a" ); // -a == -append; using -a to save chars var = "FAILED_COUNT = "; var += dm.dag->NumNodesFailed(); args.AppendArg( var.Value() ); @@ -351,14 +351,14 @@ } if( hold_claim ){ - args.AppendArg( "-a" ); + args.AppendArg( "-a" ); // -a == -append; using -a to save chars MyString holdit = MyString("+") + MyString(ATTR_JOB_KEEP_CLAIM_IDLE) + " = " + dm._claim_hold_time; args.AppendArg( holdit.Value() ); } if (dm._submitDagDeepOpts.suppress_notification) { - args.AppendArg( "-a" ); + args.AppendArg( "-a" ); // -a == -append; using -a to save chars MyString notify = MyString("notification = never"); args.AppendArg( notify.Value() ); } diff -Nru condor-8.4.9~dfsg.1/src/condor_examples/condor_config.generic.debian.patch condor-8.4.11~dfsg.1/src/condor_examples/condor_config.generic.debian.patch --- condor-8.4.9~dfsg.1/src/condor_examples/condor_config.generic.debian.patch 2016-10-04 19:38:28.000000000 +0000 +++ condor-8.4.11~dfsg.1/src/condor_examples/condor_config.generic.debian.patch 2017-01-25 20:10:42.000000000 +0000 @@ -1,5 +1,5 @@ ---- condor_config.generic 2014-09-30 09:57:58.000000003 -0500 -+++ condor_config.patched 2014-11-07 15:42:20.000000003 -0600 +--- condor_config.generic 2017-01-10 16:07:05.052352063 -0600 ++++ condor_config.patched 2017-01-10 16:06:48.898201252 -0600 @@ -19,25 +19,23 @@ ###################################################################### @@ -31,7 +31,7 @@ #LOCAL_CONFIG_DIR_EXCLUDE_REGEXP = ^((\..*)|(.*~)|(#.*)|(.*\.rpmsave)|(.*\.rpmnew))$ ## Use a host-based security policy. By default CONDOR_HOST and the local machine will be allowed -@@ -50,5 +48,33 @@ +@@ -50,5 +48,34 @@ #FLOCK_TO = condor.cs.wisc.edu, cm.example.edu ##-------------------------------------------------------------------- @@ -55,6 +55,7 @@ +SBIN = $(RELEASE_DIR)/sbin +LIBEXEC = $(RELEASE_DIR)/lib/condor/libexec +SHARE = $(RELEASE_DIR)/share/condor ++GANGLIA_LIB64_PATH = /lib,/usr/lib,/usr/local/lib + +PROCD_ADDRESS = $(RUN)/procd_pipe + diff -Nru condor-8.4.9~dfsg.1/src/condor_examples/condor.service condor-8.4.11~dfsg.1/src/condor_examples/condor.service --- condor-8.4.9~dfsg.1/src/condor_examples/condor.service 2016-10-04 19:38:28.000000000 +0000 +++ condor-8.4.11~dfsg.1/src/condor_examples/condor.service 2017-01-25 20:10:42.000000000 +0000 @@ -13,7 +13,6 @@ RestartSec=1minute StandardOutput=syslog LimitNOFILE=16384 -ControlGroup=/condor [Install] WantedBy=multi-user.target diff -Nru condor-8.4.9~dfsg.1/src/condor_includes/condor_crypt_3des.h condor-8.4.11~dfsg.1/src/condor_includes/condor_crypt_3des.h --- condor-8.4.9~dfsg.1/src/condor_includes/condor_crypt_3des.h 2016-10-04 19:38:28.000000000 +0000 +++ condor-8.4.11~dfsg.1/src/condor_includes/condor_crypt_3des.h 2017-01-25 20:10:42.000000000 +0000 @@ -61,7 +61,7 @@ //------------------------------------------ // Private constructor //------------------------------------------ - des_key_schedule keySchedule1_, keySchedule2_, keySchedule3_; + DES_key_schedule keySchedule1_, keySchedule2_, keySchedule3_; unsigned char ivec_[8]; int num_; }; diff -Nru condor-8.4.9~dfsg.1/src/condor_includes/condor_debug.h condor-8.4.11~dfsg.1/src/condor_includes/condor_debug.h --- condor-8.4.9~dfsg.1/src/condor_includes/condor_debug.h 2016-10-04 19:38:28.000000000 +0000 +++ condor-8.4.11~dfsg.1/src/condor_includes/condor_debug.h 2017-01-25 20:10:42.000000000 +0000 @@ -399,6 +399,12 @@ # endif #endif // REMIND +// disabled REMIND when building non-debug +#if defined NDEBUG && ! defined ENABLE_PRAGMA_REMIND +# undef PRAGMA_REMIND +# define PRAGMA_REMIND(str) +#endif + #if defined _MSC_VER && defined _DEBUG // WIN32 # ifdef _X86_ # define DEBUG_BREAK_INTO_DEBUGGER _asm {int 3} diff -Nru condor-8.4.9~dfsg.1/src/condor_includes/condor_system.h condor-8.4.11~dfsg.1/src/condor_includes/condor_system.h --- condor-8.4.9~dfsg.1/src/condor_includes/condor_system.h 2016-10-04 19:38:28.000000000 +0000 +++ condor-8.4.11~dfsg.1/src/condor_includes/condor_system.h 2017-01-25 20:10:42.000000000 +0000 @@ -248,6 +248,13 @@ #endif // !WIN32 +/* Declaration for Sleep(int milliseconds) in our util lib. Note + * we don't do this on Win32, since Sleep() is native on Win32. + */ +#ifndef WIN32 + unsigned int Sleep(unsigned int milliseconds); +#endif + /* This defines macros that can disable certain gcc warnings */ /* If not using gcc, macros are null defines */ #include "gcc_diag.h" diff -Nru condor-8.4.9~dfsg.1/src/condor_io/condor_auth_ssl.cpp condor-8.4.11~dfsg.1/src/condor_io/condor_auth_ssl.cpp --- condor-8.4.9~dfsg.1/src/condor_io/condor_auth_ssl.cpp 2016-10-04 19:38:28.000000000 +0000 +++ condor-8.4.11~dfsg.1/src/condor_io/condor_auth_ssl.cpp 2017-01-25 20:10:42.000000000 +0000 @@ -36,7 +36,9 @@ #endif // Symbols from libssl +#if OPENSSL_VERSION_NUMBER < 0x10100000L static long (*SSL_CTX_ctrl_ptr)(SSL_CTX *, int, long, void *) = NULL; +#endif static void (*SSL_CTX_free_ptr)(SSL_CTX *) = NULL; static int (*SSL_CTX_load_verify_locations_ptr)(SSL_CTX *, const char *, const char *) = NULL; #if OPENSSL_VERSION_NUMBER < 0x10000000L @@ -55,8 +57,12 @@ static int (*SSL_get_error_ptr)(const SSL *, int) = NULL; static X509 *(*SSL_get_peer_certificate_ptr)(const SSL *) = NULL; static long (*SSL_get_verify_result_ptr)(const SSL *) = NULL; +#if OPENSSL_VERSION_NUMBER < 0x10100000L static int (*SSL_library_init_ptr)() = NULL; static void (*SSL_load_error_strings_ptr)() = NULL; +#else +static int (*OPENSSL_init_ssl_ptr)(uint64_t, const OPENSSL_INIT_SETTINGS *) = NULL; +#endif static SSL *(*SSL_new_ptr)(SSL_CTX *) = NULL; static int (*SSL_read_ptr)(SSL *, void *, int) = NULL; static void (*SSL_set_bio_ptr)(SSL *, BIO *, BIO *) = NULL; @@ -79,7 +85,11 @@ Condor_Auth_SSL :: ~Condor_Auth_SSL() { +#if OPENSSL_VERSION_NUMBER < 0x10000000L ERR_remove_state( 0 ); +#elif OPENSSL_VERSION_NUMBER < 0x10100000L + ERR_remove_thread_state( 0 ); +#endif if(m_crypto) delete(m_crypto); } @@ -96,7 +106,9 @@ if ( Condor_Auth_Kerberos::Initialize() == false || (dl_hdl = dlopen(LIBSSL_SO, RTLD_LAZY)) == NULL || +#if OPENSSL_VERSION_NUMBER < 0x10100000L !(SSL_CTX_ctrl_ptr = (long (*)(SSL_CTX *, int, long, void *))dlsym(dl_hdl, "SSL_CTX_ctrl")) || +#endif !(SSL_CTX_free_ptr = (void (*)(SSL_CTX *))dlsym(dl_hdl, "SSL_CTX_free")) || !(SSL_CTX_load_verify_locations_ptr = (int (*)(SSL_CTX *, const char *, const char *))dlsym(dl_hdl, "SSL_CTX_load_verify_locations")) || #if OPENSSL_VERSION_NUMBER < 0x10000000L @@ -115,8 +127,12 @@ !(SSL_get_error_ptr = (int (*)(const SSL *, int))dlsym(dl_hdl, "SSL_get_error")) || !(SSL_get_peer_certificate_ptr = (X509 *(*)(const SSL *))dlsym(dl_hdl, "SSL_get_peer_certificate")) || !(SSL_get_verify_result_ptr = (long (*)(const SSL *))dlsym(dl_hdl, "SSL_get_verify_result")) || +#if OPENSSL_VERSION_NUMBER < 0x10100000L !(SSL_library_init_ptr = (int (*)())dlsym(dl_hdl, "SSL_library_init")) || !(SSL_load_error_strings_ptr = (void (*)())dlsym(dl_hdl, "SSL_load_error_strings")) || +#else + !(OPENSSL_init_ssl_ptr = (int (*)(uint64_t, const OPENSSL_INIT_SETTINGS *))dlsym(dl_hdl, "OPENSSL_init_ssl")) || +#endif !(SSL_new_ptr = (SSL *(*)(SSL_CTX *))dlsym(dl_hdl, "SSL_new")) || !(SSL_read_ptr = (int (*)(SSL *, void *, int))dlsym(dl_hdl, "SSL_read")) || !(SSL_set_bio_ptr = (void (*)(SSL *, BIO *, BIO *))dlsym(dl_hdl, "SSL_set_bio")) || @@ -141,7 +157,9 @@ m_initSuccess = true; } #else +#if OPENSSL_VERSION_NUMBER < 0x10100000L SSL_CTX_ctrl_ptr = SSL_CTX_ctrl; +#endif SSL_CTX_free_ptr = SSL_CTX_free; SSL_CTX_load_verify_locations_ptr = SSL_CTX_load_verify_locations; SSL_CTX_new_ptr = SSL_CTX_new; @@ -156,8 +174,12 @@ SSL_get_error_ptr = SSL_get_error; SSL_get_peer_certificate_ptr = SSL_get_peer_certificate; SSL_get_verify_result_ptr = SSL_get_verify_result; +#if OPENSSL_VERSION_NUMBER < 0x10100000L SSL_library_init_ptr = SSL_library_init; SSL_load_error_strings_ptr = SSL_load_error_strings; +#else + OPENSSL_init_ssl_ptr = OPENSSL_init_ssl; +#endif SSL_new_ptr = SSL_new; SSL_read_ptr = SSL_read; SSL_set_bio_ptr = SSL_set_bio; @@ -747,10 +769,17 @@ int Condor_Auth_SSL :: init_OpenSSL(void) { +#if OPENSSL_VERSION_NUMBER < 0x10100000L if (!(*SSL_library_init_ptr)()) { return AUTH_SSL_ERROR; } (*SSL_load_error_strings_ptr)(); +#else + if (!(*OPENSSL_init_ssl_ptr)(OPENSSL_INIT_LOAD_SSL_STRINGS \ + | OPENSSL_INIT_LOAD_CRYPTO_STRINGS, NULL)) { + return AUTH_SSL_ERROR; + } +#endif // seed_pnrg(); TODO: return AUTH_SSL_A_OK; } @@ -1125,9 +1154,11 @@ goto setup_server_ctx_err; } +#if OPENSSL_VERSION_NUMBER < 0x10100000L // disable SSLv2. it has vulnerabilities. //SSL_CTX_set_options( ctx, SSL_OP_NO_SSLv2 ); (*SSL_CTX_ctrl_ptr)( ctx, SSL_CTRL_OPTIONS, SSL_OP_NO_SSLv2, NULL ); +#endif if( (*SSL_CTX_load_verify_locations_ptr)( ctx, cafile, cadir ) != 1 ) { ouch( "Error loading CA file and/or directory\n" ); @@ -1147,8 +1178,10 @@ // TODO where's this? (*SSL_CTX_set_verify_ptr)( ctx, SSL_VERIFY_PEER, verify_callback ); (*SSL_CTX_set_verify_depth_ptr)( ctx, 4 ); // TODO arbitrary? +#if OPENSSL_VERSION_NUMBER < 0x10100000L //SSL_CTX_set_options( ctx, SSL_OP_ALL|SSL_OP_NO_SSLv2 ); (*SSL_CTX_ctrl_ptr)( ctx, SSL_CTRL_OPTIONS, SSL_OP_ALL|SSL_OP_NO_SSLv2, NULL ); +#endif if((*SSL_CTX_set_cipher_list_ptr)( ctx, cipherlist ) != 1 ) { ouch( "Error setting cipher list (no valid ciphers)\n" ); goto setup_server_ctx_err; diff -Nru condor-8.4.9~dfsg.1/src/condor_io/condor_crypt_3des.cpp condor-8.4.11~dfsg.1/src/condor_io/condor_crypt_3des.cpp --- condor-8.4.9~dfsg.1/src/condor_io/condor_crypt_3des.cpp 2016-10-04 19:38:28.000000000 +0000 +++ condor-8.4.11~dfsg.1/src/condor_io/condor_crypt_3des.cpp 2017-01-25 20:10:42.000000000 +0000 @@ -35,9 +35,9 @@ unsigned char * keyData = k.getPaddedKeyData(24); ASSERT(keyData); - des_set_key((des_cblock *) keyData , keySchedule1_); - des_set_key((des_cblock *) (keyData+8) , keySchedule2_); - des_set_key((des_cblock *) (keyData+16), keySchedule3_); + DES_set_key((DES_cblock *) keyData , &keySchedule1_); + DES_set_key((DES_cblock *) (keyData+8) , &keySchedule2_); + DES_set_key((DES_cblock *) (keyData+16), &keySchedule3_); // initialize ivsec resetState(); @@ -71,9 +71,9 @@ output = (unsigned char *) malloc(input_len); if (output) { - des_ede3_cfb64_encrypt(input, output, output_len, - keySchedule1_, keySchedule2_, keySchedule3_, - (des_cblock *)ivec_, &num_, DES_ENCRYPT); + DES_ede3_cfb64_encrypt(input, output, output_len, + &keySchedule1_, &keySchedule2_, &keySchedule3_, + (DES_cblock *)ivec_, &num_, DES_ENCRYPT); return true; } else { @@ -95,9 +95,9 @@ if (output) { output_len = input_len; - des_ede3_cfb64_encrypt(input, output, output_len, - keySchedule1_, keySchedule2_, keySchedule3_, - (des_cblock *)ivec_, &num_, DES_DECRYPT); + DES_ede3_cfb64_encrypt(input, output, output_len, + &keySchedule1_, &keySchedule2_, &keySchedule3_, + (DES_cblock *)ivec_, &num_, DES_DECRYPT); return true; // Should be changed } diff -Nru condor-8.4.9~dfsg.1/src/condor_negotiator.V6/matchmaker.h condor-8.4.11~dfsg.1/src/condor_negotiator.V6/matchmaker.h --- condor-8.4.9~dfsg.1/src/condor_negotiator.V6/matchmaker.h 2016-10-04 19:38:28.000000000 +0000 +++ condor-8.4.11~dfsg.1/src/condor_negotiator.V6/matchmaker.h 2017-01-25 20:10:42.000000000 +0000 @@ -413,7 +413,7 @@ double PostJobRankValue; double PreemptRankValue; PreemptState PreemptStateValue; - string DslotClaims; + MyString DslotClaims; ClassAd *ad; }; diff -Nru condor-8.4.9~dfsg.1/src/condor_release/README condor-8.4.11~dfsg.1/src/condor_release/README --- condor-8.4.9~dfsg.1/src/condor_release/README 2016-10-04 19:38:28.000000000 +0000 +++ condor-8.4.11~dfsg.1/src/condor_release/README 2017-01-25 20:10:42.000000000 +0000 @@ -10,6 +10,7 @@ the LICENSE-2.0.txt file README - this file bin - directory containing command-line tools +bosco_install - perl script to install Bosco condor_configure - perl script to install and configure Condor condor_install - perl script to install Condor etc - directory to contain configuration files diff -Nru condor-8.4.9~dfsg.1/src/condor_rmdir/bprint.h condor-8.4.11~dfsg.1/src/condor_rmdir/bprint.h --- condor-8.4.9~dfsg.1/src/condor_rmdir/bprint.h 2016-10-04 19:38:28.000000000 +0000 +++ condor-8.4.11~dfsg.1/src/condor_rmdir/bprint.h 2017-01-25 20:10:42.000000000 +0000 @@ -229,7 +229,7 @@ va_list va; va_start(va, pszFormat); - // stack useage > 4k generate a reference to __chkstk which libctiny doesn't have. + // stack usage > 4k generate a reference to __chkstk which libctiny doesn't have. #ifdef USE_LIBCTINY TCHAR wszFormat[2000]; #else @@ -419,7 +419,7 @@ va_list va; va_start(va, pszFormat); - // stack useage > 4k generate a reference to __chkstk which libctiny doesn't have. + // stack usage > 4k generate a reference to __chkstk which libctiny doesn't have. #ifdef USE_LIBCTINY TCHAR wszFormat[2000]; #else @@ -439,7 +439,7 @@ va_list va; va_start(va, pszFormat); - // stack useage > 4k generate a reference to __chkstk which libctiny doesn't have. + // stack usage > 4k generate a reference to __chkstk which libctiny doesn't have. #ifdef USE_LIBCTINY TCHAR wszFormat[2000]; #else diff -Nru condor-8.4.9~dfsg.1/src/condor_rmdir/main.cpp condor-8.4.11~dfsg.1/src/condor_rmdir/main.cpp --- condor-8.4.9~dfsg.1/src/condor_rmdir/main.cpp 2016-10-04 19:38:28.000000000 +0000 +++ condor-8.4.11~dfsg.1/src/condor_rmdir/main.cpp 2017-01-25 20:10:42.000000000 +0000 @@ -171,7 +171,7 @@ DWORD fNoUI : 1; DWORD fLogoCmd : 1; DWORD fExitWhenDone : 1; - DWORD fUseage : 1; + DWORD fUsage : 1; DWORD fVerbose : 1; DWORD fDiagnostic : 1; DWORD fPassOnExceptions : 1; @@ -214,8 +214,8 @@ typedef const struct _cmdtable { LPCTSTR pszName; CMDSWITCH cmd; // command and default params (if any) - LPCTSTR pszArgType; // used for useage - LPCTSTR pszUseage; // used for useage + LPCTSTR pszArgType; // used for usage + LPCTSTR pszUsage; // used for usage } CMDTABLE, * PCMDTABLE; #define CMDF_GLOBAL 1 // global option. @@ -251,7 +251,7 @@ #define APP_CMD_DEMO 4 // force demo mode #define APP_CMD_ARGFILE 5 // pull command line arguments from a file. #define APP_CMD_EXIT 6 -#define APP_CMD_USEAGE 7 +#define APP_CMD_USAGE 7 #define APP_CMD_VERBOSE 8 #define APP_CMD_DIAGNOSTIC 9 #define APP_CMD_PATH 10 @@ -270,8 +270,8 @@ // _UT("NOLOGO"), APP_CMD_NOLOGO, CMDF_GLOBAL, 0, NULL, NULL, _UT(""), // _UT("LOGO"), APP_CMD_LOGO, CMDF_GLOBAL, 0, NULL, NULL, _UT(""), - _UT("HELP"), APP_CMD_USEAGE, CMDF_GLOBAL, 0, NULL, NULL, _UT("Print useage"), - _UT("?"), APP_CMD_USEAGE, CMDF_GLOBAL, 0, NULL, NULL, _UT("Print useage"), + _UT("HELP"), APP_CMD_USAGE, CMDF_GLOBAL, 0, NULL, NULL, _UT("Print usage"), + _UT("?"), APP_CMD_USAGE, CMDF_GLOBAL, 0, NULL, NULL, _UT("Print usage"), _UT("VERBOSE"), APP_CMD_VERBOSE, CMDF_GLOBAL, 0, NULL, NULL, _UT("Print detailed output."), _UT("DIAGNOSTIC"), APP_CMD_DIAGNOSTIC, CMDF_GLOBAL, 0, NULL, NULL, _UT("Print out internal flow of control information."), _UT("PATH"), APP_CMD_PATH, CMDF_GLOBAL, 1, NULL, _UT("path"), _UT("delete "), @@ -435,7 +435,7 @@ if ((cmd.cParams > 0) && (NULL == cmd.pszParams)) { bprintfl("the %s argument requires parameters", pszArg); - g_app.fUseage = true; + g_app.fUsage = true; hr = E_INVALIDARG; goto bail; } @@ -629,8 +629,8 @@ g_app.fExitWhenDone = TRUE; break; - case APP_CMD_USEAGE: - g_app.fUseage = TRUE; + case APP_CMD_USAGE: + g_app.fUsage = TRUE; break; case APP_CMD_VERBOSE: @@ -866,20 +866,20 @@ { hr = App_ExecuteCommandLine (GetCommandLine(), TRUE); if (FAILED(hr)) - g_app.fUseage = TRUE; + g_app.fUsage = TRUE; } - if (g_app.fShowLogo || g_app.fUseage) + if (g_app.fShowLogo || g_app.fUsage) { LPCTSTR pszAppName = _pszModuleName; bprintfl("%s version 1.0.0 Built " __DATE__ __TIME__, pszAppName); } - if (g_app.fUseage) + if (g_app.fUsage) { LPCTSTR pszAppName = _pszModuleName; - bprintf("\nuseage: %s [/? | /HELP] [@{argfile}] [args] \n\n", pszAppName); + bprintf("\nusage: %s [/? | /HELP] [@{argfile}] [args] \n\n", pszAppName); bprintf(" remove directory , taking ownership and removing\n"); bprintf(" ACLs as necessary. Where [args] is one or more of\n\n"); @@ -899,7 +899,7 @@ pszCmd = szCmd; } bprintf(" /%-16s", pszCmd); - bprintf(" %s\n", pCmd->pszUseage); + bprintf(" %s\n", pCmd->pszUsage); } } diff -Nru condor-8.4.9~dfsg.1/src/condor_rm.V6/rm.cpp condor-8.4.11~dfsg.1/src/condor_rm.V6/rm.cpp --- condor-8.4.9~dfsg.1/src/condor_rm.V6/rm.cpp 2016-10-04 19:38:28.000000000 +0000 +++ condor-8.4.11~dfsg.1/src/condor_rm.V6/rm.cpp 2017-01-25 20:10:42.000000000 +0000 @@ -410,12 +410,39 @@ // We're done parsing args, now make sure we know how to // contact the schedd. - if( ! scheddAddr ) { + if (scheddAddr) { + schedd = new DCSchedd( scheddAddr ); + } else if (scheddName && ! pool) { + // if there was a name specified, we always want to look that up in the collector + // because SCHEDD_NAME and SCHEDD_ADDRESS_FILE don't necessary refer to the same schedd + // which the DCSchedd constructor doesn't handle correctly if there is no pool + CollectorList * colist = CollectorList::create(); + + // construct a query for the given schedd name + char *daemonname = get_daemon_name(scheddName); + if ( ! daemonname) { + fprintf( stderr, "Error: unknown schedd %s\n", get_host_part(scheddName)); + exit(1); + } + std::string constr(daemonname); constr.insert(0, ATTR_NAME " == \""); constr.append("\""); + delete[] daemonname; + CondorQuery query(SCHEDD_AD); + query.addORConstraint (constr.c_str()); + + ClassAdList schedList; + QueryResult qres = colist->query (query, schedList); + schedList.Rewind(); + ClassAd * schedAd = schedList.Next(); + if (qres != Q_OK || ! schedAd) { + fprintf( stderr, "Error: cannot get address of schedd %s\n", get_host_part(scheddName)); + exit(1); + } + + schedd = new DCSchedd(*schedAd, pool ? pool->addr() : NULL ); + } else { // This will always do the right thing, even if either or // both of scheddName or pool are NULL. schedd = new DCSchedd( scheddName, pool ? pool->addr() : NULL ); - } else { - schedd = new DCSchedd( scheddAddr ); } if( ! schedd->locate() ) { fprintf( stderr, "%s: %s\n", MyName, schedd->error() ); diff -Nru condor-8.4.9~dfsg.1/src/condor_schedd.V6/autocluster.cpp condor-8.4.11~dfsg.1/src/condor_schedd.V6/autocluster.cpp --- condor-8.4.9~dfsg.1/src/condor_schedd.V6/autocluster.cpp 2016-10-04 19:38:28.000000000 +0000 +++ condor-8.4.11~dfsg.1/src/condor_schedd.V6/autocluster.cpp 2017-01-25 20:10:42.000000000 +0000 @@ -355,6 +355,7 @@ bool sig_attrs_changed = false; char *new_sig_attrs = param ("SIGNIFICANT_ATTRIBUTES"); const std::string * attr; // used in various loops + std::string auto_target_attrs; // this is used when NULL is passed in and we want to fake up an "input" set of attrs dprintf(D_FULLDEBUG, "AutoCluster:config(%s) invoked\n", @@ -375,8 +376,44 @@ sig_attrs_changed = true; } sig_attrs_came_from_config_file = true; + } else if ( ! significant_target_attrs && significant_attrs) { + // in this case, we have an cached lifetime set of significant attributes, but have been called with NULL + // (this happens on reconfig). What we need to do here is check to see if one of the banned attrs + // is in the cache, and if so, arrange for the cache to be cleaned. + char * rm_attrs = param("REMOVE_SIGNIFICANT_ATTRIBUTES"); + if (rm_attrs) { + classad::References banned_attrs; + StringTokenIterator rt(rm_attrs); + while ((attr = rt.next_string())) { banned_attrs.insert(*attr); } + free(rm_attrs); + + bool cache_needs_cleaning = false; + + // determine if the current cached set of significant attrs contains a banned attr + // and if it does, set the cache_needs_cleaning flag + StringTokenIterator it(significant_attrs); + while ((attr = it.next_string())) { + if (banned_attrs.find(*attr) != banned_attrs.end()) { + cache_needs_cleaning = true; + break; + } + } + + // if we need to clean banned attrs out of the cached significant attributues + // we will do that by copying the cache to a temp variable and pretending that it is the input list + // Then we delete the cache and fall down into the code below that will adjust the input list + // and merge it into the (now empty) cache. + if (cache_needs_cleaning) { + auto_target_attrs = significant_attrs; + significant_target_attrs = auto_target_attrs.c_str(); + // delete the cache + free(const_cast(significant_attrs)); + significant_attrs = NULL; + } + } } + // Always use what the user specifies in the config file. // If the user did not specify anything, then we want to use // the significant attrs passed to us (that likely originated diff -Nru condor-8.4.9~dfsg.1/src/condor_schedd.V6/history_helper.cpp condor-8.4.11~dfsg.1/src/condor_schedd.V6/history_helper.cpp --- condor-8.4.9~dfsg.1/src/condor_schedd.V6/history_helper.cpp 2016-10-04 19:38:28.000000000 +0000 +++ condor-8.4.11~dfsg.1/src/condor_schedd.V6/history_helper.cpp 2017-01-25 20:10:42.000000000 +0000 @@ -156,6 +156,8 @@ void main_init(int argc, char *argv[]) { + daemonCore->Forked_Child_Wants_Fast_Exit(true); + int i=0; for (char **ptr = argv + 1; *ptr && (i < argc - 1); ptr++,i++) { if(ptr[0][0] == '-' && (ptr[0][1] == 'f' || ptr[0][1] == 't')) { diff -Nru condor-8.4.9~dfsg.1/src/condor_schedd.V6/qmgmt.cpp condor-8.4.11~dfsg.1/src/condor_schedd.V6/qmgmt.cpp --- condor-8.4.9~dfsg.1/src/condor_schedd.V6/qmgmt.cpp 2016-10-04 19:38:28.000000000 +0000 +++ condor-8.4.11~dfsg.1/src/condor_schedd.V6/qmgmt.cpp 2017-01-25 20:10:42.000000000 +0000 @@ -2046,8 +2046,8 @@ } else { const OwnerData * ownerData = scheduler.insert_owner_const( owner ); ASSERT( ownerData != NULL ); - int ownerJobCount = ownerData->num.JobsCounted - + ownerData->num.JobsRecentlyAdded + int ownerJobCount = ownerData->owner_num.JobsCounted + + ownerData->owner_num.JobsRecentlyAdded + jobs_added_this_transaction; int maxJobsPerOwner = scheduler.getMaxJobsPerOwner(); diff -Nru condor-8.4.9~dfsg.1/src/condor_schedd.V6/schedd.cpp condor-8.4.11~dfsg.1/src/condor_schedd.V6/schedd.cpp --- condor-8.4.9~dfsg.1/src/condor_schedd.V6/schedd.cpp 2016-10-04 19:38:28.000000000 +0000 +++ condor-8.4.11~dfsg.1/src/condor_schedd.V6/schedd.cpp 2017-01-25 20:10:42.000000000 +0000 @@ -576,8 +576,8 @@ stop_job_queue( "stop_job_queue" ), act_on_job_myself_queue( "act_on_job_myself_queue" ), job_is_finished_queue( "job_is_finished_queue", 1 ), - slotWeight(0), - slotWeightMapAd(0), + slotWeightOfJob(0), + slotWeightGuessAd(0), m_use_slot_weights(false), m_local_startd_pid(-1), m_history_helper_count(0) @@ -993,7 +993,7 @@ Scheduler::fill_submitter_ad(ClassAd & pAd, const OwnerData & Owner, int flock_level, int dprint_level) { const bool publish_stats_to_flockers = false; - const OwnerCounters & Counters = Owner.num; + const SubmitterCounters & Counters = Owner.num; const bool want_dprintf = IsDebugCatAndVerbosity(dprint_level); // dprintf if not flocking if (Owner.FlockLevel >= flock_level) { @@ -1186,7 +1186,8 @@ for (OwnerDataMap::iterator it = Owners.begin(); it != Owners.end(); ++it) { OwnerData & Owner = it->second; - Owner.num.clear_job_counters(); // clear the jobs counters (including recently added) + Owner.num.clear_job_counters(); // clear the jobs counters + Owner.owner_num.clear_counters(); // clear per-owner job counters (including recently added) Owner.PrioSet.clear(); } @@ -1197,7 +1198,7 @@ dedicated_scheduler.clearDedicatedClusters(); // inserts/finds an entry in Owners for each job - // updates OwnerCounters: Hits, JobsIdle, WeightedJobsIdle & JobsHeld + // updates SubmitterCounters: Hits, JobsIdle, WeightedJobsIdle & JobsHeld WalkJobQueue(count_a_job); if( dedicated_scheduler.hasDedicatedClusters() ) { @@ -2304,31 +2305,35 @@ // machine may be null ClassAd *machine = mrec->my_match_ad; int job_weight = 1; - if (m_use_slot_weights && slotWeight && machine) { + if (m_use_slot_weights && machine) { // if the schedd slot weight expression is set and parses, // evaluate it here - classad::Value result; - int rval = EvalExprTree( slotWeight, machine, NULL, result ); - if( !rval || !result.IsNumber(job_weight)) { - job_weight = 1; + double weight = 1; + if ( ! machine->LookupFloat(ATTR_SLOT_WEIGHT, weight)) { + weight = 1; } + // PRAGMA_REMIND("TJ: fix slot weight code to use double, not int") + job_weight = (int)(weight + 0.0001); } else { // slot weight isn't set, fall back to assuming cpus if (machine) { if(0 == machine->LookupInteger(ATTR_CPUS, job_weight)) { job_weight = 1; // or fall back to one if CPUS isn't in the startds } - } else { + } else if (scheduler.m_use_slot_weights) { // machine == NULL, this happens on schedd restart and reconnect // calculate using request_* attributes, as we do with idle - ClassAd *job = GetJobAd(mrec->cluster, mrec->proc); - + JobQueueJob *job = GetJobAd(mrec->cluster, mrec->proc); if (job) { - classad::Value result; - int rval = EvalExprTree( scheduler.slotWeight, scheduler.slotWeightMapAd, job, result ); + if (scheduler.slotWeightOfJob) { + classad::Value result; + int rval = EvalExprTree( scheduler.slotWeightOfJob, job, NULL, result ); - if( !rval || !result.IsNumber(job_weight)) { - job_weight = 1; // Fall back if it doesn't eval + if( !rval || !result.IsNumber(job_weight)) { + job_weight = 1; // Fall back if it doesn't eval + } + } else { + job_weight = scheduler.guessJobSlotWeight(job); } } } @@ -2337,6 +2342,68 @@ return job_weight; } +// when there is no SCHEDD_SLOT_WIEGHT expression, try and guess the job weight +// by building a fake STARTD ad and evaluating the startd's SLOT_WEIGHT expression +// +int Scheduler::guessJobSlotWeight(JobQueueJob * job) +{ + static bool failed_to_init_slot_weight_map_ad = false; + if ( ! this->slotWeightGuessAd) { + ClassAd * ad = new ClassAd(); + failed_to_init_slot_weight_map_ad = false; + this->slotWeightGuessAd = ad; + + auto_free_ptr sw(param("SLOT_WEIGHT")); + if ( ! sw || ! ad || ! ad->AssignExpr(ATTR_SLOT_WEIGHT, sw)) { + failed_to_init_slot_weight_map_ad = true; + dprintf(D_ALWAYS, "Failed to create slotWeightGuessAd SLOT_WEIGHT = %s\n", sw ? sw.ptr() : "NULL"); + } else { + ad->Assign(ATTR_CPUS, 1); + ad->Assign(ATTR_MEMORY, 1024); + ad->Assign(ATTR_DISK, 1024); + dprintf(D_ALWAYS, "Creating slotWeightGuessAd as:\n"); + dPrintAd(D_ALWAYS, *ad, false); + } + } + + // If no SCHEDD_SLOT_WEIGHT, then push RequestCpus, RequestMemory & RequestDisk + // into our slotWeightGuessAd as Cpus, Memory & Disk and then evaluate SlotWeight + // This is wrong in general, but will work in the most common case of setting + // slot weight to Memory or Cpus + Memory/1024. That is, it will work if + // the job has constants for RequestCpus & RequestMemory. + + // If the job doesn't have constants, then this code most likely undercounts + // the job slot weight, so hopefully we can do away with this in the future + // + int req_cpus; + if ( ! job->LookupInteger(ATTR_REQUEST_CPUS, req_cpus)) { + req_cpus = 1; + } + if (failed_to_init_slot_weight_map_ad) { + return req_cpus; + } + ClassAd * ad = this->slotWeightGuessAd; + + long long req_mem = (long long)req_cpus * 1024; + long long req_disk = (long long)req_cpus * 1024; + if ( ! job->LookupInteger(ATTR_REQUEST_MEMORY, req_mem)) { + req_mem = req_cpus * 1024; + } + if ( ! job->LookupInteger(ATTR_REQUEST_DISK, req_disk)) { + req_disk = req_cpus * 1024; + } + + ad->Assign(ATTR_CPUS, req_cpus); + ad->Assign(ATTR_MEMORY, req_mem); + ad->Assign(ATTR_DISK, req_disk); + + int job_weight = req_cpus; + if ( ! ad->LookupInteger(ATTR_SLOT_WEIGHT, job_weight)) { + job_weight = req_cpus; + } + return job_weight; +} + int count_a_job(JobQueueJob* job, const JOB_ID_KEY& /*jid*/, void*) { @@ -2492,15 +2559,25 @@ // insert owner even if REMOVED or HELD for condor_q -{global|sub} // this function makes its own copies of the memory passed in OwnerData * Owner = scheduler.insert_owner(owner); - OwnerCounters * Counters = &Owner->num; + SubmitterCounters * Counters = &Owner->num; + + RealOwnerCounters * RealOwnerCounts = &Owner->owner_num; + if (owner != real_owner) { + OwnerData * RealOwner = scheduler.insert_owner(real_owner.c_str()); + RealOwner->LastHitTime = now; + RealOwnerCounts = &RealOwner->owner_num; + } Counters->Hits += 1; Owner->LastHitTime = now; // Hits also counts matchrecs, which aren't jobs. Counters->JobsCounted += 1; + RealOwnerCounts->JobsCounted += 1; // This way we know we aren't resetting unless we've actually counted // something during a sweep. - Counters->JobsRecentlyAdded = 0; + //Counters->JobsRecentlyAdded = 0; + RealOwnerCounts->JobsRecentlyAdded = 0; + if ( (universe != CONDOR_UNIVERSE_GRID) && // handle Globus below... (!service_this_universe(universe,job)) ) @@ -2619,18 +2696,21 @@ // If we're biasing by slot weight, and the job is idle, and everything parsed... - if ((scheduler.m_use_slot_weights) && (cur_hosts == 0) && scheduler.slotWeightMapAd) { - - // if we're biasing idle jobs by SLOT_WEIGHT, eval that here - int job_weight; - classad::Value result; - int rval = EvalExprTree( scheduler.slotWeight, scheduler.slotWeightMapAd, job, result ); - - if( !rval || !result.IsNumber(job_weight)) { - job_weight = request_cpus * (max_hosts - cur_hosts); // fall back if slot weight doesn't evaluate + if (scheduler.m_use_slot_weights && (max_hosts > cur_hosts)) { + // if we're biasing idle jobs by SCHEDD_SLOT_WEIGHT, eval that here + int job_weight = request_cpus; + if (scheduler.slotWeightOfJob) { + classad::Value value; + int rval = EvalExprTree(scheduler.slotWeightOfJob, job, NULL, value); + if ( ! rval || ! value.IsNumber(job_weight)) { + job_weight = request_cpus; // fall back if slot weight doesn't evaluate + } + } else { + job_weight = scheduler.guessJobSlotWeight(job); } - Counters->WeightedJobsIdle += job_weight; + Counters->WeightedJobsIdle += job_weight * (max_hosts - cur_hosts); } else { + // here: either max_hosts == cur_hosts || !scheduler.m_use_slot_weights Counters->WeightedJobsIdle += request_cpus * (max_hosts - cur_hosts); } @@ -2727,7 +2807,7 @@ Scheduler::incrementRecentlyAdded(const char * owner) { OwnerData * ownerData = insert_owner( owner ); - ++(ownerData->num.JobsRecentlyAdded); + ownerData->owner_num.JobsRecentlyAdded += 1; } const OwnerData * @@ -12291,25 +12371,47 @@ m_userlog_file_cache_max = param_integer("USERLOG_FILE_CACHE_MAX", 0, 0); m_userlog_file_cache_clear_interval = param_integer("USERLOG_FILE_CACHE_CLEAR_INTERVAL", 60, 0); - char *sw = param("SLOT_WEIGHT"); + if (slotWeightOfJob) { + delete slotWeightOfJob; + slotWeightOfJob = NULL; + } + if (slotWeightGuessAd) { + delete slotWeightGuessAd; + slotWeightGuessAd = NULL; + // we will re-create this when/if we need it. + } + m_use_slot_weights = param_boolean("SCHEDD_USE_SLOT_WEIGHT", true); + + char *sw = param("SCHEDD_SLOT_WEIGHT"); if (sw) { - if (slotWeight) { - delete slotWeight; + ParseClassAdRvalExpr(sw, slotWeightOfJob); + + if (m_use_slot_weights && slotWeightOfJob) { + // Check for Cpus, Disk or Memory references in the SCHEDD_SLOT_WEIGHT expression + ClassAd ad; + classad::References refs; + ad.GetExternalReferences(slotWeightOfJob, refs, false); + if (refs.find(ATTR_CPUS) != refs.end() || + refs.find(ATTR_DISK) != refs.end() || + refs.find(ATTR_MEMORY) != refs.end() || + refs.find("TARGET") != refs.end()) { + dprintf(D_ALWAYS, "Warning: the SCHEDD_SLOT_WEIGHT expression '%s' refers to TARGET, Cpus, Disk or Memory. It must refer only to job attributes like RequestCpus\n", sw); + } } - ParseClassAdRvalExpr(sw, slotWeight); free(sw); + } else { + // special case for trival slot SLOT_WEIGHT expressions. create a SCHEDD_SLOT_WEIGHT on the fly + sw = param("SLOT_WEIGHT"); + if (sw) { + if (MATCH == strcasecmp(sw, "Cpus")) { + ParseClassAdRvalExpr("RequestCpus", slotWeightOfJob); + } else if (MATCH == strcasecmp(sw, "Memory")) { + ParseClassAdRvalExpr("RequestMemory", slotWeightOfJob); + } + free(sw); + } } - if (slotWeightMapAd) { - delete slotWeightMapAd; - slotWeightMapAd = 0; - } - m_use_slot_weights = param_boolean("SCHEDD_USE_SLOT_WEIGHT", true); - - std::string sswma = "Memory = RequestMemory \n Disk = RequestDisk \n Cpus = RequestCpus"; - slotWeightMapAd = new ClassAd; - slotWeightMapAd->initFromString(sswma.c_str()); - // // Handle submit requirements. // diff -Nru condor-8.4.9~dfsg.1/src/condor_schedd.V6/schedd_negotiate.cpp condor-8.4.11~dfsg.1/src/condor_schedd.V6/schedd_negotiate.cpp --- condor-8.4.9~dfsg.1/src/condor_schedd.V6/schedd_negotiate.cpp 2016-10-04 19:38:28.000000000 +0000 +++ condor-8.4.11~dfsg.1/src/condor_schedd.V6/schedd_negotiate.cpp 2017-01-25 20:10:42.000000000 +0000 @@ -622,6 +622,8 @@ if (space != std::string::npos) { m_extra_claims = m_claim_id.substr(space + 1, std::string::npos); m_claim_id = m_claim_id.substr(0, space); + } else { + m_extra_claims.clear(); } m_match_ad.Clear(); diff -Nru condor-8.4.9~dfsg.1/src/condor_schedd.V6/scheduler.h condor-8.4.11~dfsg.1/src/condor_schedd.V6/scheduler.h --- condor-8.4.9~dfsg.1/src/condor_schedd.V6/scheduler.h 2016-10-04 19:38:28.000000000 +0000 +++ condor-8.4.11~dfsg.1/src/condor_schedd.V6/scheduler.h 2017-01-25 20:10:42.000000000 +0000 @@ -118,8 +118,18 @@ ~shadow_rec(); }; +struct RealOwnerCounters { + int JobsCounted; // smaller than Hits by the number of match recs for this Owner. + int JobsRecentlyAdded; // zeroed on each sweep, incremented on submission. + void clear_counters() { memset(this, 0, sizeof(*this)); } + RealOwnerCounters() + : JobsCounted(0) + , JobsRecentlyAdded(0) + {} +}; + // counters within the OwnerData struct that are cleared and re-computed by count_jobs. -struct OwnerCounters { +struct SubmitterCounters { int JobsRunning; int JobsIdle; int WeightedJobsRunning; @@ -130,9 +140,9 @@ int WeightedJobsFlockedHere; // volatile field use to hold the JobsRunning calculation when sending submitter adds to flock collectors int Hits; // used in the mark/sweep algorithm of count_jobs to detect Owners that no longer have any jobs in the queue. int JobsCounted; // smaller than Hits by the number of match recs for this Owner. - int JobsRecentlyAdded; // zeroed on each sweep, incremented on submission. +// int JobsRecentlyAdded; // zeroed on each sweep, incremented on submission. void clear_job_counters() { memset(this, 0, sizeof(*this)); } - OwnerCounters() + SubmitterCounters() : JobsRunning(0) , JobsIdle(0) , WeightedJobsRunning(0) @@ -142,17 +152,22 @@ , JobsFlockedHere(0) , Hits(0) , JobsCounted(0) - , JobsRecentlyAdded(0) +// , JobsRecentlyAdded(0) {} }; #define USE_OWNERDATA_MAP 1 +// The schedd will have one of these records for each OWNER, and ALSO one for each SUBMITTER +// When jobs are nice, or when the have an AccountingGroup attribute, the owner and the submitter +// for the job will be different. Some parts of the Schedd do lookup by OWNER attribute +// but most parts, (especially count_jobs) do lookup by submitter name. struct OwnerData { std::string name; const char * Name() const { return name.empty() ? "" : name.c_str(); } bool empty() const { return name.empty(); } - OwnerCounters num; + SubmitterCounters num; + RealOwnerCounters owner_num; // counts by OWNER rather than by submitter time_t LastHitTime; // records the last time we incremented num.Hit, use to expire Owners // Time of most recent change in flocking level or // successful negotiation at highest current flocking @@ -730,8 +745,8 @@ struct sockaddr_in From; int Len; - ExprTree* slotWeight; - ClassAd* slotWeightMapAd; + ExprTree* slotWeightOfJob; + ClassAd * slotWeightGuessAd; bool m_use_slot_weights; // utility functions @@ -761,6 +776,7 @@ void noShadowForJob( shadow_rec* srec, NoShadowFailure_t why ); bool jobExitCode( PROC_ID job_id, int exit_code ); int calcSlotWeight(match_rec *mrec); + int guessJobSlotWeight(JobQueueJob * job); // ----------------------------------------------- // CronTab Jobs diff -Nru condor-8.4.9~dfsg.1/src/condor_shadow.std/shadow.cpp condor-8.4.11~dfsg.1/src/condor_shadow.std/shadow.cpp --- condor-8.4.9~dfsg.1/src/condor_shadow.std/shadow.cpp 2016-10-04 19:38:28.000000000 +0000 +++ condor-8.4.11~dfsg.1/src/condor_shadow.std/shadow.cpp 2017-01-25 20:10:42.000000000 +0000 @@ -1523,7 +1523,7 @@ void handle_sigquit( int /*unused*/ ) { - dprintf( D_ALWAYS, "Shadow recieved SIGQUIT (fast shutdown)\n" ); + dprintf( D_ALWAYS, "Shadow received SIGQUIT (fast shutdown)\n" ); check_static_policy = 0; send_quit( ExecutingHost, GlobalCap ); } @@ -1537,7 +1537,7 @@ void handle_sigterm( int /*unused*/ ) { - dprintf( D_ALWAYS, "Shadow recieved SIGTERM (graceful shutdown)\n" ); + dprintf( D_ALWAYS, "Shadow received SIGTERM (graceful shutdown)\n" ); check_static_policy = 0; send_vacate( ExecutingHost, GlobalCap ); } diff -Nru condor-8.4.9~dfsg.1/src/condor_shadow.V6.1/pseudo_ops.cpp condor-8.4.11~dfsg.1/src/condor_shadow.V6.1/pseudo_ops.cpp --- condor-8.4.9~dfsg.1/src/condor_shadow.V6.1/pseudo_ops.cpp 2016-10-04 19:38:28.000000000 +0000 +++ condor-8.4.11~dfsg.1/src/condor_shadow.V6.1/pseudo_ops.cpp 2017-01-25 20:10:42.000000000 +0000 @@ -234,7 +234,7 @@ return -1; } if( ! Shadow->setMpiMasterInfo(addr) ) { - dprintf( D_ALWAYS, "ERROR: recieved " + dprintf( D_ALWAYS, "ERROR: received " "pseudo_register_mpi_master_info for a non-MPI job!\n" ); return -1; } diff -Nru condor-8.4.9~dfsg.1/src/condor_startd.V6/startd_cron_job.cpp condor-8.4.11~dfsg.1/src/condor_startd.V6/startd_cron_job.cpp --- condor-8.4.9~dfsg.1/src/condor_startd.V6/startd_cron_job.cpp 2016-10-04 19:38:28.000000000 +0000 +++ condor-8.4.11~dfsg.1/src/condor_startd.V6/startd_cron_job.cpp 2017-01-25 20:10:42.000000000 +0000 @@ -147,6 +147,14 @@ if( wants_update ) { resmgr->update_all(); } + + // Update our internal (policy) ads immediately. Otherwise, this cron + // job's output won't effect anything until the next UPDATE_INTERVAL. + // The flag argument must be at least A_PUBLIC | A_UPDATE to pass the + // check in ResMgr::adlist_publish(), which is the (only) update we + // actually want. (We can't call it directly, because we need to + // update the internal ad for each Resource.) + resmgr->walk( &Resource::refresh_classad, A_PUBLIC | A_UPDATE ); return rval; } diff -Nru condor-8.4.9~dfsg.1/src/condor_starter.V6.1/baseStarter.cpp condor-8.4.11~dfsg.1/src/condor_starter.V6.1/baseStarter.cpp --- condor-8.4.9~dfsg.1/src/condor_starter.V6.1/baseStarter.cpp 2016-10-04 19:38:28.000000000 +0000 +++ condor-8.4.11~dfsg.1/src/condor_starter.V6.1/baseStarter.cpp 2017-01-25 20:10:42.000000000 +0000 @@ -88,6 +88,7 @@ m_job_environment_is_ready = false; m_all_jobs_done = false; m_deferred_job_update = false; + m_shutdown_exit_code = STARTER_EXIT_NORMAL; } @@ -266,6 +267,9 @@ exitAfterGlexec( code ); } #endif + // Once libc starts calling global destructors, we can't reliably + // notify anyone of an EXCEPT(). + _EXCEPT_Cleanup = NULL; DC_Exit( code ); } @@ -2574,7 +2578,7 @@ // // We set a flag to let us know that if any other - // job tries to start after we recieved this Suspend call + // job tries to start after we received this Suspend call // then they should also be suspended. // This can happen if a job was being deferred and when // the timer triggers we don't want to let it execute @@ -2817,7 +2821,7 @@ if ( ShuttingDown && (all_jobs - handled_jobs == 0) ) { dprintf(D_ALWAYS,"Last process exited, now Starter is exiting\n"); - StarterExit(STARTER_EXIT_NORMAL); + StarterExit(GetShutdownExitCode()); } return 0; @@ -3586,6 +3590,18 @@ } #endif +#if defined(LINUX) + if (glexecPrivSepHelper() != NULL && m_job_environment_is_ready == true && + m_all_jobs_done == false) { + + PrivSepError err; + if( !m_privsep_helper->chown_sandbox_to_condor(err) ) { + dprintf(D_ALWAYS, "Failed to chown glexec sandbox to condor on shutdown\n"); + return false; + } + } +#endif + // Remove the directory from all possible chroots. pair_strings_vector root_dirs = root_dir_list(); bool has_failed = false; diff -Nru condor-8.4.9~dfsg.1/src/condor_starter.V6.1/jic_local_schedd.cpp condor-8.4.11~dfsg.1/src/condor_starter.V6.1/jic_local_schedd.cpp --- condor-8.4.9~dfsg.1/src/condor_starter.V6.1/jic_local_schedd.cpp 2016-10-04 19:38:28.000000000 +0000 +++ condor-8.4.11~dfsg.1/src/condor_starter.V6.1/jic_local_schedd.cpp 2017-01-25 20:10:42.000000000 +0000 @@ -502,8 +502,7 @@ job_ad->Assign( ATTR_HOLD_REASON_CODE, CONDOR_HOLD_CODE_UnableToInitUserLog ); job_ad->Assign( ATTR_HOLD_REASON_SUBCODE, 0 ); job_updater->updateJob(U_HOLD); - Starter->FinalCleanup(); - DC_Exit(JOB_SHOULD_HOLD); + Starter->StarterExit(JOB_SHOULD_HOLD); } return true; } diff -Nru condor-8.4.9~dfsg.1/src/condor_starter.V6.1/jic_shadow.cpp condor-8.4.11~dfsg.1/src/condor_starter.V6.1/jic_shadow.cpp --- condor-8.4.9~dfsg.1/src/condor_starter.V6.1/jic_shadow.cpp 2016-10-04 19:38:28.000000000 +0000 +++ condor-8.4.11~dfsg.1/src/condor_starter.V6.1/jic_shadow.cpp 2017-01-25 20:10:42.000000000 +0000 @@ -2248,9 +2248,11 @@ ASSERT( !syscall_sock->is_connected() ); } - // Exit telling the startd we lost the shadow, which - // will normally result in the This does not return. - Starter->StarterExit(STARTER_EXIT_LOST_SHADOW_CONNECTION); + // Exit telling the startd we lost the shadow + Starter->SetShutdownExitCode(STARTER_EXIT_LOST_SHADOW_CONNECTION); + if ( Starter->RemoteShutdownFast(0) ) { + Starter->StarterExit( Starter->GetShutdownExitCode() ); + } } bool diff -Nru condor-8.4.9~dfsg.1/src/condor_starter.V6.1/job_info_communicator.h condor-8.4.11~dfsg.1/src/condor_starter.V6.1/job_info_communicator.h --- condor-8.4.9~dfsg.1/src/condor_starter.V6.1/job_info_communicator.h 2016-10-04 19:38:28.000000000 +0000 +++ condor-8.4.11~dfsg.1/src/condor_starter.V6.1/job_info_communicator.h 2017-01-25 20:10:42.000000000 +0000 @@ -34,7 +34,7 @@ /** This class is a base class for the various ways a starter can - recieve and send information about the underlying job. For now, + receive and send information about the underlying job. For now, there are two main ways to do this: 1) to talk to a condor_shadow and 2) the local filesystem, command line args, etc. */ diff -Nru condor-8.4.9~dfsg.1/src/condor_starter.V6.1/starter.h condor-8.4.11~dfsg.1/src/condor_starter.V6.1/starter.h --- condor-8.4.9~dfsg.1/src/condor_starter.V6.1/starter.h 2016-10-04 19:38:28.000000000 +0000 +++ condor-8.4.11~dfsg.1/src/condor_starter.V6.1/starter.h 2017-01-25 20:10:42.000000000 +0000 @@ -297,6 +297,9 @@ } #endif + int GetShutdownExitCode() { return m_shutdown_exit_code; }; + void SetShutdownExitCode( int code ) { m_shutdown_exit_code = code; }; + protected: List m_job_list; List m_reaped_job_list; @@ -396,6 +399,10 @@ // true if allJobsDone() has been called bool m_all_jobs_done; + + // When doing a ShutdownFast or ShutdownGraceful, what should the + // starter's exit code be? + int m_shutdown_exit_code; }; #endif diff -Nru condor-8.4.9~dfsg.1/src/condor_starter.V6.1/starter_v61_main.cpp condor-8.4.11~dfsg.1/src/condor_starter.V6.1/starter_v61_main.cpp --- condor-8.4.9~dfsg.1/src/condor_starter.V6.1/starter_v61_main.cpp 2016-10-04 19:38:28.000000000 +0000 +++ condor-8.4.11~dfsg.1/src/condor_starter.V6.1/starter_v61_main.cpp 2017-01-25 20:10:42.000000000 +0000 @@ -748,7 +748,7 @@ if ( Starter->RemoteShutdownFast(0) ) { // ShutdownFast says it is already finished, because there are // no jobs to shutdown. No need to stick around. - Starter->StarterExit(STARTER_EXIT_NORMAL); + Starter->StarterExit(Starter->GetShutdownExitCode()); } } @@ -759,7 +759,7 @@ if ( Starter->RemoteShutdownGraceful(0) ) { // ShutdownGraceful says it is already finished, because // there are no jobs to shutdown. No need to stick around. - Starter->StarterExit(STARTER_EXIT_NORMAL); + Starter->StarterExit(Starter->GetShutdownExitCode()); } } diff -Nru condor-8.4.9~dfsg.1/src/condor_starter.V6.1/vanilla_proc.cpp condor-8.4.11~dfsg.1/src/condor_starter.V6.1/vanilla_proc.cpp --- condor-8.4.9~dfsg.1/src/condor_starter.V6.1/vanilla_proc.cpp 2016-10-04 19:38:28.000000000 +0000 +++ condor-8.4.11~dfsg.1/src/condor_starter.V6.1/vanilla_proc.cpp 2017-01-25 20:10:42.000000000 +0000 @@ -1008,6 +1008,7 @@ */ // If we have no jobs left, prolly just cgroup removed, so do nothing and return + if (num_pids == 0) { dprintf(D_FULLDEBUG, "Closing event FD pipe %d.\n", m_oom_efd); cleanupOOM(); @@ -1022,6 +1023,33 @@ PublishUpdateAd( &updateAd ); Starter->jic->periodicJobUpdate( &updateAd, true ); + // +#ifdef LINUX + if (param_boolean("IGNORE_LEAF_OOM", false)) { + // if memory.use_hierarchy is 1, then hitting the limit at + // the parent notifies all children, even if those children + // are below their usage. If we are below our usage, ignore + // the OOM, and continue running. Hopefully, some process + // will be killed, and when it does, this job will get unfrozen + // and continue running. + + int usage; + updateAd.LookupInteger(ATTR_MEMORY_USAGE, usage); + + if (usage < (0.9 * m_memory_limit)) { + long long oomData = 0xdeadbeef; + int efd; + daemonCore->Get_Pipe_FD(m_oom_efd, &efd); + // need to drain notification fd, or it will still + // be hot, and we'll come right back here again + int r = read(efd, &oomData, 8); + + dprintf(D_ALWAYS, "Spurious OOM event, usage is %d, slot size is %d megabytes, ignoring OOM (read %d bytes)\n", usage, m_memory_limit, r); + return 0; + } + } +#endif + std::stringstream ss; if (m_memory_limit >= 0) { ss << "Job has gone over memory limit of " << m_memory_limit << " megabytes."; @@ -1246,7 +1274,7 @@ m_oom_efd = pipes[0]; m_oom_efd2 = pipes[1]; - // Inform DC we want to recieve notifications from this FD. + // Inform DC we want to receive notifications from this FD. if (-1 == daemonCore->Register_Pipe(pipes[0],"OOM event fd", static_cast(&VanillaProc::outOfMemoryEvent),"OOM Event Handler",this,HANDLE_READ)) { dprintf(D_ALWAYS, "Failed to register OOM event FD pipe.\n"); diff -Nru condor-8.4.9~dfsg.1/src/condor_starter.V6.1/vanilla_proc.h condor-8.4.11~dfsg.1/src/condor_starter.V6.1/vanilla_proc.h --- condor-8.4.9~dfsg.1/src/condor_starter.V6.1/vanilla_proc.h 2016-10-04 19:38:28.000000000 +0000 +++ condor-8.4.11~dfsg.1/src/condor_starter.V6.1/vanilla_proc.h 2017-01-25 20:10:42.000000000 +0000 @@ -124,7 +124,7 @@ // Configure OOM killer for this job int m_memory_limit; // Memory limit, in MB. - int m_oom_fd; // The file descriptor which recieves events + int m_oom_fd; // The file descriptor which receives events int m_oom_efd; // The event FD "pipe" to watch int m_oom_efd2; // The other end of m_oom_efd. diff -Nru condor-8.4.9~dfsg.1/src/condor_submit.V6/submit.cpp condor-8.4.11~dfsg.1/src/condor_submit.V6/submit.cpp --- condor-8.4.9~dfsg.1/src/condor_submit.V6/submit.cpp 2016-10-04 19:38:28.000000000 +0000 +++ condor-8.4.11~dfsg.1/src/condor_submit.V6/submit.cpp 2017-01-25 20:10:42.000000000 +0000 @@ -5573,10 +5573,11 @@ *p && *q; ++p, ++q) { char *ulog_entry = condor_param( *p, *q ); - if(ulog_entry) { + if ( ulog_entry && strcmp( ulog_entry, "" ) != 0 ) { std::string buffer; - std::string current_userlog(ulog_entry); - const char* ulog_pcc = full_path(current_userlog.c_str()); + // Note: I don't think the return value here can ever + // be NULL. wenger 2016-10-04 + const char* ulog_pcc = full_path( ulog_entry ); if(ulog_pcc) { std::string ulog(ulog_pcc); if ( !DumpClassAdToFile && !DashDryRun ) { diff -Nru condor-8.4.9~dfsg.1/src/condor_sysapi/CMakeLists.txt condor-8.4.11~dfsg.1/src/condor_sysapi/CMakeLists.txt --- condor-8.4.9~dfsg.1/src/condor_sysapi/CMakeLists.txt 2016-10-04 19:38:28.000000000 +0000 +++ condor-8.4.11~dfsg.1/src/condor_sysapi/CMakeLists.txt 2017-01-25 20:10:42.000000000 +0000 @@ -35,8 +35,8 @@ if (NOT WINDOWS) # compiling everything with -fPIC is needed to dynamically load libraries, but it messes up the benchmarks so turn it back off here - set_property(SOURCE clinpack.cpp APPEND_STRING PROPERTY COMPILE_FLAGS " -fno-PIC") - set_property(SOURCE dhry21a.cpp APPEND_STRING PROPERTY COMPILE_FLAGS " -fno-PIC") + set_property(SOURCE clinpack.cpp APPEND_STRING PROPERTY COMPILE_FLAGS " -fno-PIC -fPIE") + set_property(SOURCE dhry21a.cpp APPEND_STRING PROPERTY COMPILE_FLAGS " -fno-PIC -fPIE") endif (NOT WINDOWS) condor_exe(condor_mips "mips_main.cpp;dhry21a.cpp;../condor_utils/utc_time.cpp" ${C_LIBEXEC} "" OFF) diff -Nru condor-8.4.9~dfsg.1/src/condor_syscall_lib/syscall.tmpl condor-8.4.11~dfsg.1/src/condor_syscall_lib/syscall.tmpl --- condor-8.4.9~dfsg.1/src/condor_syscall_lib/syscall.tmpl 2016-10-04 19:38:28.000000000 +0000 +++ condor-8.4.11~dfsg.1/src/condor_syscall_lib/syscall.tmpl 2017-01-25 20:10:42.000000000 +0000 @@ -46,7 +46,7 @@ Receivers are the part of the code which runs on the submitting machine that matches with the sender. The receiver reads all the arguments to the system call, performs the call, then sends back the - results. We plan to eventually generate the recievers from this + results. We plan to eventually generate the receivers from this template file, but the current code doesn't do it. The general format of this file is a function prototype for every @@ -274,7 +274,7 @@ fcntl's "cmd" argument, and open's "flags" argument both have to be CEDARized so that we can deal with heterogeneous submits. So, for the switch, we want to just use the regular int. However, for the - sender and the reciever, we have to use CEDAR's special enum type + sender and the receiver, we have to use CEDAR's special enum type so that we send the thing across the wire in a platform-independent way. -Derek Wright and Todd Tannenbaum 2/8/00 */ diff -Nru condor-8.4.9~dfsg.1/src/condor_tests/Cmake_batch_tests_list.txt condor-8.4.11~dfsg.1/src/condor_tests/Cmake_batch_tests_list.txt --- condor-8.4.9~dfsg.1/src/condor_tests/Cmake_batch_tests_list.txt 2016-10-04 19:38:28.000000000 +0000 +++ condor-8.4.11~dfsg.1/src/condor_tests/Cmake_batch_tests_list.txt 2017-01-25 20:10:42.000000000 +0000 @@ -302,3 +302,4 @@ job_hgq_autoregroup_basic_van job_starter_script-A soap_job_tests +config_validate_policy_templates diff -Nru condor-8.4.9~dfsg.1/src/condor_tests/CMakeLists.txt condor-8.4.11~dfsg.1/src/condor_tests/CMakeLists.txt --- condor-8.4.9~dfsg.1/src/condor_tests/CMakeLists.txt 2016-10-04 19:38:28.000000000 +0000 +++ condor-8.4.11~dfsg.1/src/condor_tests/CMakeLists.txt 2017-01-25 20:10:42.000000000 +0000 @@ -397,6 +397,7 @@ condor_pl_test(cmd_q_shows-cputime "Condor_q shows cputime" "core;quick;full;quicknolink") condor_pl_test(cmd_q_shows-format "Condor_q shows format" "core;quick;full;quicknolink") condor_pl_test(file_transfer_submit "condor_submit file transfer" "core;quick;full;quicknolink") + condor_pl_test(config_validate_policy_templates "config_validate_policy_templates" "core;quick;full;quicknolink") if (LINUX) condor_pl_test(cmd_ssh_to_job_van "condor_ssh_to_job" "core;quick;full;quicknolink") diff -Nru condor-8.4.9~dfsg.1/src/condor_tests/ConcurrencyTools.pm condor-8.4.11~dfsg.1/src/condor_tests/ConcurrencyTools.pm --- condor-8.4.9~dfsg.1/src/condor_tests/ConcurrencyTools.pm 2016-10-04 19:38:28.000000000 +0000 +++ condor-8.4.11~dfsg.1/src/condor_tests/ConcurrencyTools.pm 2017-01-25 20:10:42.000000000 +0000 @@ -217,7 +217,7 @@ # on a slow submit of the jobs. I'd rather fail on too many running # so the fist check gets a pass. # with sequential submits($burst = 0) submits happen much slower - # and t6olerance of only 1 not suffecient + # and tolerance of only 1 not sufficient #$allow_too_few_idle_once = 0; $allow_too_few_idle_once -= 1; } else { diff -Nru condor-8.4.9~dfsg.1/src/condor_tests/config_validate_policy_templates.run condor-8.4.11~dfsg.1/src/condor_tests/config_validate_policy_templates.run --- condor-8.4.9~dfsg.1/src/condor_tests/config_validate_policy_templates.run 1970-01-01 00:00:00.000000000 +0000 +++ condor-8.4.11~dfsg.1/src/condor_tests/config_validate_policy_templates.run 2017-01-25 20:10:42.000000000 +0000 @@ -0,0 +1,217 @@ +#! /usr/bin/env perl +##************************************************************** +## +## Copyright (C) 1990-2007, Condor Team, Computer Sciences Department, +## University of Wisconsin-Madison, WI. +## +## Licensed under the Apache License, Version 2.0 (the "License"); you +## may not use this file except in compliance with the License. You may +## obtain a copy of the License at +## +## http://www.apache.org/licenses/LICENSE-2.0 +## +## Unless required by applicable law or agreed to in writing, software +## distributed under the License is distributed on an "AS IS" BASIS, +## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +## See the License for the specific language governing permissions and +## limitations under the License. +## +##************************************************************** + +use CondorTest; +use CondorPersonal; +use CondorUtils; +use Check::SimpleJob; +use strict; +use warnings; + +my $testname = "config_validate_policy_templates"; +my $configfile; +my $appendcontent; +my $result; + +$appendcontent = ' + use POLICY:Always_Run_Jobs +'; + +TLOG("Initialize\n"); +$configfile = CondorTest::CreateLocalConfig($appendcontent, "ConfigPolicy"); + +CondorTest::StartCondorWithParams( + condor_name => "ConfigPolicy", + fresh_local => "TRUE", + condorlocalsrc => "$configfile", +); + +$result = SimpleJob::RunCheck(); + +my $on_success = sub { + print "Success in RunCheck\n"; +}; + +my $on_execute = sub { + runCondorTool("condor_q"); +}; + +print "---------------------------------------------------------------------------------------------------------\n"; +TLOG("Checking Policy1, ALWAYS_RUN_JOBS\n"); + +$configfile = CondorTest::CreateLocalConfig($appendcontent, "ConfigPolicy1"); + +CondorTest::StartCondorWithParams( + condor_name => "ConfigPolicy1", + fresh_local => "TRUE", + condorlocalsrc => "$configfile", +); + +$result = SimpleJob::RunCheck( + on_execute => $on_execute, + on_success => $on_success, +); + +RegisterResult(1, $testname, "ALWAYS_RUN_JOBS"); + +print "---------------------------------------------------------------------------------------------------------\n"; +TLOG("Checking Policy2, DESKTOP\n"); + +$appendcontent = ' + use POLICY:Desktop +'; +$configfile = CondorTest::CreateLocalConfig($appendcontent, "ConfigPolicy2"); + +CondorTest::StartCondorWithParams( + condor_name => "ConfigPolicy2", + fresh_local => "TRUE", + condorlocalsrc => "$configfile", +); + +$result = CondorTest::SearchCondorLog("STARTD", 'Daemon Log is logging'); +print "result is $result\n"; + +RegisterResult($result, $testname, "DESKTOP"); + +print "---------------------------------------------------------------------------------------------------------\n"; +TLOG("Checking Policy3, HOLD_IF_CPUS_EXCEEDED\n"); + +$appendcontent = ' + use POLICY:Hold_If_Cpus_Exceeded +'; +$configfile = CondorTest::CreateLocalConfig($appendcontent, "ConfigPolicy3"); + +CondorTest::StartCondorWithParams( + condor_name => "ConfigPolicy3", + fresh_local => "TRUE", + condorlocalsrc => "$configfile", +); + +$result = SimpleJob::RunCheck( + on_execute => $on_execute, + on_success => $on_success, +); + +RegisterResult(1, $testname, "HOLD_IF_CPUS_EXCEEDED"); + +print "---------------------------------------------------------------------------------------------------------\n"; +TLOG("Checking Policy4, HOLD_IF_MEMORY_EXCEEDED\n"); + +$appendcontent = ' + use POLICY:HOLD_IF_MEMORY_EXCEEDED +'; +$configfile = CondorTest::CreateLocalConfig($appendcontent, "ConfigPolicy4"); + +CondorTest::StartCondorWithParams( + condor_name => "ConfigPolicy4", + fresh_local => "TRUE", + condorlocalsrc => "$configfile", +); + +$result = SimpleJob::RunCheck( + on_execute => $on_execute, + on_success => $on_success, +); + +RegisterResult(1, $testname, "HOLD_IF_MEMORY_EXCEEDED"); + +print "---------------------------------------------------------------------------------------------------------\n"; +TLOG("Checking Policy5, LIMIT_JOB_RUNTIMES\n"); + +$appendcontent = ' + use POLICY:LIMIT_JOB_RUNTIMES +'; +$configfile = CondorTest::CreateLocalConfig($appendcontent, "ConfigPolicy5"); + +CondorTest::StartCondorWithParams( + condor_name => "ConfigPolicy5", + fresh_local => "TRUE", + condorlocalsrc => "$configfile", +); + +$result = SimpleJob::RunCheck( + on_execute => $on_execute, + on_success => $on_success, +); + +RegisterResult(1, $testname, "LIMIT_JOB_RUNTIMES"); + +print "---------------------------------------------------------------------------------------------------------\n"; +TLOG("Checking Policy6, PREEMPT_IF_CPUS_EXCEEDED\n"); + +$appendcontent = ' + use POLICY:PREEMPT_IF_CPUS_EXCEEDED +'; +$configfile = CondorTest::CreateLocalConfig($appendcontent, "ConfigPolicy6"); + +CondorTest::StartCondorWithParams( + condor_name => "ConfigPolicy6", + fresh_local => "TRUE", + condorlocalsrc => "$configfile", +); + +$result = SimpleJob::RunCheck( + on_execute => $on_execute, + on_success => $on_success, +); + +RegisterResult(1, $testname, "PREEMPT_IF_CPUS_EXCEEDED"); + +print "---------------------------------------------------------------------------------------------------------\n"; +TLOG("Checking Policy7, PREEMPT_IF_MEMORY_EXCEEDED\n"); + +$appendcontent = ' + use POLICY:PREEMPT_IF_MEMORY_EXCEEDED +'; +$configfile = CondorTest::CreateLocalConfig($appendcontent, "ConfigPolicy7"); + +CondorTest::StartCondorWithParams( + condor_name => "ConfigPolicy7", + fresh_local => "TRUE", + condorlocalsrc => "$configfile", +); + +$result = SimpleJob::RunCheck( + on_execute => $on_execute, + on_success => $on_success, +); + +RegisterResult(1, $testname, "PREEMPT_IF_MEMORY_EXCEEDED"); + +print "---------------------------------------------------------------------------------------------------------\n"; +TLOG("Checking Policy8, UWCS_DESKTOP\n"); + +$appendcontent = ' + use POLICY:UWCS_DESKTOP +'; +$configfile = CondorTest::CreateLocalConfig($appendcontent, "ConfigPolicy8"); + +CondorTest::StartCondorWithParams( + condor_name => "ConfigPolicy8", + fresh_local => "TRUE", + condorlocalsrc => "$configfile", +); + +$result = CondorTest::SearchCondorLog("STARTD", "Daemon Log is logging"); + +RegisterResult($result, $testname, "UWCS_DESKTOP"); + +CondorTest::EndTest(); +exit(0); diff -Nru condor-8.4.9~dfsg.1/src/condor_tests/job_dagman_suppress_log.config condor-8.4.11~dfsg.1/src/condor_tests/job_dagman_suppress_log.config --- condor-8.4.9~dfsg.1/src/condor_tests/job_dagman_suppress_log.config 1970-01-01 00:00:00.000000000 +0000 +++ condor-8.4.11~dfsg.1/src/condor_tests/job_dagman_suppress_log.config 2017-01-25 20:10:42.000000000 +0000 @@ -0,0 +1 @@ +DAGMAN_SUPPRESS_JOB_LOGS = true diff -Nru condor-8.4.9~dfsg.1/src/condor_tests/job_dagman_suppress_log.dag condor-8.4.11~dfsg.1/src/condor_tests/job_dagman_suppress_log.dag --- condor-8.4.9~dfsg.1/src/condor_tests/job_dagman_suppress_log.dag 1970-01-01 00:00:00.000000000 +0000 +++ condor-8.4.11~dfsg.1/src/condor_tests/job_dagman_suppress_log.dag 2017-01-25 20:10:42.000000000 +0000 @@ -0,0 +1,2 @@ +Config job_dagman_suppress_log.config +Job NodeA job_dagman_suppress_log-node.sub diff -Nru condor-8.4.9~dfsg.1/src/condor_tests/job_dagman_suppress_log-node.sub condor-8.4.11~dfsg.1/src/condor_tests/job_dagman_suppress_log-node.sub --- condor-8.4.9~dfsg.1/src/condor_tests/job_dagman_suppress_log-node.sub 1970-01-01 00:00:00.000000000 +0000 +++ condor-8.4.11~dfsg.1/src/condor_tests/job_dagman_suppress_log-node.sub 2017-01-25 20:10:42.000000000 +0000 @@ -0,0 +1,7 @@ +universe = vanilla +executable = x_echostring.pl +arguments = log: $$([UserLog]) +log = job_dagman_suppress_log-node.log +output = job_dagman_suppress_log-node.out +error = job_dagman_suppress_log-node.err +queue diff -Nru condor-8.4.9~dfsg.1/src/condor_tests/job_max_running.run condor-8.4.11~dfsg.1/src/condor_tests/job_max_running.run --- condor-8.4.9~dfsg.1/src/condor_tests/job_max_running.run 2016-10-04 19:38:28.000000000 +0000 +++ condor-8.4.11~dfsg.1/src/condor_tests/job_max_running.run 2017-01-25 20:10:42.000000000 +0000 @@ -474,7 +474,7 @@ # on a slow submit of the jobs. I'd rather fail on too many running # so the fist check gets a pass. # with sequential submits($burst = 0) submits happen much slower - # and tolerance of only 1 not suffecient + # and tolerance of only 1 not sufficient #$allow_too_few_idle_once = 0; $allow_too_few_idle_once -= 1; } else { diff -Nru condor-8.4.9~dfsg.1/src/condor_tests/shadow_mem_usage-basic.run condor-8.4.11~dfsg.1/src/condor_tests/shadow_mem_usage-basic.run --- condor-8.4.9~dfsg.1/src/condor_tests/shadow_mem_usage-basic.run 2016-10-04 19:38:28.000000000 +0000 +++ condor-8.4.11~dfsg.1/src/condor_tests/shadow_mem_usage-basic.run 2017-01-25 20:10:42.000000000 +0000 @@ -55,6 +55,7 @@ "sl7" => "652", "ubuntu12" => "684", "ubuntu14" => "664", + "ubuntu16" => "664", ); # for X86 shadows my %memory_data32 = ( diff -Nru condor-8.4.9~dfsg.1/src/condor_tests/shadow_s_mem_usage-basic.run condor-8.4.11~dfsg.1/src/condor_tests/shadow_s_mem_usage-basic.run --- condor-8.4.9~dfsg.1/src/condor_tests/shadow_s_mem_usage-basic.run 2016-10-04 19:38:28.000000000 +0000 +++ condor-8.4.11~dfsg.1/src/condor_tests/shadow_s_mem_usage-basic.run 2017-01-25 20:10:42.000000000 +0000 @@ -64,6 +64,7 @@ "sl7" => "656", "ubuntu12" => "684", "ubuntu14" => "664", + "ubuntu16" => "664", ); # for X86 shadows my %memory_data32 = ( diff -Nru condor-8.4.9~dfsg.1/src/condor_tests/Test_Requirements condor-8.4.11~dfsg.1/src/condor_tests/Test_Requirements --- condor-8.4.9~dfsg.1/src/condor_tests/Test_Requirements 2016-10-04 19:38:28.000000000 +0000 +++ condor-8.4.11~dfsg.1/src/condor_tests/Test_Requirements 2017-01-25 20:10:42.000000000 +0000 @@ -270,3 +270,4 @@ lib_procapi_pidtracking-snapshot: personal lib_unit_tests: personal lib_userlog: personal +config_validate_policy_templates: personal diff -Nru condor-8.4.9~dfsg.1/src/condor_tools/condor_gpu_discovery.cpp condor-8.4.11~dfsg.1/src/condor_tools/condor_gpu_discovery.cpp --- condor-8.4.9~dfsg.1/src/condor_tools/condor_gpu_discovery.cpp 2016-10-04 19:38:28.000000000 +0000 +++ condor-8.4.11~dfsg.1/src/condor_tools/condor_gpu_discovery.cpp 2017-01-25 20:10:42.000000000 +0000 @@ -99,18 +99,25 @@ // because we don't have access to condor_utils, make a limited local version const std::string & Format(const char * fmt, ...) { static std::string buffer; - char temp[4096]; - const int max_temp = (int)(sizeof(temp)/sizeof(temp[0])); + static char * temp = NULL; + static int max_temp = 0; + + if ( ! temp) { max_temp = 4096; temp = (char*)malloc(max_temp+1); } va_list args; va_start(args, fmt); int cch = vsnprintf(temp, max_temp, fmt, args); va_end (args); - - if (cch < 0 || cch >= max_temp) { - fprintf(stderr, "internal error, %d is not enough space to format, value will be truncated.\n", max_temp); - temp[max_temp-1] = 0; + if (cch > max_temp) { + free(temp); + max_temp = cch+100; + temp = (char*)malloc(max_temp+1); temp[0] = 0; + va_start(args, fmt); + vsnprintf(temp, max_temp, fmt, args); + va_end (args); } + + temp[max_temp] = 0; buffer = temp; return buffer; } @@ -278,6 +285,61 @@ int g_verbose = 0; int g_diagnostic = 0; +int g_config_syntax = 0; +int g_config_fail_on_error = 0; + +#define MODE_ERROR 1 +#define MODE_VERBOSE 2 +#define MODE_DIAGNOSTIC_MSG 4 // diagnostic to stdout +#define MODE_DIAGNOSTIC_ERR 5 // diagnostic to stderr +int print_error(int mode, const char * fmt, ...) { + char temp[4096]; + char * ptmp = temp; + int max_temp = (int)(sizeof(temp)/sizeof(temp[0])); + + FILE * out = g_config_syntax ? stdout : stderr; + bool is_error = true; + switch (mode) { + case MODE_VERBOSE: + if ( ! g_verbose) return 0; + is_error = false; + out = stdout; + break; + case MODE_DIAGNOSTIC_MSG: + out = stdout; + is_error = false; + // fall through + case MODE_DIAGNOSTIC_ERR: + if ( ! g_diagnostic) return 0; + break; + } + + // if config syntax is desired, turn error messages into comments + // unless g_config_fail_on_error is set. + if (g_config_syntax && ( !is_error || ! g_config_fail_on_error)) { + *ptmp++ = '#'; + --max_temp; + } + + va_list args; + va_start(args, fmt); + int cch = vsnprintf(ptmp, max_temp, fmt, args); + va_end (args); + + if (cch < 0 || cch >= max_temp) { + // TJ: I don't think its possible to get where when g_config_syntax is on + // because all known inputs will be < 4k in size. + // but if we do, just suppress this error message + if ( ! g_config_syntax) { + fprintf(stderr, "internal error, %d is not enough space to format, value will be truncated.\n", max_temp); + } + temp[max_temp-1] = 0; + } + + return fputs(temp, out); +} + + void* g_cu_handle = NULL; // functions for runtime linking to nvcuda library typedef void * cudev; @@ -298,7 +360,7 @@ bool cu_Init(void* cu_handle) { g_cu_handle = cu_handle; - if (g_diagnostic) fprintf(stderr, "diag: simulating cudart using nvcuda\n"); + print_error(MODE_DIAGNOSTIC_MSG, "diag: simulating cudart using nvcuda\n"); cuInit = (cuda_uint_t)dlsym(cu_handle, "cuInit"); if ( ! cuInit) return false; @@ -310,7 +372,7 @@ cuDeviceGetCount = (cuda_int_t)dlsym(cu_handle, "cuDeviceGetCount"); cudaError ret = cuInit(0); - if (ret != cudaSuccess) fprintf(stderr, "Error: cuInit returned %d\n", ret); + if (ret != cudaSuccess) print_error(MODE_ERROR, "Error: cuInit returned %d\n", ret); return ret == cudaSuccess; } @@ -328,7 +390,7 @@ int bitness = KEY_WOW64_64KEY; //KEY_WOW64_32KEY; KEY_WOW64_64KEY int res = RegOpenKeyEx(HKEY_LOCAL_MACHINE, reg_key, 0, KEY_READ | bitness, &hkey); if (res != ERROR_SUCCESS) { - fprintf(stderr, "can't open %s\n", reg_key); + print_error(MODE_ERROR, "can't open %s\n", reg_key); return ret; } char version[100]; @@ -419,14 +481,14 @@ if (g_buffer) free (g_buffer); if (cb < 120) cb = 120; g_buffer = (char*)malloc(cb*2); - if ( ! g_buffer) { fprintf(stderr, "ERROR: failed to allocate %d bytes\n", (int)(cb*2)); exit(-1); } + if ( ! g_buffer) { print_error(MODE_ERROR, "ERROR: failed to allocate %d bytes\n", (int)(cb*2)); exit(-1); } g_cBuffer = cb*2; clr = ocl.GetPlatformInfo(plid, eInfo, g_cBuffer, g_buffer, &cb); } if (clr == CL_SUCCESS) { g_buffer[g_cBuffer-1] = 0; val = g_buffer; - if (ocl_log) { fprintf(stdout, "\t%s: \"%s\"\n", ocl_name(eInfo), val.c_str()); } + if (ocl_log) { print_error(MODE_VERBOSE, "\t%s: \"%s\"\n", ocl_name(eInfo), val.c_str()); } } return clr; } @@ -439,14 +501,14 @@ if (g_buffer) free (g_buffer); if (cb < 120) cb = 120; g_buffer = (char*)malloc(cb*2); - if ( ! g_buffer) { fprintf(stderr, "ERROR: failed to allocate %d bytes\n", (int)(cb*2)); exit(-1); } + if ( ! g_buffer) { print_error(MODE_ERROR, "ERROR: failed to allocate %d bytes\n", (int)(cb*2)); exit(-1); } g_cBuffer = cb*2; clr = ocl.GetDeviceInfo(did, eInfo, g_cBuffer, g_buffer, &cb); } if (clr == CL_SUCCESS) { g_buffer[g_cBuffer-1] = 0; val = g_buffer; - if (ocl_log) { fprintf(stdout, "\t\t%s: \"%s\"\n", ocl_name(eInfo), val.c_str()); } + if (ocl_log) { print_error(MODE_VERBOSE, "\t\t%s: \"%s\"\n", ocl_name(eInfo), val.c_str()); } } return clr; } @@ -461,7 +523,7 @@ clReturn oclGetInfo(cl_device_id did, cl_e_device_info eInfo, t & val) { clReturn clr = ocl.GetDeviceInfo(did, eInfo, sizeof(val), &val, NULL); if (clr == CL_SUCCESS) { - if (ocl_log) { fprintf(stdout, "\t\t%s: %s\n", ocl_name(eInfo), ocl_value(val)); } + print_error(MODE_VERBOSE, "\t\t%s: %s\n", ocl_name(eInfo), ocl_value(val)); } return clr; } @@ -477,7 +539,7 @@ int ocl_Init(void) { - if (g_diagnostic) fprintf(stderr, "diag: ocl_Init()\n"); + print_error(MODE_DIAGNOSTIC_MSG, "diag: ocl_Init()\n"); if (ocl_was_initialized) { return 0; } @@ -490,7 +552,7 @@ unsigned int cPlatforms = 0; clReturn clr = ocl.GetPlatformIDs(0, NULL, &cPlatforms); if (clr != CL_SUCCESS) { - fprintf(stderr, "ocl.GetPlatformIDs returned error=%d and %d platforms\n", clr, cPlatforms); + print_error(MODE_ERROR, "ocl.GetPlatformIDs returned error=%d and %d platforms\n", clr, cPlatforms); } if (cPlatforms > 0) { cl_platforms.reserve(cPlatforms); @@ -505,7 +567,7 @@ for (unsigned int ii = 0; ii < cPlatforms; ++ii) { cl_platform_id plid = cl_platforms[ii]; - if (g_diagnostic) { fprintf(stdout, "ocl platform %d = %x\n", ii, (int)(size_t)plid); } + print_error(MODE_DIAGNOSTIC_MSG, "ocl platform %d = %x\n", ii, (int)(size_t)plid); std::string val; clr = oclGetInfo(plid, CL_PLATFORM_NAME, val); if (val == "NVIDIA CUDA") g_plidCuda = plid; @@ -522,7 +584,7 @@ unsigned int cDevs = 0; cl_device_type f_types = CL_DEVICE_TYPE_GPU; clr = ocl.GetDeviceIDs(plid, f_types, 0, NULL, &cDevs); - if (g_verbose) { fprintf(stdout, "\tDEVICES = %d\n", cDevs); } + print_error(MODE_VERBOSE, "\tDEVICES = %d\n", cDevs); if (CL_SUCCESS == clr && cDevs > 0) { unsigned int ixFirst = cl_gpu_ids.size(); @@ -637,6 +699,7 @@ g_diagnostic = 1; } else if (is_dash_arg_prefix(argv[i], "config", -1)) { + g_config_syntax = 1; opt_config = 1; } else if (is_dash_arg_prefix(argv[i], "tag", 3)) { @@ -746,7 +809,7 @@ const char * opencl_library = "OpenCL.dll"; ocl_handle = LoadLibrary(opencl_library); if ( ! ocl_handle && opt_opencl) { - fprintf(stderr, "Error %d: Cant open library: %s\r\n", GetLastError(), opencl_library); + print_error(MODE_ERROR, "Error %d: Cant open library: %s\r\n", GetLastError(), opencl_library); } } @@ -756,12 +819,13 @@ cuda_handle = LoadLibrary("nvcuda.dll"); if (cuda_handle && cu_Init(cuda_handle)) { opt_nvcuda = 1; - if (g_diagnostic) { fprintf(stderr, "using nvcuda.dll to simulate cudart\n"); } + print_error(MODE_DIAGNOSTIC_ERR, "using nvcuda.dll to simulate cudart\n"); } else if (ocl_handle) { // if no cuda, fall back to OpenCL detection } else { - if (g_diagnostic) { fprintf(stderr, "Error %d: Cant open library: %s\r\n", GetLastError(), cudart_library); } + print_error(MODE_DIAGNOSTIC_ERR, "Error %d: Cant open library: %s\r\n", GetLastError(), cudart_library); fprintf(stdout, "Detected%s=0\n", opt_tag); + if (opt_config) fprintf(stdout, "NUM_DETECTED_%s=0\n", opt_tag); return 0; } } @@ -771,7 +835,7 @@ if (opt_dynamic) { nvml_handle = LoadLibrary(nvml_library); if ( ! nvml_handle) { - fprintf(stderr, "Error %d: Cant open library: %s\r\n", GetLastError(), nvml_library); + print_error(MODE_ERROR, "Error %d: Cant open library: %s\r\n", GetLastError(), nvml_library); } } #else @@ -779,7 +843,7 @@ const char * opencl_library = "libOpenCL.so"; ocl_handle = dlopen(opencl_library, RTLD_LAZY); if ( ! ocl_handle && opt_opencl) { - fprintf(stderr, "Error %s: Cant open library: %s\n", dlerror(), opencl_library); + print_error(MODE_ERROR, "Error %s: Cant open library: %s\n", dlerror(), opencl_library); } dlerror(); //Reset error } @@ -790,12 +854,13 @@ cuda_handle = dlopen("libnvcuda.so", RTLD_LAZY); if (cuda_handle && cu_Init(cuda_handle)) { opt_nvcuda = 1; - if (g_diagnostic) { fprintf(stderr, "using libnvcuda.so to simulate libcudart\n"); } + print_error(MODE_DIAGNOSTIC_ERR, "using libnvcuda.so to simulate libcudart\n"); } else if (ocl_handle) { // if no cuda, fall back to OpenCL detection } else { - if (g_diagnostic) { fprintf(stderr, "Error %s: Cant open library: %s\n", dlerror(), cudart_library); } + print_error(MODE_DIAGNOSTIC_ERR, "Error %s: Cant open library: %s\n", dlerror(), cudart_library); fprintf(stdout, "Detected%s=0\n", opt_tag); + if (opt_config) fprintf(stdout, "NUM_DETECTED_%s=0\n", opt_tag); return 0; } } @@ -804,7 +869,7 @@ if (opt_dynamic) { nvml_handle = dlopen(nvml_library, RTLD_LAZY); if ( ! nvml_handle) { - fprintf(stderr, "Error %s: Cant open library: %s\n", dlerror(), nvml_library); + print_error(MODE_ERROR, "Error %s: Cant open library: %s\n", dlerror(), nvml_library); } dlerror(); //Reset error } @@ -825,11 +890,12 @@ } if ( ! cudaGetDeviceCount) { #ifdef WIN32 - fprintf(stderr, "Error %d: Cant find %s in library: %s\r\n", GetLastError(), "cudaGetDeviceCount", cudart_library); + print_error(MODE_ERROR, "Error %d: Cant find %s in library: %s\r\n", GetLastError(), "cudaGetDeviceCount", cudart_library); #else - fprintf(stderr, "Error %s: Cant find %s in library: %s\n", dlerror(), "cudaGetDeviceCount", cudart_library); + print_error(MODE_ERROR, "Error %s: Cant find %s in library: %s\n", dlerror(), "cudaGetDeviceCount", cudart_library); #endif fprintf(stdout, "Detected%s=0\n", opt_tag); + if (opt_config) fprintf(stdout, "NUM_DETECTED_%s=0\n", opt_tag); return 0; } } @@ -858,6 +924,7 @@ if (deviceCount == 0) { // There is no device supporting CUDA fprintf(stdout, "Detected%s=0\n", opt_tag); + if (opt_config) fprintf(stdout, "NUM_DETECTED_%s=0\n", opt_tag); return 0; } @@ -904,7 +971,7 @@ result = nvmlInit(); if (NVML_SUCCESS != result) { - fprintf(stderr, "Warning: nvmlInit failed with error %d, dynamic information will not be available.\n", result); + print_error(MODE_ERROR, "Warning: nvmlInit failed with error %d, dynamic information will not be available.\n", result); have_nvml = 0; } } diff -Nru condor-8.4.9~dfsg.1/src/condor_tools/history.cpp condor-8.4.11~dfsg.1/src/condor_tools/history.cpp --- condor-8.4.9~dfsg.1/src/condor_tools/history.cpp 2016-10-04 19:38:28.000000000 +0000 +++ condor-8.4.11~dfsg.1/src/condor_tools/history.cpp 2017-01-25 20:10:42.000000000 +0000 @@ -950,7 +950,7 @@ while (true) { compat_classad::ClassAd ad; if (!getClassAd(sock, ad)) { - fprintf(stderr, "Failed to recieve remote ad.\n"); + fprintf(stderr, "Failed to receive remote ad.\n"); exit(1); } long long intVal; diff -Nru condor-8.4.9~dfsg.1/src/condor_tools/ssh_to_job.cpp condor-8.4.11~dfsg.1/src/condor_tools/ssh_to_job.cpp --- condor-8.4.9~dfsg.1/src/condor_tools/ssh_to_job.cpp 2016-10-04 19:38:28.000000000 +0000 +++ condor-8.4.11~dfsg.1/src/condor_tools/ssh_to_job.cpp 2017-01-25 20:10:42.000000000 +0000 @@ -403,6 +403,24 @@ bool SSHToJob::execute_ssh() { + DCSchedd schedd(m_schedd_name.IsEmpty() ? NULL : m_schedd_name.Value(), + m_pool_name.IsEmpty() ? NULL : m_pool_name.Value()); + if( schedd.locate() == false ) { + if( m_schedd_name.IsEmpty() ) { + logError("ERROR: Can't find address of local schedd\n"); + return false; + } + + if( m_pool_name.IsEmpty() ) { + logError("No such schedd named %s in local pool\n", + m_schedd_name.Value() ); + } else { + logError("No such schedd named %s in pool %s\n", + m_schedd_name.Value(), m_pool_name.Value() ); + } + return false; + } + // // Handle EC2 jobs. // @@ -414,7 +432,7 @@ // if( m_could_be_ec2_job ) { - Qmgr_connection * q = ConnectQ( m_schedd_name.IsEmpty() ? NULL : m_schedd_name.Value(), 0, true ); + Qmgr_connection * q = ConnectQ( schedd.addr(), 0, true ); if( ! q ) { logError( "Can't connect to schedd\n" ); return false; @@ -511,28 +529,7 @@ // MyString error_msg; - m_retry_sensible = false; - - DCSchedd schedd(m_schedd_name.IsEmpty() ? NULL : m_schedd_name.Value(), - m_pool_name.IsEmpty() ? NULL : m_pool_name.Value()); - if( schedd.locate() == false ) { - if( m_schedd_name.IsEmpty() ) { - logError("ERROR: Can't find address of local schedd\n"); - return false; - } - - if( m_pool_name.IsEmpty() ) { - logError("No such schedd named %s in local pool\n", - m_schedd_name.Value() ); - } else { - logError("No such schedd named %s in pool %s\n", - m_schedd_name.Value(), m_pool_name.Value() ); - } - return false; - } - - MyString starter_addr; MyString starter_claim_id; MyString starter_version; diff -Nru condor-8.4.9~dfsg.1/src/condor_tools/user_prio.cpp condor-8.4.11~dfsg.1/src/condor_tools/user_prio.cpp --- condor-8.4.9~dfsg.1/src/condor_tools/user_prio.cpp 2016-10-04 19:38:28.000000000 +0000 +++ condor-8.4.11~dfsg.1/src/condor_tools/user_prio.cpp 2017-01-25 20:10:42.000000000 +0000 @@ -131,7 +131,7 @@ time_t MinLastUsageTime; enum { - SortByColumn1 = 0, // sort by prio or by useage depending on which is in column 1 + SortByColumn1 = 0, // sort by prio or by usage depending on which is in column 1 SortGroupsFirstByIndex, SortHierByGroupId, SortHierBySortKey, @@ -954,7 +954,7 @@ HideUsers = true; } - int order = SortByColumn1; // sort by prio or by useage depending on which is in column 1 + int order = SortByColumn1; // sort by prio or by usage depending on which is in column 1 bool none_last = false; if (HierFlag) { none_last = (GlobalSurplusPolicy == SurplusRegroup); @@ -1617,7 +1617,7 @@ "\t-debug[:]\t\tSend debug output to stderr, overrides TOOL_DEBUG\n" " where [edit-option] is one of\n" "\t-resetusage \tReset usage data for \n" - "\t-resetall\t\tReset all useage data\n" + "\t-resetall\t\tReset all usage data\n" "\t-delete \t\tRemove a user record from the accountant\n" "\t-setprio \tSet priority for \n" "\t-setfactor \tSet priority factor for \n" diff -Nru condor-8.4.9~dfsg.1/src/condor_utils/CMakeLists.txt condor-8.4.11~dfsg.1/src/condor_utils/CMakeLists.txt --- condor-8.4.9~dfsg.1/src/condor_utils/CMakeLists.txt 2016-10-04 19:38:28.000000000 +0000 +++ condor-8.4.11~dfsg.1/src/condor_utils/CMakeLists.txt 2017-01-25 20:10:42.000000000 +0000 @@ -48,8 +48,6 @@ if(UNIX) set_source_files_properties(param_info.cpp PROPERTIES COMPILE_FLAGS -Wno-unused-parameter) - # Fortify doesn't like our select magic on rhel7, and causes assertion failures. Disable for now - set_source_files_properties(selector.cpp PROPERTIES COMPILE_FLAGS -U_FORTIFY_SOURCE) endif(UNIX) ############ end generate params diff -Nru condor-8.4.9~dfsg.1/src/condor_utils/condor_crontab.cpp condor-8.4.11~dfsg.1/src/condor_utils/condor_crontab.cpp --- condor-8.4.9~dfsg.1/src/condor_utils/condor_crontab.cpp 2016-10-04 19:38:28.000000000 +0000 +++ condor-8.4.11~dfsg.1/src/condor_utils/condor_crontab.cpp 2017-01-25 20:10:42.000000000 +0000 @@ -488,8 +488,8 @@ // may be rounded up to the next minute // if ( runtime < timestamp ) { - EXCEPT( "CronTab: Generated a runtime that is in the past (%d < %d)" - , (int)runtime, (int)timestamp ); + dprintf( D_ALWAYS, "CronTab: Generated a runtime that is in the past (%d < %d), scheduling now\n" , (int)runtime, (int)timestamp ); + runtime = time(0) + 120; } // diff -Nru condor-8.4.9~dfsg.1/src/condor_utils/condor_dh.cpp condor-8.4.11~dfsg.1/src/condor_utils/condor_dh.cpp --- condor-8.4.9~dfsg.1/src/condor_utils/condor_dh.cpp 2016-10-04 19:38:28.000000000 +0000 +++ condor-8.4.11~dfsg.1/src/condor_utils/condor_dh.cpp 1970-01-01 00:00:00.000000000 +0000 @@ -1,204 +0,0 @@ -/*************************************************************** - * - * Copyright (C) 1990-2011, Condor Team, Computer Sciences Department, - * University of Wisconsin-Madison, WI. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you - * may not use this file except in compliance with the License. You may - * obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - ***************************************************************/ - - -#include "condor_common.h" -#include "condor_dh.h" -#include "condor_debug.h" -#include "condor_config.h" - -#if HAVE_EXT_OPENSSL - -//#include -//#include - -const char DH_CONFIG_FILE[] = "CONDOR_DH_CONFIG"; - -Condor_Diffie_Hellman :: Condor_Diffie_Hellman() - : dh_ (0), - secret_ (0), - keySize_(0) -{ - initialize(); -} - -Condor_Diffie_Hellman :: ~Condor_Diffie_Hellman() -{ - if (dh_) { - DH_free(dh_); - } - if (secret_) { - free(secret_); - } - keySize_ = 0; - -} - -int Condor_Diffie_Hellman :: compute_shared_secret(const char * pk) -{ - // the input pk is assumed to be an encoded string representing - // the binary data for the remote party's public key -- y (or x) - // the local DH knows about g and x, now, it will compute - // (g^x)^y, or (g^y)^x - - BIGNUM * remote_pubKey = NULL; - - if (BN_hex2bn(&remote_pubKey, pk) == 0) { - dprintf(D_ALWAYS, "Unable to obtain remote public key\n"); - goto error; - } - - if ((dh_ != NULL) && (remote_pubKey != NULL)) { - - secret_ = (unsigned char *) malloc(DH_size(dh_)); - - // Now compute - keySize_ = DH_compute_key(secret_, remote_pubKey, dh_); - BN_clear_free(remote_pubKey); - - if (keySize_ == -1) { - dprintf(D_ALWAYS, "Unable to compute shared secret\n"); - goto error; - } - } - else { - goto error; - } - return 1; - - error: - if (remote_pubKey) { - BN_clear_free(remote_pubKey); - } - if (secret_) { - free(secret_); - secret_ = NULL; - } - return 0; -} - -char * Condor_Diffie_Hellman :: getPublicKeyChar() -{ - // This will return g^x, x is the secret, encoded in HEX format - if (dh_ && dh_->pub_key) { - return BN_bn2hex(dh_->pub_key); - } - else { - return NULL; - } -} - -BIGNUM * Condor_Diffie_Hellman::getPrime() -{ - if (dh_) { - return dh_->p; - } - else { - return 0; - } -} - -char * Condor_Diffie_Hellman :: getPrimeChar() -{ - if (dh_ && dh_->p) { - return BN_bn2hex(dh_->p); - } - else { - return NULL; - } -} - -BIGNUM * Condor_Diffie_Hellman :: getGenerator() -{ - if (dh_) { - return dh_->g; - } - else { - return 0; - } -} - -char * Condor_Diffie_Hellman :: getGeneratorChar() -{ - if (dh_ && dh_->g) { - return BN_bn2hex(dh_->g); - } - else { - return NULL; - } -} - -const unsigned char * Condor_Diffie_Hellman :: getSecret() const -{ - return secret_; -} - -int Condor_Diffie_Hellman :: getSecretSize() const -{ - return keySize_; -} - -int Condor_Diffie_Hellman :: initialize() -{ - // First, check the config file to find out where is the file - // with all the parameters - config(); - char * dh_config = param(DH_CONFIG_FILE); - - FILE * fp = 0; - if ( dh_config ) { - if ( (fp = safe_fopen_wrapper_follow(dh_config, "r")) == NULL) { - dprintf(D_ALWAYS, "Unable to open condor_dh_config file %s\n", dh_config); - goto error; - } - - dh_ = PEM_read_DHparams(fp, NULL, NULL, NULL); - if (dh_ == NULL) { - dprintf(D_ALWAYS, "Unable to read DH structure from the configuration file.\n"); - goto error; - } - - // Now generate private key - if (DH_generate_key(dh_) == 0) { - dprintf(D_ALWAYS, "Unable to generate a private key \n"); - goto error; - } - } - else { - dprintf(D_ALWAYS, "The required configuration parameter CONDOR_DH_CONFIG is not specified in the condor configuration file!\n"); - goto error; - } - fclose(fp); - free(dh_config); - return 1; - error: - if (dh_) { - DH_free(dh_); - dh_ = 0; - } - if (dh_config) { - free(dh_config); - } - if (fp) { - fclose(fp); - } - return 0; -} - -#endif diff -Nru condor-8.4.9~dfsg.1/src/condor_utils/condor_dh.h condor-8.4.11~dfsg.1/src/condor_utils/condor_dh.h --- condor-8.4.9~dfsg.1/src/condor_utils/condor_dh.h 2016-10-04 19:38:28.000000000 +0000 +++ condor-8.4.11~dfsg.1/src/condor_utils/condor_dh.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,73 +0,0 @@ -/*************************************************************** - * - * Copyright (C) 1990-2007, Condor Team, Computer Sciences Department, - * University of Wisconsin-Madison, WI. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you - * may not use this file except in compliance with the License. You may - * obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - ***************************************************************/ - -#ifndef CONDOR_DH -#define CONDOR_DH - -#include "condor_common.h" - -#if HAVE_EXT_OPENSSL - -#include -//#include - -//---------------------------------------------------------------------- -// Diffie-Hellman key exchange, based on API provided by OpenSSL -// privately known variables: x and y -- the secret, one for each -// party -// publicly known variables: g -- the generator, p -- the prime, -// g^x -- the public key -//---------------------------------------------------------------------- - -class Condor_Diffie_Hellman { - - public: - Condor_Diffie_Hellman(); - ~Condor_Diffie_Hellman(); - - char * getPublicKeyChar(); - //------------------------------------------ - // PURPOSE: Return public key in HEX encoded format - // REQUIRE: None - // RETURNS: HEX string or NULL - //------------------------------------------ - - BIGNUM * getPrime(); - BIGNUM * getGenerator(); - // These two methods return the prime and the generator - - char * getPrimeChar(); - char * getGeneratorChar(); - // These two methods return the prime and the generator - // in HEX encoded format if they exist. Otherwise, NULL is returned. - - int compute_shared_secret(const char * pk); - const unsigned char * getSecret() const; - int getSecretSize() const; - - private: - int initialize(); - - DH * dh_; - unsigned char * secret_; - int keySize_; -}; -#endif - -#endif diff -Nru condor-8.4.9~dfsg.1/src/condor_utils/condor_event.cpp condor-8.4.11~dfsg.1/src/condor_utils/condor_event.cpp --- condor-8.4.9~dfsg.1/src/condor_utils/condor_event.cpp 2016-10-04 19:38:28.000000000 +0000 +++ condor-8.4.11~dfsg.1/src/condor_utils/condor_event.cpp 2017-01-25 20:10:42.000000000 +0000 @@ -2331,7 +2331,7 @@ } - // print out resource request/useage values. + // print out resource request/usage values. // if (pusageAd) { formatUsageAd( out, pusageAd ); @@ -2753,7 +2753,7 @@ total_recvd_bytes, header ) < 0) return true; // backwards compatibility - // print out resource request/useage values. + // print out resource request/usage values. // if (pusageAd) { formatUsageAd( out, pusageAd ); @@ -2849,7 +2849,7 @@ for (;;) { char sz[250]; char srun[sizeof("Total")]; - char sdir[sizeof("Recieved")]; + char sdir[sizeof("Received")]; char sjob[22]; // if we hit end of file or end of record "..." rewind the file pointer. @@ -2887,7 +2887,7 @@ break; } } - // the useage ad is optional + // the usage ad is optional readUsageAd(file, &pusageAd); #else diff -Nru condor-8.4.9~dfsg.1/src/condor_utils/config.cpp condor-8.4.11~dfsg.1/src/condor_utils/config.cpp --- condor-8.4.9~dfsg.1/src/condor_utils/config.cpp 2016-10-04 19:38:28.000000000 +0000 +++ condor-8.4.11~dfsg.1/src/condor_utils/config.cpp 2017-01-25 20:10:42.000000000 +0000 @@ -2470,9 +2470,11 @@ virtual bool skip(int func_id, const char * name, int namelen) { if (func_id != MACRO_ID_NORMAL && func_id != SPECIAL_MACRO_ID_FILENAME) return true; - if (namelen == selflen && MATCH == strncasecmp(name, self, namelen)) + if ((namelen == selflen || (namelen > selflen && name[selflen] == ':')) && MATCH == strncasecmp(name, self, selflen)) return false; - if (namelen == selflen2 && MATCH == strncasecmp(name, self2, namelen)) + if ( ! self2) + return true; + if ((namelen == selflen2 || (namelen > selflen2 && name[selflen2] == ':')) && MATCH == strncasecmp(name, self2, selflen2)) return false; return true; } diff -Nru condor-8.4.9~dfsg.1/src/condor_utils/file_transfer.cpp condor-8.4.11~dfsg.1/src/condor_utils/file_transfer.cpp --- condor-8.4.9~dfsg.1/src/condor_utils/file_transfer.cpp 2016-10-04 19:38:28.000000000 +0000 +++ condor-8.4.11~dfsg.1/src/condor_utils/file_transfer.cpp 2017-01-25 20:10:42.000000000 +0000 @@ -2153,7 +2153,19 @@ dprintf(D_ALWAYS,"DoDownload: failed to read mkdir mode.\n"); } else { - rc = mkdir(fullname.Value(),file_mode); + if (file_mode == NULL_FILE_PERMISSIONS) { + // Don't create subdirectories with mode 0000! + // If file_mode is still NULL_FILE_PERMISSIONS here, it + // likely means that our peer is likely a Windows machine, + // since Windows will always claim a mode of 0000. + // In this case, default to mode 0700, which is a + // conservative default, and matches what we do in + // ReliSock::get_file(). + file_mode = (condor_mode_t) 0700; + } + mode_t old_umask = umask(0); + rc = mkdir(fullname.Value(),(mode_t)file_mode); + umask(old_umask); if( rc == -1 && errno == EEXIST ) { // The directory name already exists. If it is a // directory, just leave it alone, because the @@ -2172,7 +2184,9 @@ } else { IGNORE_RETURN remove(fullname.Value()); - rc = mkdir(fullname.Value(),file_mode); + old_umask = umask(0); + rc = mkdir(fullname.Value(),(mode_t)file_mode); + umask(old_umask); } } if( rc == -1 ) { diff -Nru condor-8.4.9~dfsg.1/src/condor_utils/param_info.in condor-8.4.11~dfsg.1/src/condor_utils/param_info.in --- condor-8.4.9~dfsg.1/src/condor_utils/param_info.in 2016-10-04 19:38:28.000000000 +0000 +++ condor-8.4.11~dfsg.1/src/condor_utils/param_info.in 2017-01-25 20:10:42.000000000 +0000 @@ -7245,6 +7245,9 @@ usage= review=? +[SCHEDD_SLOT_WEIGHT] +default= + [SHARED_PORT_MAX_FILE_DESCRIPTORS] default=4096 range=0, @@ -8200,6 +8203,7 @@ friendly_name=Limit job runtimes to 24 hours default : @end MAX_JOB_RUNTIME=24*3600 + MaxJobRetirementTime=$(MAX_JOB_RUNTIME) + 120 PREEMPT=(Activity == "Busy") && ((time() - EnteredCurrentActivity) > $(MAX_JOB_RUNTIME)) @end review=? @@ -8211,14 +8215,9 @@ # Publish the number of CPU cores being used by the job into # to slot ad as attribute "CpusUsage". This value will # be the average number of cores used by the job over the - # past minute, sampling every 5 seconds, and rounded to two digits. + # past minute, sampling every 5 seconds # - CpusUsage = ifthenelse( \ - TotalLoadAvg > 0.0 && Activity!="Idle", \ - int(CondorLoadAvg / TotalLoadAvg * \ - ifthenelse(TotalLoadAvg < $(DETECTED_CORES), TotalLoadAvg, $(DETECTED_CORES)) \ - * 100) / 100.0, \ - 0) + CpusUsage = ifthenelse(TotalLoadAvg > 0.0 && Activity!="Idle", CondorLoadAvg/TotalLoadAvg*MIN({TotalLoadAvg, $(DETECTED_CORES)}), 0) STARTD_ATTRS = $(STARTD_ATTRS) CpusUsage # # If the startd sees the number of CPU cores used by the job exceed the @@ -8226,9 +8225,17 @@ # immediately ignoring any retirement time. # CPU_EXCEEDED = (CpusUsage > Cpus + 0.8) - PREEMPT = ($(PREEMPT:False)) || $(CPU_EXCEEDED) + if defined PREEMPT + PREEMPT = ($(PREEMPT)) || $(CPU_EXCEEDED) + else + PREEMPT = $(CPUS_EXCEEDED) + endif MAXJOBRETIREMENTTIME = ifthenelse($(CPU_EXCEEDED),0,$(MAXJOBRETIREMENTTIME:0)) - WANT_SUSPEND = ($(WANT_SUSPEND:False)) && $(CPU_EXCEEDED) =!= TRUE + if defined WANT_SUSPEND + WANT_SUSPEND = ($(WANT_SUSPEND)) && $(CPU_EXCEEDED) =!= TRUE + else + WANT_SUSPEND = $(CPU_EXCEEDED) =!= TRUE + endif @end review=? @@ -8240,13 +8247,13 @@ # If the startd preempted a job because CPU usage exceeded the number # of cores in the slot, put the job on hold. # - WANT_HOLD = ($(WANT_HOLD:False)) || $(CPU_EXCEEDED) - WANT_HOLD_REASON = ifThenElse($(CPU_EXCEEDED), \ - $(HOLD_REASON_CPU_EXCEEDED:"cpu usage exceeded request_cpus"), \ - $(WANT_HOLD_REASON:UNDEFINED)) - WANT_HOLD_SUBCODE = ifThenElse($(CPU_EXCEEDED), \ - $(HOLD_SUBCODE_CPU_EXCEEDED:101), \ - $(WANT_HOLD_SUBCODE:UNDEFINED)) + if defined WANT_HOLD + WANT_HOLD = ($(WANT_HOLD)) || $(CPU_EXCEEDED) + else + WANT_HOLD = $(CPU_EXCEEDED) + endif + WANT_HOLD_REASON = ifThenElse($(CPU_EXCEEDED), "$(HOLD_REASON_CPU_EXCEEDED:CPU usage exceeded request_cpus)", $(WANT_HOLD_REASON:UNDEFINED)) + WANT_HOLD_SUBCODE = ifThenElse($(CPU_EXCEEDED), $(HOLD_SUBCODE_CPU_EXCEEDED:101), $(WANT_HOLD_SUBCODE:UNDEFINED)) @end review=? @@ -8258,9 +8265,17 @@ # memory in the slot, preempt the job immediately ignoring any retirement time. # MEMORY_EXCEEDED = (MemoryUsage =!= UNDEFINED && MemoryUsage > Memory) - PREEMPT = ($(PREEMPT:False)) || $(MEMORY_EXCEEDED) + if defined PREEMPT + PREEMPT = ($(PREEMPT)) || $(MEMORY_EXCEEDED) + else + PREEMPT = $(MEMORY_EXCEEDED) + endif MAXJOBRETIREMENTTIME = ifthenelse($(MEMORY_EXCEEDED),0,$(MAXJOBRETIREMENTTIME:0)) - WANT_SUSPEND = ($(WANT_SUSPEND:False)) && $(MEMORY_EXCEEDED) =!= TRUE + if defined WANT_SUSPEND + WANT_SUSPEND = ($(WANT_SUSPEND)) && $(MEMORY_EXCEEDED) =!= TRUE + else + WANT_SUSPEND = $(MEMORY_EXCEEDED) =!= TRUE + endif @end review=? @@ -8272,13 +8287,13 @@ # If the startd preempted a job because memory usage exceeded the amount # of memory in the slot, put the job on hold. # - WANT_HOLD = ($(WANT_HOLD:False)) || $(MEMORY_EXCEEDED) - WANT_HOLD_REASON = ifThenElse($(MEMORY_EXCEEDED), \ - $(HOLD_REASON_MEMORY_EXCEEDED:"memory usage exceeded request_memory"), \ - $(WANT_HOLD_REASON:UNDEFINED)) - WANT_HOLD_SUBCODE = ifThenElse($(MEMORY_EXCEEDED), \ - $(HOLD_SUBCODE_MEMORY_EXCEEDED:102), \ - $(WANT_HOLD_SUBCODE:UNDEFINED)) + if defined WANT_HOLD + WANT_HOLD = ($(WANT_HOLD)) || $(MEMORY_EXCEEDED) + else + WANT_HOLD = $(MEMORY_EXCEEDED) + endif + WANT_HOLD_REASON = ifThenElse($(MEMORY_EXCEEDED), "$(HOLD_REASON_MEMORY_EXCEEDED:memory usage exceeded request_memory)", $(WANT_HOLD_REASON:UNDEFINED)) + WANT_HOLD_SUBCODE = ifThenElse($(MEMORY_EXCEEDED),$(HOLD_SUBCODE_MEMORY_EXCEEDED:102), $(WANT_HOLD_SUBCODE:UNDEFINED)) @end review=? diff -Nru condor-8.4.9~dfsg.1/src/condor_utils/read_multiple_logs.h condor-8.4.11~dfsg.1/src/condor_utils/read_multiple_logs.h --- condor-8.4.9~dfsg.1/src/condor_utils/read_multiple_logs.h 2016-10-04 19:38:28.000000000 +0000 +++ condor-8.4.11~dfsg.1/src/condor_utils/read_multiple_logs.h 2017-01-25 20:10:42.000000000 +0000 @@ -112,7 +112,7 @@ /** Real the next "logical" line from the file. (This means lines are combined if they end with a continuation character.) - @param line: a MyString to recieve the line string + @param line: a MyString to receive the line string @return: true iff we got any data */ bool NextLogicalLine( MyString &line ); diff -Nru condor-8.4.9~dfsg.1/src/condor_utils/selector.cpp condor-8.4.11~dfsg.1/src/condor_utils/selector.cpp --- condor-8.4.9~dfsg.1/src/condor_utils/selector.cpp 2016-10-04 19:38:28.000000000 +0000 +++ condor-8.4.11~dfsg.1/src/condor_utils/selector.cpp 2017-01-25 20:10:42.000000000 +0000 @@ -37,6 +37,16 @@ } #endif +#if defined(UNIX) +# define MY_FD_SET(fd, ptr) FD_SET(fd % FD_SETSIZE, &ptr[fd / FD_SETSIZE]) +# define MY_FD_CLR(fd, ptr) FD_CLR(fd % FD_SETSIZE, &ptr[fd / FD_SETSIZE]) +# define MY_FD_ISSET(fd, ptr) FD_ISSET(fd % FD_SETSIZE, &ptr[fd / FD_SETSIZE]) +#else +# define MY_FD_SET FD_SET +# define MY_FD_CLR FD_CLR +# define MY_FD_ISSET FD_ISSET +#endif + int Selector::_fd_select_size = -1; Selector::Selector() @@ -199,7 +209,7 @@ } #endif m_poll.events |= POLLIN; - FD_SET( fd, save_read_fds ); + MY_FD_SET( fd, save_read_fds ); break; case IO_WRITE: @@ -209,7 +219,7 @@ } #endif m_poll.events |= POLLOUT; - FD_SET( fd, save_write_fds ); + MY_FD_SET( fd, save_write_fds ); break; case IO_EXCEPT: @@ -219,7 +229,7 @@ } #endif m_poll.events |= POLLERR; - FD_SET( fd, save_except_fds ); + MY_FD_SET( fd, save_except_fds ); break; } @@ -252,15 +262,15 @@ switch( interest ) { case IO_READ: - FD_CLR( fd, save_read_fds ); + MY_FD_CLR( fd, save_read_fds ); break; case IO_WRITE: - FD_CLR( fd, save_write_fds ); + MY_FD_CLR( fd, save_write_fds ); break; case IO_EXCEPT: - FD_CLR( fd, save_except_fds ); + MY_FD_CLR( fd, save_except_fds ); break; } @@ -378,15 +388,15 @@ switch( interest ) { case IO_READ: - return (SINGLE_SHOT_OK == m_single_shot) ? (m_poll.revents & (POLLIN|POLLHUP)) : FD_ISSET( fd, read_fds ); + return (SINGLE_SHOT_OK == m_single_shot) ? (m_poll.revents & (POLLIN|POLLHUP)) : MY_FD_ISSET( fd, read_fds ); break; case IO_WRITE: - return (SINGLE_SHOT_OK == m_single_shot) ? (m_poll.revents & (POLLOUT|POLLHUP)) : FD_ISSET( fd, write_fds ); + return (SINGLE_SHOT_OK == m_single_shot) ? (m_poll.revents & (POLLOUT|POLLHUP)) : MY_FD_ISSET( fd, write_fds ); break; case IO_EXCEPT: - return (SINGLE_SHOT_OK == m_single_shot) ? (m_poll.revents & POLLERR) : FD_ISSET( fd, except_fds ); + return (SINGLE_SHOT_OK == m_single_shot) ? (m_poll.revents & POLLERR) : MY_FD_ISSET( fd, except_fds ); break; } @@ -478,7 +488,7 @@ dprintf( D_ALWAYS, "%s {", msg ); for( i=0, count=0; i<=max; i++ ) { - if( FD_ISSET(i,set) ) { + if( MY_FD_ISSET(i,set) ) { count++; dprintf( D_ALWAYS | D_NOHEADER, "%d", i ); diff -Nru condor-8.4.9~dfsg.1/src/condor_utils/sleep.unix.cpp condor-8.4.11~dfsg.1/src/condor_utils/sleep.unix.cpp --- condor-8.4.9~dfsg.1/src/condor_utils/sleep.unix.cpp 2016-10-04 19:38:28.000000000 +0000 +++ condor-8.4.11~dfsg.1/src/condor_utils/sleep.unix.cpp 2017-01-25 20:10:42.000000000 +0000 @@ -20,7 +20,7 @@ /* This file implements our own version of sleep that doesn't use SIGALRM. It also has a Sleep() function that sleeps for the given - number of miliseconds. It is implemented using select(). + number of milliseconds. It is implemented using select(). Author: Derek Wright 1/12/98 */ @@ -42,8 +42,8 @@ Sleep( unsigned int milliseconds ) { struct timeval timer; - timer.tv_sec = 0; - timer.tv_usec = milliseconds; + timer.tv_sec = milliseconds / 1000; + timer.tv_usec = 1000*(milliseconds % 1000); select( 0, NULL, NULL, NULL, &timer ); return 0; diff -Nru condor-8.4.9~dfsg.1/src/condor_utils/uids.cpp condor-8.4.11~dfsg.1/src/condor_utils/uids.cpp --- condor-8.4.9~dfsg.1/src/condor_utils/uids.cpp 2016-10-04 19:38:28.000000000 +0000 +++ condor-8.4.11~dfsg.1/src/condor_utils/uids.cpp 2017-01-25 20:10:42.000000000 +0000 @@ -216,7 +216,7 @@ static const LPCTSTR needed[] = { SE_INCREASE_QUOTA_NAME, //needed by CreateProcessAsUser //SE_TCB_NAME, //needed on Win2k to CreateProcessAsUser - SE_PROF_SINGLE_PROCESS_NAME, //needed?? to get CPU% and Memory/Disk useage for our children + SE_PROF_SINGLE_PROCESS_NAME, //needed?? to get CPU% and Memory/Disk usage for our children SE_CREATE_GLOBAL_NAME, //needed to create named shared memory SE_CHANGE_NOTIFY_NAME, //needed by CreateProcessAsUser SE_SECURITY_NAME, //needed to change file ACL's diff -Nru condor-8.4.9~dfsg.1/src/condor_who/who.cpp condor-8.4.11~dfsg.1/src/condor_who/who.cpp --- condor-8.4.9~dfsg.1/src/condor_who/who.cpp 2016-10-04 19:38:28.000000000 +0000 +++ condor-8.4.11~dfsg.1/src/condor_who/who.cpp 2017-01-25 20:10:42.000000000 +0000 @@ -2251,7 +2251,7 @@ } else if( ! sock.end_of_message()) { if (App.diagnostic) fprintf(stderr, "Can't receive end of message from %s\n", addr); } else if (App.diagnostic) { - printf("Recieved %s from %s for $(%s)\n", val, addr, param_name); + printf("Received %s from %s for $(%s)\n", val, addr, param_name); } if (val) { value = strdup(val); diff -Nru condor-8.4.9~dfsg.1/src/gce_gahp/gceCommands.cpp condor-8.4.11~dfsg.1/src/gce_gahp/gceCommands.cpp --- condor-8.4.9~dfsg.1/src/gce_gahp/gceCommands.cpp 2016-10-04 19:38:28.000000000 +0000 +++ condor-8.4.11~dfsg.1/src/gce_gahp/gceCommands.cpp 2017-01-25 20:10:42.000000000 +0000 @@ -341,7 +341,7 @@ auth_entry.m_auth_file = auth_file; } - if ( auth_entry.m_expiration < time(NULL) - (5 * 60) ) { + if ( auth_entry.m_expiration < time(NULL) + (5 * 60) ) { auth_entry.m_refreshing = true; auth_entry.m_err_msg.clear(); @@ -843,6 +843,7 @@ insert_request.requestBody += "\",\n"; insert_request.requestBody += " \"disks\": [\n {\n"; insert_request.requestBody += " \"boot\": true,\n"; + insert_request.requestBody += " \"autoDelete\": true,\n"; insert_request.requestBody += " \"initializeParams\": {\n"; insert_request.requestBody += " \"sourceImage\": \""; insert_request.requestBody += argv[8]; diff -Nru condor-8.4.9~dfsg.1/src/python-bindings/event.cpp condor-8.4.11~dfsg.1/src/python-bindings/event.cpp --- condor-8.4.9~dfsg.1/src/python-bindings/event.cpp 2016-10-04 19:38:28.000000000 +0000 +++ condor-8.4.11~dfsg.1/src/python-bindings/event.cpp 2017-01-25 20:10:42.000000000 +0000 @@ -76,13 +76,10 @@ fd.fd = watch(); fd.events = POLLIN; Py_BEGIN_ALLOW_THREADS - if (time_remaining != -1 && time_remaining < 1000) {step = time_remaining;} + if (time_remaining > -1 && time_remaining < 1000) {step = time_remaining;} if (fd.fd == -1) { - struct timeval tv; - tv.tv_sec = step / 1000; - tv.tv_usec = 1000*(step % 1000); - select(1,NULL,NULL,NULL,&tv); + Sleep(step); } else { @@ -94,7 +91,7 @@ boost::python::throw_error_already_set(); } time_remaining -= step; - if (time_remaining <= 0) + if (time_remaining == 0) { errno = 0; break; diff -Nru condor-8.4.9~dfsg.1/src/python-bindings/log_reader.cpp condor-8.4.11~dfsg.1/src/python-bindings/log_reader.cpp --- condor-8.4.9~dfsg.1/src/python-bindings/log_reader.cpp 2016-10-04 19:38:28.000000000 +0000 +++ condor-8.4.11~dfsg.1/src/python-bindings/log_reader.cpp 2017-01-25 20:10:42.000000000 +0000 @@ -70,24 +70,17 @@ struct pollfd fd; fd.fd = watch(); fd.events = POLLIN; + if (time_remaining > -1 && time_remaining < 1000) {step = time_remaining;} + Py_BEGIN_ALLOW_THREADS if (fd.fd == -1) { - Py_BEGIN_ALLOW_THREADS - sleep(1); - Py_END_ALLOW_THREADS - if (time_remaining >= 0 && time_remaining < 1000) - { - ++m_iter; - break; - } + Sleep(step); } else { - if (time_remaining != -1 && time_remaining < 1000) {step = time_remaining;} - Py_BEGIN_ALLOW_THREADS ::poll(&fd, 1, step); - Py_END_ALLOW_THREADS } + Py_END_ALLOW_THREADS if (PyErr_CheckSignals() == -1) { boost::python::throw_error_already_set();