Skip to content

Commit

Permalink
Add new machine names.
Browse files Browse the repository at this point in the history
  • Loading branch information
Rida Saleem committed Oct 3, 2014
1 parent 6fc818f commit 611dd79
Show file tree
Hide file tree
Showing 37 changed files with 73 additions and 63 deletions.
2 changes: 1 addition & 1 deletion acdcserver/deploy
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ deploy_acdcserver_post()
local cleanup="0 0 1 * * $cmd"

(mkcrontab
case $host in vocms34 | vocms13[2689] | vocms16[13]) ;; * ) echo "${cleanup}" ;; esac
case $host in vocms34 | vocms034 | vocms13[2689] | vocms013[2689] | vocms16[13]| vocms016[13]) ;; * ) echo "${cleanup}" ;; esac
) | crontab -
}

Expand Down
6 changes: 3 additions & 3 deletions admin/CmswebReport
Original file line number Diff line number Diff line change
Expand Up @@ -72,9 +72,9 @@ case $variant in
couches="vocms138,vocms140"
;;
preprod|dev)
frontends="vocms127,vocms134,vocms135"
backends="vocms127,vocms132,vocms133"
couches="vocms127,vocms132,vocms133"
frontends="vocms127,vocms134,vocms135,vocms0127,vocms0134,vocms0135"
backends="vocms127,vocms132,vocms133,vocms0127,vocms0132,vocms0133"
couches="vocms127,vocms132,vocms133,vocms0127,vocms0132,vocms0133"
;;
*)
usage
Expand Down
3 changes: 2 additions & 1 deletion admin/LogReport
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,8 @@ if __name__ == '__main__':
opt.add_option("-n", "--ndays", dest="ndays", metavar="N", type="int", default=1,
help="number of backward days to include in the report. Default is 1 (the startday only).")
opt.add_option("-m", "--machines", dest="machines", metavar="LIST", default=None,
help="comma separated LIST of frontend host names to include in the report. I.e. -m \"vocms134, vocms135\"")
help="comma separated LIST of frontend host names to include in the report. I.e. -m \"vocms134, vocms135, vocms0134,
vocms0135\"")
opts, args = opt.parse_args()

# Find the logs root dir.
Expand Down
2 changes: 1 addition & 1 deletion admin/ProxyRenew
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
### (-R pattern) should be registered with [email protected] prior to use.
###
### export GT_PROXY_MODE=old
### myproxy-init -x -R "*/CN=vocms(34|13[2345689]|140|16[0-3]).cern.ch" \
### myproxy-init -x -R "*/CN=vocms0(34|13[2345689]|140|16[0-3]).cern.ch" \
### -c 720 -t 36 -s myproxy.cern.ch -l cmsweb_backends_$(id -un)
###
### In addition on the first time and whenever the proxy has expired, the
Expand Down
2 changes: 1 addition & 1 deletion admin/SyncLogs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/bin/sh

# Rsync append only .txt and .log files
for h in vocms{34,127,13{2,3,4,5,6,8,9},140,16{0,1,2,3}}; do
for h in vocms{34,127,13{2,3,4,5,6,8,9},140,16{0,1,2,3},034,0127,013{2,3,4,5,6,8,9},0140,016{0,1,2,3}}; do
rsync -rm -e "ssh -c arcfour256" --append -f '+s */' -f '+s *.txt' -f '+s *.log' -f '-s /***/*' cmsweb@$h:/data/srv/logs/ /build/srv-logs/$h/ 2>/dev/null
done

Expand Down
2 changes: 1 addition & 1 deletion admin/deploy
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ deploy_admin_post()

local pxlabel pxskip certs
case $host in
vocms34 | vocms127 | vocms13[2345689] | vocms140 | vocms16[0123] )
vocms34 | vocms034 | vocms127 | vocms0127 | vocms13[2345689] | vocms013[2345689] | vocms140 | vocms0140 | vocms16[0123] | vocms016[0123] )
pxlabel=cmsweb_backends ;;
* )
pxlabel=devvm_$(echo $host | tr - _) ;;
Expand Down
2 changes: 1 addition & 1 deletion base/deploy
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,6 @@ deploy_base_sw()

