-
Notifications
You must be signed in to change notification settings - Fork 42
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix ZeroTimeWindow for renew_proxy && Fix missing cronjobs (#1476)
* Fix ZeroTimeWindow for renew_proxy && Fix missing cronjobs * Add myproxyLifetimHoursas * Typo * Do not wipeout old cronjobs when creating the new ones && set cron interval to 1 hour && set proxy minimal lenght to 156 hours before renew set myproxyMinLifetimeHours=156 * oversimplifying everything * Export WMA_CONFIG_FILE && Add wmagent-couchapp-init to set_cronjob()
- Loading branch information
1 parent
511dd27
commit cd75bf2
Showing
5 changed files
with
19 additions
and
43 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -24,6 +24,8 @@ HOSTIP=`hostname -i` | |
WMA_TAG=$WMCoreVersion | ||
} | ||
|
||
[[ -z $WMA_USER ]] && export WMA_USER=$(id -un) | ||
|
||
TEAMNAME=testbed-${HOSTNAME%%.*} | ||
AGENT_NUMBER=0 | ||
AGENT_FLAVOR=mysql | ||
|
@@ -296,18 +298,27 @@ check_databases() { | |
} | ||
|
||
set_cronjob() { | ||
stepMsg="Populating cronjob with utilitarian scripts for the $WMA_USER" | ||
stepMsg="Populating cronjob with utilitarian scripts for user: $WMA_USER" | ||
echo "-----------------------------------------------------------------------" | ||
echo "Start: $stepMsg" | ||
local errVal=0 | ||
|
||
chmod +x $WMA_DEPLOY_DIR/deploy/renew_proxy.sh $WMA_DEPLOY_DIR/deploy/restartComponent.sh | ||
|
||
# Populating proxy related cronjobs | ||
crontab -u $WMA_USER - <<EOF | ||
55 */12 * * * $WMA_MANAGE_DIR/manage renew-proxy | ||
58 */12 * * * python $WMA_DEPLOY_DIR/deploy/checkProxy.py --proxy /data/certs/myproxy.pem --time 120 --send-mail True --mail [email protected] | ||
*/15 * * * * source $WMA_DEPLOY_DIR/deploy/restartComponent.sh > /dev/null | ||
EOF | ||
let errVal+=$? | ||
|
||
# Populating CouchDB related cronjobs | ||
wmagent-couchapp-init | ||
let errVal+=$? | ||
|
||
[[ $errVal -eq 0 ]] || { | ||
echo "$FUNCNAME: ERROR: Failed to populate WMAgent's cron jobs for user: $WMA_USER" | ||
return $errVal | ||
} | ||
echo "Done: $stepMsg!" && echo | ||
echo "-----------------------------------------------------------------------" | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters