[Pacemaker] Extending CTS with other tests

Vit Pelcak vpelcak at suse.cz
Thu Nov 25 07:36:49 EST 2010

Hello everyone.

I ran into problem.

I cannot format ocfs2 partition with pcmk until "primitive o2cb 
ocf:ocfs2:o2cb" is running. Right?

I was thinking the way, that I would create scripts which would prepare 
cluster for my specific scenario and then CTS would add resources and do 
the testing itself.

Now I'm quite unsure. I could prepare ocfs2 partition with pcmk and just 
reuse it, but maybe you will come up with better idea.

I added script I use for adding ocfs2 resource (cluster is expected to 
be running and have some stonith ready) to attachment. It works fine so far.

Frankly, I'm quite clueless how to get this into CTS as I'm not much 
into Python. Maybe if somebody could help me how to get some easier 
scenario into CTS, I'd be able to figure out other scenarios as well.

I have put into attachment the one reasonably easy. It is about mounting 
ext3 partition into mysql dir and then running mysql.

Problem here is, that doing so is not enough. I spotted, that is is 
needed to manually restart mysql when that ext3 partition is mounted 
(and chmod needs to run before it as well, otherwise mysql has not write 
permission there and crashes). Only after that resource starts and works 

So far, I have created:

class MYSQL(CIB10):
     def add_resources(self):
         self._create('''primitive fs1 ocf:heartbeat:Filesystem op 
monitor interval="20" timeout="40" start-delay="10" params device="%s" 
directory="%s" fstype="%s"''')
         self._create('''property no-quorum-policy="ignore" op monitor 
interval="10" timeout="120" start-delay="10 params binary="%s" pid="%s''')
         self._create('''primitive sql1 ocf:heartbeat:mysql''')
         self._create('''colocation col-sql1 +inf: sql1 fs1''')
         self._create('''order order-sql1 +inf: fs1 sql1''')

in CIB.py. Then, maybe I should call that class in
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ocfs2_conf_runner.sh
Type: application/x-shellscript
Size: 2150 bytes
Desc: not available
URL: <https://lists.clusterlabs.org/pipermail/pacemaker/attachments/20101125/a8917060/attachment-0006.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: sql_testplan2841_runner.sh
Type: application/x-shellscript
Size: 1567 bytes
Desc: not available
URL: <https://lists.clusterlabs.org/pipermail/pacemaker/attachments/20101125/a8917060/attachment-0007.bin>

More information about the Pacemaker mailing list