Discussion:
[drbd-mc] NullPointerException in certain cluster configurations
Peter Luciak
2010-02-11 14:41:14 UTC
Permalink
Hi,
I have a resource group ("fs"), which is colocated and ordered with 2
DRBD resources ("drbd_data" and "drbd_app").

When I add another group "apps", which is also colocated with those 2
DRBD resources, and colocated & ordered with "fs", the MC freezes with
this exception:

uncaught exception
java.lang.NullPointerException
null
drbd.gui.ResourceGraph$MyPluggableRenderer.paintShapeForVertex(ResourceGraph.java:1388)
edu.uci.ics.jung.visualization.PluggableRenderer.paintVertex(PluggableRenderer.java:1148)
edu.uci.ics.jung.visualization.VisualizationViewer.renderGraph(VisualizationViewer.java:823)
edu.uci.ics.jung.visualization.VisualizationViewer.paintComponent(VisualizationViewer.java:733)
javax.swing.JComponent.paint(JComponent.java:1027)
javax.swing.JComponent.paintChildren(JComponent.java:864)
javax.swing.JComponent.paint(JComponent.java:1036)
javax.swing.JComponent.paintChildren(JComponent.java:864)
javax.swing.JSplitPane.paintChildren(JSplitPane.java:1026)

Here are the colocation & order rules:

location fs_on_iblcls2 fs 100000: iblcls2
location stonith_iblcls1_on_iblcls2 stonith_iblcls1 \
rule $id="stonith_iblcls1_on_iblcls2-rule" inf: #uname ne iblcls2
location stonith_iblcls2_on_iblcls1 stonith_iblcls2 \
rule $id="stonith_iblcls2_on_iblcls1-rule" inf: #uname ne iblcls1
colocation apps_on_drbd_app inf: apps ms_drbd_app:Master
colocation apps_on_drbd_data inf: apps ms_drbd_data:Master
colocation fs_app_on_drbd_app inf: fs ms_drbd_app:Master
colocation fs_data_on_drbd_data inf: fs ms_drbd_data:Master
colocation fs_with_apps inf: fs apps
order apps_after_fs inf: fs apps
order fs_app_after_drbd_app inf: ms_drbd_app:promote fs:start
order fs_data_after_drbd_data inf: ms_drbd_data:promote fs:start

I'm also attaching the output of cibadmin -Q.

Peter
--
Peter LUCIAK (Peter.Luciak at iblsoft.com)
IBL Software Engineering, http://www.iblsoft.com/
Mierov? 103, 82105 Bratislava, Slovakia
Phone: +421-2-32662111, Fax: +421-2-32662110
Direct: +421-2-32662175
-------------- next part --------------
A non-text attachment was scrubbed...
Name: cib.xml
Type: text/xml
Size: 51270 bytes
Desc: not available
URL: <http://lists.linbit.com/pipermail/drbd-mc/attachments/20100211/c54050c7/attachment-0001.bin>
Rasto Levrinc
2010-02-11 16:14:53 UTC
Permalink
Post by Peter Luciak
Hi,
I have a resource group ("fs"), which is colocated and ordered with 2
DRBD resources ("drbd_data" and "drbd_app").
When I add another group "apps", which is also colocated with those 2
DRBD resources, and colocated & ordered with "fs", the MC freezes with
Yep, there is a bug and DRBD-MC ends up in an endless cycle. Thanks for
reporting it. However...
...
Post by Peter Luciak
colocation apps_on_drbd_app inf: apps ms_drbd_app:Master
colocation apps_on_drbd_data inf: apps ms_drbd_data:Master colocation
Do you actually need this two colocation rules? "apps" are already
colocated through the colocation with "fs" group. Without these two
colocations the DRBD-MC would work, not that I don't have to fix my bug.
:)

