Skip to content

Commit

Permalink
libmultipath: be lenient in allowing the alua-based pgpolicies
Browse files Browse the repository at this point in the history
multipath wouldn't autodetect the GROUP_BY_PRIO path grouping policy or
allow the GROUP_BY_TPG policy if there was a path that didn't have its
prioritizer selected (for instance because multipathd was reconfigured
while it was offline). To avoid this, make verify_alua_prio() assume an
alua multipath device if all the paths with a prioritizer selected
(there must be at least one) use an alua-based prioritizer.

Signed-off-by: Benjamin Marzinski <bmarzins@redhat.com>
Reviewed-by: Martin Wilck <mwilck@suse.com>
  • Loading branch information
bmarzins authored and mwilck committed Jan 23, 2025
1 parent 85ec51e commit b47a577
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion libmultipath/propsel.c
Original file line number Diff line number Diff line change
Expand Up @@ -255,14 +255,18 @@ verify_alua_prio(struct multipath *mp)
{
int i;
struct path *pp;
bool assume_alua = false;

vector_foreach_slot(mp->paths, pp, i) {
const char *name = prio_name(&pp->prio);
if (!prio_selected(&pp->prio))
continue;
if (strncmp(name, PRIO_ALUA, PRIO_NAME_LEN) &&
strncmp(name, PRIO_SYSFS, PRIO_NAME_LEN))
return false;
assume_alua = true;
}
return true;
return assume_alua;
}

int select_detect_pgpolicy(struct config *conf, struct multipath *mp)
Expand Down

0 comments on commit b47a577

Please sign in to comment.