deploy_base_post()
{
case $host in vocms13[89] | vocms140 ) disable ;; * ) enable ;; esac
case $host in vocms13[89] | vocms140 | vocms013[89] | vocms0140 ) disable ;; * ) enable ;; esac
(mkcrontab; sysboot) | crontab -
}
6 changes: 3 additions & 3 deletions base/manage
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,11 @@ COLOR_NORMAL="\\033[0;39m"
export SEC_MOD_INI=$ROOT/auth/sitedb/security.ini
export YUI_ROOT
case $(hostname -s | tr '[:upper:]' '[:lower:]') in
vocms34 | vocms136 | vocms16[13] )
vocms34 | vocms136 | vocms16[13] | vocms034 | vocms0136 | vocms016[13] )
NODE=https://cmsweb.cern.ch ;;
vocms13[23] )
vocms13[23] | vocms013[23] )
NODE=https://cmsweb-testbed.cern.ch ;;
vocms127 )
vocms127 | vocms0127 )
NODE=https://cmsweb-dev.cern.ch ;;
* )
NODE=https://$(hostname -f) ;;
Expand Down
2 changes: 1 addition & 1 deletion bigcouch/deploy
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ deploy_bigcouch_post()

(mkcrontab
case $host in
vocms34 | vocms13[2689] | vocms16[13] | vocms140 )
vocms34 | vocms13[2689] | vocms16[13] | vocms140 | vocms034 | vocms013[2689] | vocms016[13] | vocms0140 )
disable ;;
* )
enable
Expand Down
9 changes: 7 additions & 2 deletions couchdb/deploy
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ deploy_couchdb_post()
{
(mkcrontab
case $host in
vocms34 | vocms13[69] | vocms16[13] )
vocms34 | vocms13[69] | vocms16[13] | vocms034 | vocms013[69] | vocms016[13] )
disable ;;
* )
enable
Expand All @@ -62,6 +62,11 @@ deploy_couchdb_post()
vocms132 ) tohost=vocms133;;
vocms133 ) tohost=vocms132;;
vocms127 ) tohost=vocms127;;
vocms0140 ) tohost=vocms0138;;
vocms0138 ) tohost=vocms0140;;
vocms0132 ) tohost=vocms0133;;
vocms0133 ) tohost=vocms0132;;
vocms0127 ) tohost=vocms0127;;
* ) tohost=;;
esac
[ -z "$tohost" ] ||
Expand All @@ -71,7 +76,7 @@ deploy_couchdb_post()

# Weekly archive backups to castor
case $host in
vocms140 | vocms138 | vocms13[23] | vocms127 )
vocms140 | vocms138 | vocms13[23] | vocms127 | vocms0140 | vocms0138 | vocms013[23] | vocms0127 )
klist -s # must have afs kerberos token
(acrontab -l | { fgrep -v -e " $host $project_config/" || true; }
echo "30 4 * * 0 $host $project_config/manage archive /castor/cern.ch/cms/archive/cmsweb/backups 'I did read documentation'") | acrontab
Expand Down
2 changes: 1 addition & 1 deletion crabcache/deploy
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ deploy_crabcache_sw()

deploy_crabcache_post()
{
case $host in vocms13[39] | vocms127 ) enable ;; vocms* ) disable ;; * ) enable ;; esac
case $host in vocms13[39] | vocms127 | vocms013[39] | vocms0127 ) enable ;; vocms* ) disable ;; * ) enable ;; esac

local cmd_u="$root/current/config/crabcache/manage clean 3"
cmd_u="sudo -H -u _crabcache bashs -l -c \"${cmd_u}\""
Expand Down
2 changes: 1 addition & 1 deletion crabserver/deploy
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ deploy_crabserver_sw()

deploy_crabserver_post()
{
case $host in vocms13[89] | vocms140 ) disable ;; * ) enable ;; esac
case $host in vocms13[89] | vocms140 | vocms013[89] | vocms0140 ) disable ;; * ) enable ;; esac

(mkcrontab; sysboot) | crontab -
}
Expand Down
2 changes: 1 addition & 1 deletion das/deploy
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ deploy_das_sw()

deploy_das_post()
{
case $host in vocms34 | vocms13[2689] | vocms16[13] ) disable ;; * ) enable ;; esac
case $host in vocms34 | vocms13[2689] | vocms16[13] | vocms034 | vocms013[2689] | vocms016[13] ) disable ;; * ) enable ;; esac
(mkcrontab; sysboot) | crontab -
# clean-up
local das_stage=$root/state/das/stagingarea
Expand Down
2 changes: 1 addition & 1 deletion das/manage
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ start()
{
echo "starting $ME"
# choose correct DAS map file
case $host in vocms133 ) tbed="_testbed" dbspace="_int";; * ) tbed="" dbspace="_prod";; esac
case $host in vocms133 | vocms0133 ) tbed="_testbed" dbspace="_int";; * ) tbed="" dbspace="_prod";; esac
local mapfile=$STAGEDIR/das${tbed}_maps_dbs${dbspace}.js
cp -f $mapfile $STAGEDIR/update_mapping_db.js
# start DAS service (it will load DAS maps into MongoDB and start DAS server)
Expand Down
4 changes: 2 additions & 2 deletions dbs/deploy
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,12 @@ deploy_dbs_sw()

