libmutipath: only give out free user_friendly_names
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest2 patches 2 repliesIn review
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/2 | libmultipath: check if user_friendly_name is in uselibmultipath/ tests/ | +56 | 1 reply | |
| 2/2 | tests: add tests for checking if alias is in usetests/ | +405 | 1 reply |
Reviews trailers per patch
All 2 patches have a Reviewed-by or Acked-by.
| Patch | Martin Wilck |
|---|---|
| 1/2 | R-b |
| 2/2 | R-b |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [dm-devel] [PATCH 0/2] libmutipath: only give out free user_friendly_names
This patchset fixes a bug that we're run into on installation. Right now, multipath doesn't ever check that the user_friendly_name it selected is actually not in-use. Normally, this is fine, since it won't pick a name without first adding it to the bindings file. However, if the device was created in the initramfs, the bindings file in the regular filesystem won't be updated until multipathd processes those paths when starting up after the switchroot. If new path devices are discovered when multipath starts up after the switchroot, they could be processed first, and pick the already in use user_friendly_name. In this case multipath will fail back to using the WWID for the new device, and renaming the old device. Later, if multipathd is reconfigured, the new device will get renamed to the previously in-use user_friendly_name it added to the bindings file. All this renaming of devices is messing with the installer.
To deal with this, this patchset checks that the selected alias is not in use by an existing dm device, before writing it to the bindings file. If it is, multipath just steps through the free aliases in the bindings file, checking until it finds a one that's not in use. I've updated the lookup_binding() tests to test this functionality as well.
Benjamin Marzinski (2):
libmultipath: check if user_friendly_name is in use
tests: add tests for checking if alias is in use
libmultipath/alias.c | 48 ++++- tests/alias.c | 427 +++++++++++++++++++++++++++++++++++++++++-- 2 files changed, 459 insertions(+), 16 deletions(-)
Signature · 6 lines
2.17.2 -- dm-devel mailing list [email protected] https://listman.redhat.com/mailman/listinfo/dm-devel