On Wed, 2024-07-24 at 14:17 -0400, Benjamin Marzinski wrote: > libmpathpersist was not setting mpp->mpe before calling > select_reservation_key(). This means that if the reservation key was > set > in the multipaths sections, it wasn't being selected. > > This appeared to work for many commands because of an error in > checking > if the correct reservation key was used. If mpp->reservation key was > unset, then it would considered to match if either the RK or SARK was > unset in the command. mpathpersist should fail if it doesn't find a > configured mpp->resevation key, with one exception. To make it easier > to > remove old keys, if --register-ignore is called, and the command SARK > is > 0x0 so the device is being unregistered, allow mpp->reservation_key > to > be unset. The code already allows mpp->reservation_key to not match > the > command RK in this case. > > Signed-off-by: Benjamin Marzinski <bmarzins@xxxxxxxxxx> Reviewed-by: Martin Wilck <mwilck@xxxxxxxx>