deploy_dbs_post()
{
case $host in vocms13[89] | vocms140 ) disable ;; * ) enable ;; esac
case $host in vocms13[89] | vocms140 | vocms013[89] | vocms0140 ) disable ;; * ) enable ;; esac

(mkcrontab
sysboot
case $host in
vocms13[89] | vocms140 )
vocms13[89] | vocms140 | vocms013[89] | vocms0140 )
;;
* )
local cmd="$project_config/manage setinstances 'I did read documentation'"
Expand Down
4 changes: 2 additions & 2 deletions dbsmigration/deploy
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,12 @@ deploy_dbsmigration_sw()

deploy_dbsmigration_post()
{
case $host in vocms13[89] | vocms140 ) disable ;; * ) enable ;; esac
case $host in vocms13[89] | vocms140 | vocms013[89] | vocms0140 ) disable ;; * ) enable ;; esac

(mkcrontab
sysboot
case $host in
vocms13[89] | vocms140 )
vocms13[89] | vocms140 | vocms013[89] | vocms0140 )
;;
* )
local cmd="$project_config/manage setinstances 'I did read documentation'"
Expand Down
2 changes: 1 addition & 1 deletion dbsweb/deploy
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,6 @@ deploy_dbsweb_sw()

deploy_dbsweb_post()
{
case $host in vocms13[89] | vocms140 ) disable ;; * ) enable ;; esac
case $host in vocms13[89] | vocms140 | vocms013[89] | vocms0140 ) disable ;; * ) enable ;; esac
(mkcrontab; sysboot) | crontab -
}
2 changes: 1 addition & 1 deletion dmwmbld/deploy
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ deploy_dmwmbld_post()
) | crontab -

case $host:$root in
vocms106:/build/dmwmbld/srv | vocms22:/build/dmwmbld/srv )
vocms106:/build/dmwmbld/srv | vocms22:/build/dmwmbld/srv | vocms0106:/build/dmwmbld/srv | vocms022:/build/dmwmbld/srv )
klist -s # must have afs kerberos token
(acrontab -l | { fgrep -v -e " $host $project_config/" -e "$host ssh macms07" || true; }
echo "*/10 * * * * $host $project_config/dmwmbld_task updateweb"
Expand Down
2 changes: 1 addition & 1 deletion dmwmmon/deploy
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ deploy_dmwmmon_sw()
deploy_dmwmmon_post()
{
case $host in
vocms13[89] | vocms140 )
vocms13[89] | vocms140 | vocms013[89] | vocms0140 )
disable
opts="" ;;
* )
Expand Down
7 changes: 4 additions & 3 deletions dqmgui/deploy
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,8 @@ deploy_dqmgui_sw()

deploy_dqmgui_post()
{
case $host in vocms34 | vocms13[26] | vocms140 | vocms16[13] ) disable ;; * ) enable ;; esac
case $host in vocms34 | vocms13[26] | vocms140 | vocms16[13] | vocms034 | vocms013[26] | vocms0140 | vocms016[13] ) disable ;; * ) enable ;;
esac
case $variant in bare ) return ;; esac

(mkcrontab; sysboot
Expand All @@ -62,7 +63,7 @@ deploy_dqmgui_post()
}) | crontab -

