Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update the machine names #6

Merged
merged 6 commits into from
Feb 13, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion applets/analyze_files.py
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ def run_greenlet(self):

time.sleep(105)

@fff_cluster.host_wrapper(allow = ["bu-c2f13-31-01", "bu-c2f11-09-01", "bu-c2f11-13-01"])
@fff_cluster.host_wrapper(allow = ["dqmrubu-c2a06-05-01", "dqmrubu-c2a06-01-01", "dqmrubu-c2a06-03-01"])
@fff_dqmtools.fork_wrapper(__name__, uid="dqmpro", gid="dqmpro")
@fff_dqmtools.lock_wrapper
def __run__(opts, logger, **kwargs):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import fff_cluster
import logging

@fff_cluster.host_wrapper(allow = ["bu-c2f11-19-01"])
@fff_cluster.host_wrapper(allow = ["dqmrubu-c2a06-05-01"])
@fff_dqmtools.fork_wrapper(__name__, uid="dqmpro", gid="dqmpro")
@fff_dqmtools.lock_wrapper
def __run__(opts, **kwargs):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@
import applets.fff_deleter as fff_deleter
import logging

@fff_cluster.host_wrapper(allow = ["bu-c2f11-09-01"])
@fff_cluster.host_wrapper(allow = ["dqmrubu-c2a06-01-01"])
@fff_dqmtools.fork_wrapper(__name__)
@fff_dqmtools.lock_wrapper
def __run__(opts, **kwargs):
log = kwargs["logger"]

ramdisk = "/fff/ramdisk/"
tag = "fff_deleter_c2f11_09_01"
tag = "fff_deleter_c2a06_01_01"

