[Drbd-dev] changing the fencing policy on the fly

Petrakis, Peter Peter.Petrakis at stratus.com
Tue Dec 1 21:50:42 CET 2009


 

> -----Original Message-----
> > IPV6 link local addressing which would help in this case 
> because the 
> > nodes are directly attached.
> 
> IPv6 is supposed to work.

and it does, it's this particular construct doesn't seem supported,
fe80::a00:5aff:fe38:6f86%eth0 .

It's not an issue anyways, I was misunderstood how it worked, I
assumed I needed only my MAC address and not my peers. 

> modinfo drbd
> usermode_helper:string
> 	(default: /sbin/drbdadm)
> 	also available via /sys/modules/drbd/parameters/usermode_helper
> 
> You can add your own wrapper around drbdadm as "hanlder" helper.

That's definitely a possibility. 
 
> But feel free to write a patch to replace the DRBD config 
> interface (currently netlink/connector resp. genetlink based) 
> to a sysfs based one, and we might consider it ;)

ok :)
 
> Use a "DRBD" bus, each sub dir being a single drbd, expose 
> all parameters we currently have, see that you don't step on 
> each others toes when configuring those.
> you probably need a "live" and a "pending" config set, so you 
> can change paramters when configuring in sequence, then 
> "commit" them in one go.
> 
> Post on drbd-dev and possibly on lkml.
> 
> Converting single parameters to sysfs in some ad-hoc fashion, 
> just because you feel _this_ one should be there, is not 
> useful und unmaintainable.

Agreed. I scanned the code again regarding the use of the fencing
policy and noticed something that might solve this particular problem.

enum drbd_disk_state drbd_try_outdate_peer(struct drbd_conf *mdev)
{
    char *ex_to_string;
    int r;
    enum drbd_disk_state nps;
    enum fencing_policy fp;

    D_ASSERT(mdev->state.pdsk == DUnknown);

    if (inc_local_if_state(mdev, Consistent)) {
        fp = mdev->bc->dc.fencing;
        dec_local(mdev);
    } else {
        WARN("Not outdating peer, I'm not even Consistent myself.\n");
        return mdev->state.pdsk;
    }

    if (fp == Stonith)
        _drbd_request_state(mdev, NS(susp,1), ChgWaitComplete);

    r = drbd_khelper(mdev, "outdate-peer");

    switch ((r>>8) & 0xff) {
    case 3: /* peer is inconsistent */
        ex_to_string = "peer is inconsistent or worse";
        nps = Inconsistent;
        break;
    case 4:
        ex_to_string = "peer is outdated";
        nps = Outdated;
        break;
    case 5: /* peer was down, we will(have) create(d) a new UUID
anyways... */
        /* If we would be more strict, we would return DUnknown here. */
        ex_to_string = "peer is unreachable, assumed to be dead";
        nps = Outdated;
        break;
...

Nowhere does the code check that a valid network config ever existed. It
presuppposes that a peer must exist if a fencing policy is configured.
Could
I safely argue that if mdev->net_conf == NULL then we could return 5?
Thanks.

Peter


More information about the drbd-dev mailing list