Re: [Linux-HA] Heartbeat errors related to Gmain_timeout_dispatch at low traffic

2013-11-20 Thread Savita Kulkarni
Hi Lars,

We observed one pattern with these errors - at most of the case,on both VMs
, these errors came at the same time.
We are suspecting either network issue in that case only late heartbeat
error will come not Gmain_timeout_dispatch related errors right ? or
VM is getting paused for sometime for some reason and when it is resumed
Gmain_timeout_dispatch/late heartbeat errors are coming.
We are investigating more on this.


@heartbeat 3 - for this issue most of the time advice given was to upgrade.
But we are using same heartbeat version
in other setups also and it is working fine there.

What do you think?

Regards,
Savita


On Tue, Nov 19, 2013 at 4:23 PM, Lars Ellenberg
wrote:

> On Thu, Nov 14, 2013 at 04:46:16PM +0530, Savita Kulkarni wrote:
> > Hi,
> >
> > Recently we are seeing lots of heartbeat errors related to
> > Gmain_timeout_dispatch
> > on our system.
> > I checked on mailing list archives if other people have faced this issue.
> > There are few email threads regarding this but people are seeing this
> issue
> > in case of high load.
> >
> > On our system there is very low/no load is present.
> >
> > We are running heartbeat on guest VMs, using VMWARE ESXi 5.0.
> > We have heartbeat -2.1.3-4
> > It is working fine without any issues on other other setups and issue is
> > coming only on this setup.
> >
> > Following types of errors are present in /var/log/messages
> >
> > Nov 12 09:58:43  heartbeat: [23036]: WARN: Gmain_timeout_dispatch:
> > Dispatch function for send local status was delayed 15270 ms (> 1010
> > ms) before being called (GSource: 0x138926b8)
> > Nov 12 09:59:00  heartbeat: [23036]: info: Gmain_timeout_dispatch:
> > started at 583294569 should have started at 583293042
> > Nov 12 09:59:00 heartbeat: [23036]: WARN: Gmain_timeout_dispatch:
> > Dispatch function for update msgfree count was delayed 33960 ms (>
> > 1 ms) before being called (GSource: 0x13892f58)
> >
> > Can anyone tell me what can be the issue?
> >
> > Can it be a hardware issue?
>
> Could be many things, even that, yes.
>
> Could be that upgrading to recent heartbeat 3 helps.
>
> Could be that there is to little load, and your virtualization just
> stops scheduling the VM itself, because it thinks it is underutilized...
>
> Does it recover if you kill/restart heartbeat?
>
> --
> : 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.
> ___
> Linux-HA mailing list
> Linux-HA@lists.linux-ha.org
> http://lists.linux-ha.org/mailman/listinfo/linux-ha
> See also: http://linux-ha.org/ReportingProblems
>
___
Linux-HA mailing list
Linux-HA@lists.linux-ha.org
http://lists.linux-ha.org/mailman/listinfo/linux-ha
See also: http://linux-ha.org/ReportingProblems


Re: [Linux-HA] drbd/pacemaker multiple tgt targets, portblock, and race conditions (long-ish)

2013-11-20 Thread Jefferson Ogata

On 2013-11-20 07:04, Vladislav Bogdanov wrote:

19.11.2013 13:48, Lars Ellenberg wrote:

On Wed, Nov 13, 2013 at 09:02:47AM +0300, Vladislav Bogdanov wrote:

13.11.2013 04:46, Jefferson Ogata wrote:
...

3. portblock preventing TCP Send-Q from draining, causing tgtd
connections to hang. I modified portblock to reverse the sense of the
iptables rules it was adding: instead of blocking traffic from the
initiator on the INPUT chain, it now blocks traffic from the target on
the OUTPUT chain with a tcp-reset response. With this setup, as soon as
portblock goes active, the next packet tgtd attempts to send to a given
initiator will get a TCP RST response, causing tgtd to hang up the
connection immediately. This configuration allows the connections to
terminate promptly under load.

I'm not totally satisfied with this workaround. It means
acknowledgements of operations tgtd has actually completed never make it
back to the initiator. I suspect this could cause problems in some
scenarios. I don't think it causes a problem the way i'm using it, with
each LUN as backing store for a distinct VM--when the LUN is back up on
the other node, the outstanding operations are re-sent by the initiator.
Maybe with a clustered filesystem this would cause problems; it
certainly would cause problems if the target device were, for example, a
tape drive.


Maybe only block "new" incoming connection attempts?


That may cause issues on an initiator side in some circumstances (IIRC):
* connection is established
* pacemaker fires target move
* target is destroyed, connection breaks (TCP RST is sent to initiator)
* initiator connects again
* target is not available on iSCSI level (but portals answer either on
old or on new node) or portals are not available
* initiator *returns error* to an upper layer <- this one is important
* target is configured on other node then

I was hit by this, but that was several years ago, so I may miss some
details.


Indeed, using iptables with REJECT and tcp-reset, this seems to piss off 
the initiators, creating immediate i/o errors. But one can use DROP on 
incoming SYN packets and let established connections drain. I've been 
trying to get this to work but am finding that it takes so long for some 
connections to drain that something times out. I haven't given up on 
this approach, tho. Testing this stuff can be tricky because if i make 
one mistake, stonith kicks in and i end up having to wait 5-10 minutes 
for the machine to reboot and resync its DRBD devices.



My experience with IET and LIO shows it is better (safer) to block all
iSCSI traffic to target's portals, both directions.
* connection is established
* pacemaker fires target move
* both directions are blocked (DROP) on both target nodes
* target is destroyed, connection stays "established" on initiator side,
just TCP packets timeout
* target is configured on other node (VIPs are moved too)
* firewall rules are removed
* initiator (re)sends request
* target sends RST (?) back - it doesn't have that connection
* initiator reconnects and continues to use target


As already noted, this approach doesn't work with TGT because it refuses 
to teardown its config until it has drained all its connections, and 
they can't drain if ACK packets can't come in. The only reliable 
solution i've found so far is to send RSTs to tgtd (but leave the 
initiators in the dark).


I'm also using VIPs. They don't have to be bound to a specific target in 
a tgt configuration; you just have each initiator connect to a given 
target only using its unique VIP.

___
Linux-HA mailing list
Linux-HA@lists.linux-ha.org
http://lists.linux-ha.org/mailman/listinfo/linux-ha
See also: http://linux-ha.org/ReportingProblems