CMSCompOps / wtc-console

MIT License
1 stars 1 forks source link

sites suggestions in the console #14

Open vlimant opened 5 years ago

vlimant commented 5 years ago

trying http://vocms0116.cern.ch/tasks when going "manual" one needs a "unselect all".

in addition (I don't recall where this discussion happened) the list of site should not be made task specific, because it makes the console impractical. so indeed this came up as a request in #4 and https://github.com/CMSCompOps/wtc-console/issues/4#issuecomment-454009709 but the list, as it was explicitely designed with @vined should be there upfront, and not task specific

vlimant commented 5 years ago

there should be a "hide / show" button for the site list. show : the big list of tick boxes, hide : a sorted comma separated list of the selected sites

vlimant commented 5 years ago

playing either with http://vocms0116.cern.ch/tasks or http://vocms0276.cern.ch/tasks the actions do get in mongodb for both. however, even if I selected a site, it does not get set properly ; i.e. I get an empty list in mongodb.

{u'timestamp': 1550051732L, u'acted': 0, u'_id': ObjectId('5c63e994ee453f295b9f2256'), u'name': u'/vlimant_task_HIG-RunIIFall17wmLHEGS-02271__v1_T_190118_172127_2013/HIG-RunIIFall17wmLHEGS-02271_0/HIG-RunIIFall17DRPremix-02981_0/HIG-RunIIFall17DRPremix-02981_1', u'parameters': {u'action': u'acdc', u'reasons': [], u'xrootd': u'disabled', u'sites': [], u'secondary': u'disabled'}}

for example, while T2_PL_Swierk box was properly tick (NB https://github.com/CMSCompOps/wtc-console/issues/11#issuecomment-461373471, one needs the "workflow" field)

dabercro commented 5 years ago

The recovery docs list different sites for different tasks, which suggests some tasks can only run at certain sites. Also, the current view of a site list per task was explicitly requested by @sharad1126

Did you check both databases? vocms0116 is the one up to date, so one of the databases will probably be incomplete if you did the same thing with 0116 and 0276.

vlimant commented 5 years ago

I know this was a request

so indeed this came up as a request in #4 and #4 (comment)

it might not have been the best recommendation of all time. yes to checking both db : site = [] in both, even if I had a site checked on the console

vargasa commented 5 years ago

however, even if I selected a site, it does not get set properly ; i.e. I get an empty list in mongodb. @vlimant

vocms instances do not have the latest commits that were just merged and these are related with the sites entry you are mentioning

vargasa commented 5 years ago

@vlimant Can you please check again if you find the same error by using vocms0116?

vlimant commented 5 years ago

since it is not wired to anything yet, can you please insert one and check that its shows up fine in mongodb ? I cannot really do it right now.

vargasa commented 5 years ago

vocms0116 is using vocms0274 for mongodb. I have access to the former not to the later.

EDIT: Actually I do. It is now showing sites:

{ "_id" : ObjectId("5c649a63ee453f10cae76dcd"), "name" : "/pdmvserv_task_EXO-RunIIFall17NanoAODv4-01241__v1_T_190118_032613_2330/EXO-RunIIFall17NanoAODv4-01241_0", "acted" : 0, "timestamp" : NumberLong(1550096995), "parameters" : { "action" : "acdc", "xrootd" : "disabled", "secondary" : "disabled", "sites" : [ "T2_US_UCSD" ], "reasons" : [ ] } }
vlimant commented 5 years ago

you can setup a simple pymongo client

import pymongo,ssl
client = pymongo.MongoClient('mongodb://%s/?ssl=true'%mongo_db_url,ssl_cert_reqs=ssl.CERT_NONE)
db = client['wtc-console'].task_action
items = db.find()

saw this

{u'timestamp': 1550096995L, u'acted': 0, u'_id': ObjectId('5c649a63ee453f10cae76dcd'), u'name': u'/pdmvserv_task_EXO-RunIIFall17NanoAODv4-01241__v1_T_190118_032613_2330/EXO-RunIIFall17NanoAODv4-01241_0', u'parameters': {u'action': u'acdc', u'reasons': [], u'xrootd': u'disabled', u'sites': [u'T2_US_UCSD'], u'secondary': u'disabled'}}

it seems to work then. thx