PerfWatcher

Performance Monitoring based on Collectd

View the Project on GitHub perfwatcher/perfwatcher

Maintain a release branch of collectd-pw in Git

Note : this was working with 5.1.x and 5.2.0. Since 5.2.1, we maintain patchs and plugin in branchs and do not merge any more. We only git cherry-pick the commits we need to the release branchs.

Create a new branch from upstream

A new version is released upstream. We will merge it.

WARNING : this will delete all files in your current repository (if not saved in a branch)

First, update the upstream branch (called here up/master). Then create a new branch. Then return back to the upstream release

# Update the local copy of upstream collectd (master or any release branch)
  $ git remote update
  $ git checkout up/master
  $ git pull
# Create the new branch
  $ git branch release/5.3.0
# Go back to the last release commit
  $ git log --oneline
  $ git reset --hard xxxxxx

Clean, build, make some basic checks before pushing on perfwatcher repo

$ git push -n origin release/5.3.0
$ git push origin release/5.3.0

WARNING : first git push -n to check that you do not push unwanted stuff (like unwanted tags - it happened to me)

Note : if you have an error RPC failed; result=56..., edit your git config (git config or vi ~/.gitconfig) and set the http.postbuffer variable to something bigger (http.postbuffer=5M for release/5.1.1)

Now, apply all needed Perfwatcher patches that make the difference between collectd-vanilla and collectd-pw

  $ git merge patch/cpu
  $ git merge patch/perfwatcher_addons
  [...]
  $ git merge plugin/aggregator
  $ git merge plugin/jsonrpc
  [...]

For each merge, do not forget that there was no conflict. If any, resolve with git mergetool then commit again with git commit.

Again, clean, build, make some basic checks before pushing on perfwatcher repo

$ git push -n origin release/5.3.0
$ git push origin release/5.3.0
$ git tag -a "collectd-5.3.0-20130829" -m "Unofficial version 5.3.0-20130829 with perfwatcher patches"
$ git push -u -n origin refs/tags/collectd-5.3.0-20130829
$ git push -u origin refs/tags/collectd-5.3.0-20130829

Then release : make distcheck and upload the tar.gz file.

Create a new patch

Note : the following is an example with the patch buggyfix.

Create a test branch

$ git checkout release/5.3.0
$ git branch test
$ git checkout test

Now work on your patch then commit the changes (git commit -a) in the test branch. Pay attention to the commit sha (or get it with git log --oneline).

Then create a new patch/plugin branch

$ git checkout release/5.3.0
$ git branch patch/buggyfix
$ git checkout buggyfix
$ git reset --hard xxxxxx

The last command is used to get back to an unpatched version of collectd-pw (to make it easier to make generic patches).

Copy your patch to the patch/plugin branch with cherry-pick

$ git cherry-pick <sha of your patch>

Now upload your patch

$ git push -n origin patch/buggyfix
$ git push origin patch/buggyfix

Maintain a patch

Work on any test branch, cherry-pick from the test branch to the patch/plugin branch. Then upload the branch to github.

Do not forget to edit the ChangeLog-pw file

Then apply the changes on the release branchs. Either git merge or git cherry-pick from the patch/plugin branch to the release branchs

.

Release a collectd-pw new version

Yes, there is not a lot of fun here

$ ./clean.sh
$ ./build.sh
$ ./configure --enable-debug
$ make
$ make distcheck
$ git commit -a -m "New release 20130829"
$ git tag -a "collectd-5.3.0-20130829" -m "Unofficial version 5.3.0-20130829 with perfwatcher patches"
$ ./clean.sh
$ ./build.sh
$ ./configure
$ make distcheck
$ git push -u -n
$ git push -u
$ git push -u -n origin refs/tags/collectd-5.3.0-20130829
$ git push -u origin refs/tags/collectd-5.3.0-20130829