cmsgwms-submit1

Agent tweaks

UPDATE wmbs_location SET state=(SELECT id from wmbs_location_state where name='Normal') WHERE state!=(SELECT id from wmbs_location_state where name='Normal');
UPDATE wmbs_location SET running_slots=2000, pending_slots=1000;
UPDATE rc_threshold SET max_slots=2000, pending_slots=1000;
  • Set maxRetries to 0 ==> OK
  • Run PhEDExFix ==> NOPE

Jobs in Condor

[cmsdataops@cmsgwms-submit1 current]$ condorq
[cmsdataops@cmsgwms-submit1 current]$ 

Jobs ordered by status (must be empty or cleanout jobs only)

SQL> select wmbs_job_state.name, count(*)
from wmbs_job
join wmbs_job_state on (wmbs_job.state = wmbs_job_state.id)
group by wmbs_job.state, wmbs_job_state.name;
+----------+----------+
| name     | count(*) |
+----------+----------+
| cleanout |     3084 |
+----------+----------+
1 row in set (0.00 sec)

Workflows in the System (workflow status must be one of those final status)

MariaDB [wmagent]> SELECT DISTINCT name from wmbs_workflow;
+---------------------------------------------------------------------+
| name                                                                |
+---------------------------------------------------------------------+
| fabozzi_HIRun2015-HIFlowCorr-25Aug2016_758p5_160826_162420_2962     |  completed
| fabozzi_HIRun2015-HIMinimumBias2-25Aug2016_758p5_160826_162405_3905 |  running-closed
+---------------------------------------------------------------------+
2 rows in set (0.00 sec)

and what matters is only, well, they are ALL at least in complete status.

NONE

Workflows not fully injected (this must be empty)

MariaDB [wmagent]> select distinct name from wmbs_workflow where injected = 0;  
Empty set (0.00 sec)

Checking the workqueue{_inbox} status in the local agent:

[cmsdataops@cmsgwms-submit1 current]$ wget -nv https://raw.githubusercontent.com/amaltaro/ProductionTools/master/localWorkQueueStatus.py
[cmsdataops@cmsgwms-submit1 current]$ source /data/srv/wmagent/current/apps/wmagent/etc/profile.d/init.sh
[cmsdataops@cmsgwms-submit1 current]$ python localWorkQueueStatus.py 
INFO:root:************* LOCAL workqueue elements summary ************
INFO:root:Found a total of 2 elements in the 'workqueue_inbox' db
INFO:root:{u'Done': 2}
INFO:root:Found a total of 2 elements in the 'workqueue' db
INFO:root:{u'Done': 2}
INFO:root:

Subscriptions not finished

SQL> select distinct wmbs_workflow.name AS wfName
   FROM wmbs_subscription
   INNER JOIN wmbs_fileset ON wmbs_subscription.fileset = wmbs_fileset.id
   INNER JOIN wmbs_workflow ON wmbs_workflow.id = wmbs_subscription.workflow
   where wmbs_subscription.finished = 0 ORDER BY wmbs_workflow.name;
Empty set (0.00 sec)

and they are all either aborted or announced. So let's switch their subscription to finished:

MariaDB [wmagent]> UPDATE wmbs_subscription SET finished=1 WHERE finished=0;
Query OK, 77 rows affected (0.04 sec)
Rows matched: 77  Changed: 77  Warnings: 0

Files available in WMBS (waiting for job creation)

MariaDB [wmagent]> select subscription,count(*) from wmbs_sub_files_available group by subscription;
Empty set (0.00 sec)

Checking workflows with files still available:

SQL> SELECT wmbs_workflow.name, count(wmbs_sub_files_available.subscription), count(wmbs_sub_files_available.fileid)
  FROM wmbs_sub_files_available
  INNER JOIN wmbs_subscription ON wmbs_sub_files_available.subscription = wmbs_subscription.id
  INNER JOIN wmbs_workflow ON wmbs_subscription.workflow = wmbs_workflow.id
  GROUP BY wmbs_workflow.name;
Empty set (0.00 sec)

Files acquired or acquired in WMBS (waiting for job to finish)

MariaDB [wmagent]>  select subscription,count(*) from wmbs_sub_files_acquired group by subscription;
Empty set (0.00 sec)

Files and Blocks in Phedex and DBS

Blocks open in DBS

MariaDB [wmagent]> SELECT * FROM dbsbuffer_block WHERE status!='Closed';
Empty set (0.07 sec)

Files not updated DBS

MariaDB [wmagent]> SELECT * from dbsbuffer_file where status = 'NOTUPLOADED';
Empty set (0.87 sec)

Files not injected in Phedex, with parent block id (can be recovered)

SQL> SELECT * FROM dbsbuffer_file
WHERE in_phedex=0
AND block_id IS NOT NULL
AND lfn NOT LIKE '%unmerged%'
AND lfn NOT LIKE 'MCFakeFile%'
AND lfn NOT LIKE '%BACKFILL%'
AND lfn NOT LIKE '/store/user%';
Empty set (0.88 sec)

Files not in phedex without parent block id (cannot be recovered) Possible input files.

SQL> SELECT count(*) FROM dbsbuffer_file
WHERE in_phedex=0
AND block_id IS NULL
AND lfn NOT LIKE '%unmerged%' 
AND lfn NOT LIKE 'MCFakeFile%'
AND lfn NOT LIKE '%BACKFILL%'
AND lfn NOT LIKE '/store/backfill/%'
AND lfn NOT LIKE '/store/user%';
+----------+
| count(*) |
+----------+
|    25958 |
+----------+
1 row in set (0.05 sec)

So we run fix Phedex to update the files not in phedex

[cmsdataops@cmsgwms-submit1 current]$ curl http://amaltaro.web.cern.ch/amaltaro/forAlan/newFixPhEDEx.py > newFixPhedex.py
[cmsdataops@cmsgwms-submit1 current]$ python newFixPhedex.py 
Shutting down PhEDExInjector...
Checking 4326 dataset in both PhEDEx and DBS ...
100/4326 files processed
...
150700/150814 files processed
150800/150814 files processed
Found 552506 out of 554695 files that are already registered in PhEDEx            but buffer doesn't know
Fixing them now, it may take several minutes ...
Rows were successfully updated! Good job!
Starting PhEDExInjector now ...

started with pid 2937253

And we check afterwards

SQL> SELECT lfn FROM dbsbuffer_file
WHERE in_phedex=0
AND block_id IS NULL
AND lfn NOT LIKE '%unmerged%' 
AND lfn NOT LIKE 'MCFakeFile%'
AND lfn NOT LIKE '%BACKFILL%'
AND lfn NOT LIKE '/store/backfill/%'
AND lfn NOT LIKE '/store/user%' ORDER BY lfn;
Empty set (0.04 sec)

Good to go!

Edit | Attach | Watch | Print version | History: r25 < r24 < r23 < r22 < r21 | Backlinks | Raw View | Raw edit | More topic actions...
Topic revision: r24 - 2016-09-16 - AlanMalta
 
    • Cern Search Icon Cern Search
    • TWiki Search Icon TWiki Search
    • Google Search Icon Google Search

    CMSPublic All webs login

This site is powered by the TWiki collaboration platform Powered by PerlCopyright & 2008-2021 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
or Ideas, requests, problems regarding TWiki? use Discourse or Send feedback