-
Notifications
You must be signed in to change notification settings - Fork 107
Patching production machine
Sometimes we need to patch directly production wmagent. (It is not always possible to redeploy the production machine) In that case, we SHOUDN'T directly change the source code in production agent.
The procedure goes I like this.
-
Identify the problem, and if you need to create the patch. Need to create the fetch according to the production version of agent.
i.e. If production version is 0.9.7, create the patch against 0.9.7. not the master branch
-
Throughly test the patch and apply to production.
$ curl https://patch-diff.githubusercontent.com/raw/dmwm/WMCore/pull/[patch_number].patch | patch -d /data/srv/wmagent/current/apps/wmagent/lib/python2.7/site-packages/ -p3
Tier0Agent: need to change [] with current version of Tier0 and WMAgent respectfully in order below.
$ curl https://patch-diff.githubusercontent.com/raw/dmwm/WMCore/pull/[patch_number].patch | patch -d /data/tier0/srv/wmagent/[2.1.2]/sw/slc7_amd64_gcc630/cms/wmagent/[1.1.12.patch2]/lib/python2.7/site-packages/ -p3
2.1 adding couch patch.
$ curl https://patch-diff.githubusercontent.com/raw/dmwm/WMCore/pull/[patch_number].patch | patch -d /data/srv/wmagent/current/apps/wmagent/data -p2
2.2 push the couchapp to right application (execute-reqmgr, execute-workqueue, execute-wmagent)
$ $manage execute-agent wmagent-couchapp-init
-
restart component affected by patch and monitor
$ $manage execute-agent wmcoreD --restart --component AnlayticsDataCollector
-
update the patch list in the twiki here