case $host:$root in
vocms13[389]:/data/srv | vocms127:/data/srv )
vocms13[389]:/data/srv | vocms127:/data/srv )
klist -s # must have afs kerberos token
(acrontab -l | { egrep -v -e " $host.*$project_config/" || true; }
# Enable the afs-sync only on vocms138
Expand All @@ -71,7 +72,7 @@ deploy_dqmgui_post()

# Set the backup to castor.
case $host in
vocms13[89] ) echo "30 3 * * 0 $host [ \$(date +\\%e) -le 7 ] &&" \
vocms13[89] | vocms013[89] ) echo "30 3 * * 0 $host [ \$(date +\\%e) -le 7 ] &&" \
"$project_config/manage backup" \
"/castor/cern.ch/cms/archive/cmsweb/backups 'I did read documentation'" ;;
* ) ;;
Expand Down
18 changes: 9 additions & 9 deletions dqmgui/manage
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ if [ $# -ge 1 -a "$1" = "backup" ]; then
# do not source the env because we want to pick the system castor
else
case $HOST in
vocms139 | dqm-c2d07-[0,1][1,2] )
vocms139 | vocms0139 | dqm-c2d07-[0,1][1,2] )
# assume not to pollute the global environments since this
# will only be executed on 128-updated machines
. $ROOT/apps/dqmgui/128/etc/profile.d/env.sh ;;
Expand All @@ -79,8 +79,8 @@ export RFIO_USE_CASTOR_V2=YES
# Set Flavor for HOST:DOMAIN
case $HOST:$DOMAIN in
*:cms ) FLAVOR=online ;;
vocms138:* ) FLAVOR=offline-caf; ALTERNATIVE_USER='cmsweb' ;;
vocms139:* ) FLAVOR=relval; ALTERNATIVE_USER='cmsweb' ;;
vocms138:* | vocms0138:* ) FLAVOR=offline-caf; ALTERNATIVE_USER='cmsweb' ;;
vocms139:* | vocms0139:* ) FLAVOR=relval; ALTERNATIVE_USER='cmsweb' ;;
vocms*:* ) FLAVOR=dev; ALTERNATIVE_USER='cmsweb' ;;
*:cern.ch ) FLAVOR=offline;;
esac
Expand Down Expand Up @@ -206,7 +206,7 @@ start()

# first start webserver
case $HOST:${1:-webserver} in
vocms139:*webserver* )
vocms139:*webserver* | vocms0139:*webserver* )
for cfg in $CONFIGS; do
[ ! -d $STATEDIR/$cfg/ix128 ] && \
(echo Creating index $STATEDIR/$cfg/ix128; visDQMIndex create $STATEDIR/$cfg/ix128)
Expand Down Expand Up @@ -292,7 +292,7 @@ start()
$STATEDIR/online/ix128
;;

vocms139:*agents* ) # relval server
vocms139:*agents* | vocms0139:*agents* ) # relval server
refuseproc "file agents" "visDQMIndex|[^/]zip +|OnlineSync|visDQMCreateInfo" "refusing to restart"

# standard lot of agents
Expand Down Expand Up @@ -359,7 +359,7 @@ start()
done
;;

vocms138:*agents* ) # offline
vocms138:*agents* | vocms0138:*agents* ) # offline
refuseproc "file agents" "visDQMIndex|[^/]zip +|OnlineSync|visDQMCreateInfo" "refusing to restart"

# standard lot of agents
Expand Down Expand Up @@ -456,7 +456,7 @@ start()
done
;;

vocms13[89]:*stageout* ) # offline
vocms13[89]:*stageout* | vocms013[89]:*stageout* ) # offline
refuseproc "stageout agents" "visDQMZipCastorStager"

# standard lot of agents
Expand All @@ -473,7 +473,7 @@ start()
done
;;

vocms138:*afs-sync* )
vocms138:*afs-sync* | vocms0138:*afs-sync* )
refuseproc "afs sync" "visDQMAfsSync"

DIRS=OnlineData,OfflineData/HIRun2011/StreamHIExpress
Expand Down Expand Up @@ -556,7 +556,7 @@ start()
done' </dev/null 2>&1 | rotatelogs $LOGDIR/agent-migration-%Y%m%d.log 86400 >/dev/null 2>&1 &
;;

vocms116:*migration* ) # offline
vocms116:*migration* | vocms0116:*migration* ) # offline
refuseproc "migration agents" "visDQMMigrationProcess" "refusing to restart"

for i in $(seq 1 $(expr 5 + $(expr $(date +%s) % 10))); do key=$RANDOM; done
Expand Down
2 changes: 1 addition & 1 deletion dqmgui/server-conf-relval.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
# to test the relval server configuration on their local machine, they
# are still able to do that using the old schema.

