Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
SUSE:SLE-12-SP2:Update
drbd.24674
disconnect-invalid-two-primaries.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File disconnect-invalid-two-primaries.patch of Package drbd.24674
diff -Naur drbd-9.0.11+git.1e2bccdc.orig/drbd/drbd_receiver.c drbd-9.0.11+git.1e2bccdc/drbd/drbd_receiver.c --- drbd-9.0.11+git.1e2bccdc.orig/drbd/drbd_receiver.c 2021-04-06 14:41:06.413848069 +0800 +++ drbd-9.0.11+git.1e2bccdc/drbd/drbd_receiver.c 2021-04-06 14:59:22.906599677 +0800 @@ -3870,7 +3870,8 @@ struct drbd_connection *connection = peer_device->connection; enum drbd_disk_state disk_state; struct net_conf *nc; - int hg, rule_nr, rr_conflict, always_asbp, peer_node_id = 0, r; + int hg, rule_nr, rr_conflict, always_asbp, peer_node_id = 0, r, pcount; + bool two_primaries; hg = drbd_handshake(peer_device, &rule_nr, &peer_node_id, true); @@ -3901,11 +3902,18 @@ nc = rcu_dereference(connection->transport.net_conf); always_asbp = nc->always_asbp; rr_conflict = nc->rr_conflict; + two_primaries = nc ? nc->two_primaries : false; rcu_read_unlock(); + pcount = (device->resource->role[NOW] == R_PRIMARY) + + (peer_role == R_PRIMARY); + + if (hg == 0 && pcount == 2 && !two_primaries) { + drbd_alert(device, "Dual primaries detected with unified UUID but not allowed, drop connection!\n"); + return -1; + } + if (hg == 100 || (hg == -100 && always_asbp)) { - int pcount = (device->resource->role[NOW] == R_PRIMARY) - + (peer_role == R_PRIMARY); int forced = (hg == -100); switch (pcount) {
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor