dmwm / WMCore

Core workflow management components for CMS.
Apache License 2.0
46 stars 107 forks source link

ReqMgr needs to run the command to update releases periodically #1499

Closed sfoulkes closed 12 years ago

sfoulkes commented 13 years ago

Stuff it into a cron job or something. Maybe every hour.

DMWMBot commented 13 years ago

rickw: patch submitted with #1474. Please review.

DMWMBot commented 13 years ago

rickw: Ignore the above comment. The fix to the deployment is in this patch, along with the config upgrades for 0.7.5, and the couchdb setup. Please review.

geneguvo commented 13 years ago

diego: Hi,

I did a few changes, specially to the cronjob setup. Patch attached.

The still open issues are:

Diego.

geneguvo commented 13 years ago

diego: The deployment scripts are now done. Please review.

I've found some problems with reqmgr code itself. I'll report on a separate thread.

geneguvo commented 13 years ago

diego: Once you fix the issues reported in yesterday's meeting, please send the patch for review in the webtools list.

geneguvo commented 13 years ago

diego: I've attached the latest reqmgr patch I've been working with.

DMWMBot commented 13 years ago

rickw: Hi, Diego,

Here's what the deploy script should look like. I won't have a workable tag until tomorrow, so could you please look this over for now?

I guess I'll have to go through logic like this to get the couchapps pointed to the correct DB: {{{ local couchdb_string="http://localhost:5984" case $host in vocms106 | vocms107 | vocms50 | vocms53): couchdb_string="https://cmsweb.cern.ch/couchdb";; vocms51 | vocms132 | vocms133): couchdb_string="https://cmsweb-testbed.cern.ch/couchdb";; vocms127): couchdb_string ="https://cmsweb-dev.cern.ch/couchdb";; cmsreqmgr): couchdb_string="https://cmsreqmgr.cern.ch/couchdb";; esac

  local hour=0

  for area in compaction stagingarea replication backup; do
    rm -f $couchdb_state/$area/reqmgr
    touch $couchdb_state/$area/reqmgr
  done

  local couch_crons=""
  local reqmgrapp=$root/current/apps/reqmgr
  echo "couchapp push $reqmgrapp/lib/couchapps/ReqMgr $couchdb_string/reqmgr_workload_cache" \
      >> $couchdb_state/stagingarea/reqmgr
  echo "couchapp push $reqmgrapp/lib/couchapps/ConfigCache $couchdb_string/reqmgr_config_cache" \
      >> $couchdb_state/stagingarea/reqmgr

}}}

Will there be any permission issues from the command line?

{{{ couchapp push /data/current/apps/reqmgr/lib/couchapps/ReqMgr https://cmsreqmgr.cern.ch/couchdb/reqmgr_workload_cache 2011-05-24 01:58:15 [CRITICAL] {'msg': '', 'status_int': 403, 'response': <couchapp.client.CouchdbResponse object at 0x16757fd0>}

Traceback (most recent call last): File "/data/0.7.6a/sw.rpw/slc5_amd64_gcc434/external/couchapp/0.7.1-comp/lib/python2.6/site-packages/couchapp/dispatch.py", line 48, in dispatch return _dispatch(args) File "/data/0.7.6a/sw.rpw/slc5_amd64_gcc434/external/couchapp/0.7.1-comp/lib/python2.6/site-packages/couchapp/dispatch.py", line 92, in _dispatch return fun(conf, conf.app_dir, _args, *_opts) File "/data/0.7.6a/sw.rpw/slc5_amd64_gcc434/external/couchapp/0.7.1-comp/lib/python2.6/site-packages/couchapp/commands.py", line 74, in push dbs = conf.get_dbs(dest) File "/data/0.7.6a/sw.rpw/slc5_amd64_gcc434/external/couchapp/0.7.1-comp/lib/python2.6/site-packages/couchapp/config.py", line 149, in get_dbs return [Database(dburl) for dburl in dburls] File "/data/0.7.6a/sw.rpw/slc5_amd64_gcc434/external/couchapp/0.7.1-comp/lib/python2.6/site-packages/couchapp/client.py", line 210, in init self.res.head() File "/data/0.7.6a/sw.rpw/slc5_amd64_gcc434/external/py2-restkit/2.2.1-comp/lib/python2.6/site-packages/restkit/resource.py", line 144, in head return self.request("HEAD", path=path, headers=headers, **params) File "/data/0.7.6a/sw.rpw/slc5_amd64_gcc434/external/couchapp/0.7.1-comp/lib/python2.6/site-packages/couchapp/client.py", line 126, in request raise Unauthorized(e) Unauthorized: {'msg': '', 'status_int': 403, 'response': <couchapp.client.CouchdbResponse object at 0x16757fd0>} }}}

DMWMBot commented 13 years ago

rickw: It was in a patch submitted to cms-service-webtools on July 18th, but never made it in. I'll submit it in another patch for the next 081 prerelease.

sfoulkes commented 13 years ago

sfoulkes: There are a couple patches attached to this, are none of them relevant?

geneguvo commented 13 years ago

diego: Hi,

By "update releases" do you mean to run the "updateversions" cronjob? I've already included changes to run it properly every hour. See:

https://svnweb.cern.ch/trac/CMSDMWM/browser/Infrastructure/trunk/Deployment/reqmgr/deploy

If it means something else, just do the same thing as for "updateversions".

For what concern, we now have dev, preprod and prod variants for ReqMgr. However, we don't allow creating/deleting databases (pushing couchapps) across different hosts. That should always be done through localhost.

Diego.

sfoulkes commented 13 years ago

sfoulkes: Yes, updateversions cron jobs is what I mean. Closing this.