service = fff_deleter.FileDeleter(
top = ramdisk,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@

import logging

@fff_cluster.host_wrapper(allow = ["bu-c2f11-19-01"])
@fff_cluster.host_wrapper(allow = ["dqmrubu-c2a06-05-01"])
@fff_dqmtools.fork_wrapper(__name__)
@fff_dqmtools.lock_wrapper
def __run__(opts, **kwargs):
log = kwargs["logger"]

ramdisk = "/fff/output/lookarea/"
tag = "fff_deleter_lookarea_c2f11_19_01"
tag = "fff_deleter_lookarea_c2a06_05_01"

service = fff_deleter.FileDeleter(
top = ramdisk,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@
import fff_cluster
import logging

@fff_cluster.host_wrapper(allow = ["bu-c2f11-19-01"])
@fff_cluster.host_wrapper(allow = ["dqmrubu-c2a06-05-01"])
@fff_dqmtools.fork_wrapper(__name__)
@fff_dqmtools.lock_wrapper
def __run__(opts, **kwargs):
log = kwargs["logger"]

ramdisk = "/cmsnfsdqmminidaq/dqmminidaq/"
tag = "fff_deleter_minidaq_c2f11_19_01"
tag = "fff_deleter_minidaq_c2a06_05_01"

service = fff_deleter.FileDeleter(
top = ramdisk,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@
import applets.fff_deleter as fff_deleter
import logging

@fff_cluster.host_wrapper(allow = ["bu-c2f11-13-01"])
@fff_cluster.host_wrapper(allow = ["dqmrubu-c2a06-03-01"])
@fff_dqmtools.fork_wrapper(__name__)
@fff_dqmtools.lock_wrapper
def __run__(opts, **kwargs):
log = kwargs["logger"]

ramdisk = "/fff/ramdisk/"
tag = "fff_deleter_playback_c2f11_13_01"
tag = "fff_deleter_playback_c2a06_03_01"

service = fff_deleter.FileDeleter(
top = ramdisk,
Expand Down
2 changes: 1 addition & 1 deletion applets/fff_simulator.py
Original file line number Diff line number Diff line change
Expand Up @@ -579,7 +579,7 @@ def handle_line(self, line, write_f):

run.control(line.strip(), write_f)

@fff_cluster.host_wrapper(allow = ["bu-c2f11-13-01"])
@fff_cluster.host_wrapper(allow = ["dqmrubu-c2a06-03-01"])
@fff_dqmtools.fork_wrapper(__name__)
@fff_dqmtools.lock_wrapper
def __run__(**kwargs):
Expand Down
10 changes: 5 additions & 5 deletions applets/fff_web.py
Original file line number Diff line number Diff line change
Expand Up @@ -373,8 +373,8 @@ def setup_routes(self):
static_path = os.path.join(static_path, "../web.static/")

# from wsgiproxy.app import WSGIProxyApp
# proxy_app = WSGIProxyApp("https://fu-c2f11-15-02.cms:9215/sync_proxy")
# root.mount(proxy_app,"/dqm/dqm-square-origin/redirect/fu-c2f11-15-02.cms:9215/sync")
# proxy_app = WSGIProxyApp("https://dqmrubu-c2a06-03-01.cms:9215/sync_proxy")
# root.mount(proxy_app,"/dqm/dqm-square-origin/redirect/dqmrubu-c2a06-03-01.cms:9215/sync")

# the decorator to enable cross domain communication
# for http-proxy stuff
Expand Down Expand Up @@ -733,12 +733,12 @@ def cr_api():
return json.dumps( answer )

if what == "get_simulator_config" :
host = bottle.request.query.get('host', default="bu-c2f11-13-01")
host = bottle.request.query.get('host', default="dqmrubu-c2a06-03-01")
answer = fff_cluster.get_simulator_config( self.opts, fff_cluster.get_host(), host )
return json.dumps( answer )

if what == "get_simulator_runs" :
host = bottle.request.query.get('host', default="bu-c2f11-13-01")
host = bottle.request.query.get('host', default="dqmrubu-c2a06-03-01")
answer = fff_cluster.get_simulator_runs( self.opts, fff_cluster.get_host(), host )
return json.dumps( answer )

Expand Down Expand Up @@ -771,7 +771,7 @@ def cr_api():
return json.dumps( [answer] )

if what == "start_playback_run" :
host = bottle.request.query.get('host', default="bu-c2f11-13-01")
host = bottle.request.query.get('host', default="dqmrubu-c2a06-03-01")
if( fff_cluster.get_host() != host ) :
url = 'http://' + host + ':' + str(self.opts["web.port"]) + '/cr/exe?' + bottle.request.urlparts.query
r = requests.get(url, data=bottle.request.body, headers = bottle.request.headers, timeout=60)
Expand Down
11 changes: 8 additions & 3 deletions fff_cluster.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,16 @@
import json

clusters = {
'production_c2f11': ["bu-c2f11-09-01.cms", "fu-c2f11-11-01.cms", "fu-c2f11-11-02.cms", "fu-c2f11-11-03.cms", "fu-c2f11-11-04.cms", ],
'playback_c2f11': ["bu-c2f11-13-01.cms", "fu-c2f11-15-01.cms", "fu-c2f11-15-02.cms", "fu-c2f11-15-03.cms", "fu-c2f11-15-04.cms", ],
'lookarea_c2f11': ["bu-c2f11-19-01.cms", ]
# 'production_c2f11': ["bu-c2f11-09-01.cms", "fu-c2f11-11-01.cms", "fu-c2f11-11-02.cms", "fu-c2f11-11-03.cms", "fu-c2f11-11-04.cms", ],
# 'playback_c2f11': ["bu-c2f11-13-01.cms", "fu-c2f11-15-01.cms", "fu-c2f11-15-02.cms", "fu-c2f11-15-03.cms", "fu-c2f11-15-04.cms", ],
# 'lookarea_c2f11': ["bu-c2f11-19-01.cms", ]
'production_c2a06': ["dqmrubu-c2a06-01-01.cms", "dqmfu-c2b01-45-01.cms", "dqmfu-c2b02-45-01"],
'playback_c2a06': ["dqmrubu-c2a06-03-01.cms", "dqmfu-c2b01-45-01.cms", "dqmfu-c2b02-45-01"],
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No .cms postfix in dqmfu-c2b02-45-01 machine name

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@pmandrik please take a look of the a9923f8 commit again. sorry for the silly mistake.

'lookarea_c2a06': ["dqmrubu-c2a06-05-01.cms"]
}



def popen_timeout(cmd, seconds=10):
kill = lambda process: process.kill()
p = subprocess.Popen(cmd, shell=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
Expand Down
8 changes: 4 additions & 4 deletions fff_dqmtools.py
Original file line number Diff line number Diff line change
Expand Up @@ -395,13 +395,13 @@ def detach(logfile, pidfile):
default_applets = [
"fff_web", "fff_selftest", "fff_logcleaner", "fff_logcleaner_gzip", "fff_filemonitor",

"fff_deleter_c2f11_09_01", "fff_deleter_playback_c2f11_13_01",
"fff_deleter_lookarea_c2f11_19_01", "fff_deleter_minidaq_c2f11_19_01",
"fff_deleter_c2a06_01_01", "fff_deleter_playback_c2a06_03_01",
"fff_deleter_lookarea_c2a06_05_01", "fff_deleter_minidaq_c2a06_05_01",
"fff_deleter_minidaq_cms904",

"fff_simulator",
"analyze_files", "analyze_files_lookarea_c2f11_19_01", "analyze_releases",
]
"analyze_files", "analyze_files_lookarea_c2a06_05_01", "analyze_releases",
]

config_web_secret = "changeme"
try:
Expand Down
4 changes: 2 additions & 2 deletions utils/makerpm.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ cd $BUILDDIR

cat > fff-dqmtools.spec <<EOF
Name: fff-dqmtools
Version: 1.8.1
Version: 1.9.1
Release: 1
Summary: DQM tools for FFF.
License: gpl
Expand All @@ -27,7 +27,7 @@ Provides:/etc/logrotate.d/fff_dqmtools
Provides:/etc/init.d/fff_dqmtools
Requires:python36, python3-gevent >= 1.2.2, python3-requests
%description
DQM tools for FFF.
DQM tools for FFF and new DQM machines.
%prep
%build
%install
Expand Down
3 changes: 2 additions & 1 deletion web.static/js/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,8 @@ dqmApp.controller('NavigationCtrl', [
/// return for web outside P5 (always via cmsweb-testbed or cmsweb frontier redirection)
var local_token = tokens[2];
var local = window.location.href;
if( local_token.includes("bu-c2f11-13-01") ){ // hard code check of entry point
// if( local_token.includes("bu-c2f11-13-01") ){ // hard code check of entry point
if( local_token.includes("dqmrubu-c2a06-03-01") ){ // hard code check of entry point
if( local.includes("cmsweb-testbed") ){
return "https://cmsweb-testbed.cern.ch/dqm/dqm-square-origin/sync_proxy";
}
Expand Down