if socket.gethostname().lower().split('.')[0] == 'vocms139':
if socket.gethostname().lower().split('.')[0] in ['vocms139','vocms0139'] :
server.source('DQMArchive', "%s/ix128" % STATEDIR, '^/Global/')
else:
server.source('DQMArchive', "%s/ix" % STATEDIR, '^/Global/')
Expand Down
2 changes: 1 addition & 1 deletion filemover/deploy
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ deploy_filemover_post()
{
(mkcrontab
case $host in
vocms34 | vocms13[2689] | vocms16[13])
vocms34 | vocms13[2689] | vocms16[13] | vocms034 | vocms013[2689] | vocms016[13])
disable ;;
* )
enable
Expand Down
2 changes: 1 addition & 1 deletion frontend/backends-preprod.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
^/auth/complete/dqm/(?:offline|caf)(?:/|$) vocms138.cern.ch
^/auth/complete/dqm/relval(?:/|$) vocms139.cern.ch
^/auth/complete/dqm/dev(?:/|$) vocms133.cern.ch
^/auth/complete/(?:couchdb/asynctransfer|aso-monitor|couchdb2)(?:/|$) vocms132.cern.ch :affinity
^/auth/complete/(?:couchdb/asynctransfer|aso-monitor|couchdb2)(?:/|$) vocms132.cern.ch :affinity
^/auth/complete/(?:couchdb|workqueue|wmstats|workloadsummary|alertscollector|tier0_wmstats|t0_workloadsummary|acdcserver)(?:/|$) vocms133.cern.ch :affinity
^/auth/complete/(?:c)(?:couchdb|workqueue|wmstats|workloadsummary|alertscollector|tier0_wmstats|t0_workloadsummary|acdcserver|aso-monitor)(?:/|$) vocms133.cern.ch :affinity
^/auth/complete/(?:crabcache|das)(?:/|$) vocms133.cern.ch
Expand Down
6 changes: 4 additions & 2 deletions frontend/deploy
Original file line number Diff line number Diff line change
Expand Up @@ -97,9 +97,11 @@ deploy_frontend_post()
"PYTHONPATH=$project_auth:\$PYTHONPATH $project_config/mkauthmap" \
"$silent -c sitedbread.db -o $PWD/etc/authmap.json"
case $host in
vocms135 | vocms162 ) ;;
vocms160 ) echo "23 */6 * * * $project_config/update-keys $PWD vocms162" ;;
vocms135 | vocms162 | vocms0135 | vocms0162 ) ;;
vocms160 ) echo "23 */6 * * * $project_config/update-keys $PWD vocms162" ;;
vocms0160 ) echo "23 */6 * * * $project_config/update-keys $PWD vocms0162" ;;
vocms134 ) echo "23 */6 * * * $project_config/update-keys $PWD vocms135" ;;
vocms0134 ) echo "23 */6 * * * $project_config/update-keys $PWD vocms0135" ;;
*) echo "23 */6 * * * $project_config/update-keys $PWD" ;;
esac) | crontab -

Expand Down
4 changes: 2 additions & 2 deletions gitweb/deploy
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ deploy_gitweb_sw()

deploy_gitweb_post()
{
case $host in vocms13[89] | vocms140 ) disable;; * ) enable;; esac
case $host in vocms13[89] | vocms140 | vocms013[89] | vocms0140 ) disable;; * ) enable;; esac

rm -fr $PWD/{htdocs,etc,var}
(set -e
Expand All @@ -43,7 +43,7 @@ deploy_gitweb_post()
klist -s # must have afs kerberos token
(acrontab -l | { fgrep -v -e " $host $project_config/" || true; }
[ ! -f $root/enabled/$project ] || echo "6 * * * * $host $project_config/manage get siteconf 'I did read documentation'"
case $host in vocms136 )
case $host in vocms136 | vocms0136 )
echo "6 */3 * * * $host $project_config/manage updateadmins siteconf 'I did read documentation'" ;;
esac
) | acrontab
Expand Down
2 changes: 1 addition & 1 deletion mongodb/deploy
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,6 @@ deploy_mongodb_sw()

deploy_mongodb_post()
{
case $host in vocms34 | vocms13[2689] | vocms16[13] ) disable ;; * ) enable ;; esac
case $host in vocms34 | vocms13[2689] | vocms16[13] | vocms034 | vocms013[2689] | vocms016[13] ) disable ;; * ) enable ;; esac
(mkcrontab; sysboot) | crontab -
}
3 changes: 2 additions & 1 deletion overview/deploy
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@ deploy_overview_sw()

deploy_overview_post()
{
case $host in vocms34 | vocms13[3689] | vocms140 | vocms161 ) disable ;; * ) enable ;; esac
case $host in vocms34 | vocms13[3689] | vocms140 | vocms161 | vocms034 | vocms013[3689] | vocms0140 | vocms0161 ) disable ;; * ) enable ;;
esac
(mkcrontab; sysboot
cmd="$project_config/daily"
$nogroups || cmd="sudo -H -u _overview bashs -l -c '$cmd'"
Expand Down
Loading

0 comments on commit 611dd79

Please sign in to comment.