Rasto
--
: Dipl-Ing Rastislav Levrinc
: DRBD-MC http://www.drbd.org/mc/management-console/
: DRBD/HA support and consulting http://www.linbit.com/
DRBD(R) and LINBIT(R) are registered trademarks of LINBIT, Austria.
Peter Luciak
2010-02-12 08:18:47 UTC
Permalink
Post by Rasto Levrinc
Post by Peter Luciak
colocation apps_on_drbd_app inf: apps ms_drbd_app:Master
colocation apps_on_drbd_data inf: apps ms_drbd_data:Master colocation
Do you actually need this two colocation rules? "apps" are already
colocated through the colocation with "fs" group. Without these two
colocations the DRBD-MC would work, not that I don't have to fix my bug.
:)
Sure, but then when I migrate "apps" resource, the colocated "fs"
resource is migrated, but the underlying DRBD resources aren't switched.
Probably I need another order rule somewhere...

Peter
--
Peter LUCIAK (Peter.Luciak at iblsoft.com)
IBL Software Engineering, http://www.iblsoft.com/
Mierov? 103, 82105 Bratislava, Slovakia
Phone: +421-2-32662111, Fax: +421-2-32662110
Direct: +421-2-32662175
Lars Ellenberg
2010-02-12 09:41:28 UTC
Permalink
Post by Peter Luciak
Post by Rasto Levrinc
Post by Peter Luciak
colocation apps_on_drbd_app inf: apps ms_drbd_app:Master
colocation apps_on_drbd_data inf: apps ms_drbd_data:Master colocation
Do you actually need this two colocation rules? "apps" are already
colocated through the colocation with "fs" group. Without these two
colocations the DRBD-MC would work, not that I don't have to fix my bug.
:)
Sure, but then when I migrate "apps" resource, the colocated "fs"
resource is migrated, but the underlying DRBD resources aren't
switched. Probably I need another order rule somewhere...
That may be because you got one of your colocation rules upside down ;)

...
order apps_after_fs inf: fs apps
order fs_app_after_drbd_app inf: ms_drbd_app:promote fs:start
order fs_data_after_drbd_data inf: ms_drbd_data:promote fs:start

colocation fs_app_on_drbd_app inf: fs ms_drbd_app:Master
colocation fs_data_on_drbd_data inf: fs ms_drbd_data:Master

Those are ok.

colocation fs_with_apps inf: fs apps

But this one is wrong:
You don't colocate the file system with the apps.
But you colocate the apps with the file system.

There is a difference between "rsc" and "with-rsc".
You cannot place the file system relative to apps,
if apps depend on fs.

http://www.clusterlabs.org/doc/en-US/Pacemaker/1.0/html/Pacemaker_Explained/s-resource-colocation.html

So make that
colocation apps_with_fs inf: apps fs

Then these two should not be necessary:
colocation apps_on_drbd_app inf: apps ms_drbd_app:Master
colocation apps_on_drbd_data inf: apps ms_drbd_data:Master
--
: Lars Ellenberg
: LINBIT | Your Way to High Availability
: DRBD/HA support and consulting http://www.linbit.com

DRBD? and LINBIT? are registered trademarks of LINBIT, Austria.
Peter Luciak
2010-02-12 13:40:42 UTC
Permalink
Post by Lars Ellenberg
Post by Peter Luciak
Sure, but then when I migrate "apps" resource, the colocated "fs"
resource is migrated, but the underlying DRBD resources aren't
switched. Probably I need another order rule somewhere...
That may be because you got one of your colocation rules upside down ;)
You don't colocate the file system with the apps.
But you colocate the apps with the file system.
There is a difference between "rsc" and "with-rsc".
You cannot place the file system relative to apps,
if apps depend on fs.
http://www.clusterlabs.org/doc/en-US/Pacemaker/1.0/html/Pacemaker_Explained/s-resource-colocation.html
So make that
colocation apps_with_fs inf: apps fs
Thanks for the info, you were right :)

P.
--
Peter LUCIAK (Peter.Luciak at iblsoft.com)
IBL Software Engineering, http://www.iblsoft.com/
Mierov? 103, 82105 Bratislava, Slovakia
Phone: +421-2-32662111, Fax: +421-2-32662110
Direct: +421-2-32662175
Loading...