Note: "permalinks" may not be as permanent as we would like,
direct links of old sources may well be a few messages off.
On Wed, Jun 17, 2015 at 12:50:42PM +0200, Dietmar Maurer wrote: > > As far as I can tell set_drbdsetup_props() looks okay. The problem is that we > > are not able to reproduce your problem. In a drbdmanage environment[1] > > everything looks fine, both nodes are able to switch the resource to primary > > (tested with 'drbdadm primary' on both sides)... > > > > Is it reproducible? Even if you start from scratch (drbdmanage unit)? > > Yes, I can reproduce it reliable. But I use 3-nodes ($redundance=3) > > I can get it working by introducing a sleep(5) after auto_deploy: > > -------------- > my ($rc, $res) = $hdl->create_resource($name, {}); > check_drbd_rc($rc->[0]); > > ($rc, $res) = $hdl->create_volume($name, $size, {}); > check_drbd_rc($rc->[0]); > > my $redundancy = get_redundancy($scfg);; > > ($rc, $res) = $hdl->auto_deploy($name, $redundancy, 0, 0); > check_drbd_rc($rc->[0]); > > sleep(5); # else we get split brain?! > > ($rc, $res) = $hdl->set_drbdsetup_props( > { > target => "resource", > resource => $name, > type => 'neto', > 'allow-two-primaries' => 'yes', > }); > check_drbd_rc($rc->[0]); > -------------------- Please try to swap the "deploy" and "set options" steps: -------------------- ($rc, $res) = $hdl->set_drbdsetup_props( { target => "resource", resource => $name, type => 'neto', 'allow-two-primaries' => 'yes', }); ($rc, $res) = $hdl->auto_deploy($name, $redundancy, 0, 0); -------------------- Regards, rck