)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":27615,"name":"Rajat Dhasmana","email":"rajatdhasmana@gmail.com","username":"whoami-rajat"},"change_message_id":"99d7d915fb34d0c6f4699c02a12e5c265d6f7cac","unresolved":true,"context_lines":[{"line_number":39,"context_line":"by-id symlink encodes, or the basename of a /dev/mapper path, both of"},{"line_number":40,"context_line":"which multipathd resolves too.  No connector changes are needed."},{"line_number":41,"context_line":""},{"line_number":42,"context_line":"Closes-Bug: #2091104"},{"line_number":43,"context_line":"Assisted-By: Claude Code claude-fable-5-1"},{"line_number":44,"context_line":"Change-Id: I761914e53fb608467a02d0fb1ab80c582fd58d93"},{"line_number":45,"context_line":"Signed-off-by: Simon Dodsley \u003csimon@purestorage.com\u003e"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"c857581b_bae9a356","line":42,"range":{"start_line":42,"start_character":0,"end_line":42,"end_character":20},"updated":"2026-09-22 11:23:48.000000000","message":"this is a more appropriate bug report of the issue\n\nhttps://bugs.launchpad.net/os-brick/+bug/2167932","commit_id":"f633cc2742092be0a70115f9ee1b2a54d21f4893"},{"author":{"_account_id":13425,"name":"Simon Dodsley","email":"simon@everpuredata.com","username":"sdodsley"},"change_message_id":"f2baf5fca06590396ab91147fdc31dd5b2146404","unresolved":false,"context_lines":[{"line_number":39,"context_line":"by-id symlink encodes, or the basename of a /dev/mapper path, both of"},{"line_number":40,"context_line":"which multipathd resolves too.  No connector changes are needed."},{"line_number":41,"context_line":""},{"line_number":42,"context_line":"Closes-Bug: #2091104"},{"line_number":43,"context_line":"Assisted-By: Claude Code claude-fable-5-1"},{"line_number":44,"context_line":"Change-Id: I761914e53fb608467a02d0fb1ab80c582fd58d93"},{"line_number":45,"context_line":"Signed-off-by: Simon Dodsley \u003csimon@purestorage.com\u003e"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"f08c5de5_d88f7930","line":42,"range":{"start_line":42,"start_character":0,"end_line":42,"end_character":20},"in_reply_to":"c857581b_bae9a356","updated":"2026-09-22 12:51:10.000000000","message":"Acknowledged","commit_id":"f633cc2742092be0a70115f9ee1b2a54d21f4893"},{"author":{"_account_id":27615,"name":"Rajat Dhasmana","email":"rajatdhasmana@gmail.com","username":"whoami-rajat"},"change_message_id":"6e86468e9030248216264d76fe48c4fffdefea31","unresolved":true,"context_lines":[{"line_number":12,"context_line":""},{"line_number":13,"context_line":"While multipathd is running that command does not flush locally; it"},{"line_number":14,"context_line":"forwards the request to the daemon as \"del map \u003carg\u003e\".  Up to"},{"line_number":15,"context_line":"multipath-tools 0.9.7 the daemon resolved \u003carg\u003e through libdevmapper,"},{"line_number":16,"context_line":"which accepts any path, and when that failed the multipath client fell"},{"line_number":17,"context_line":"back to a local flush.  Since 0.9.8 cli_del_map() looks the argument"},{"line_number":18,"context_line":"up with find_mp_by_str(), which accepts only a map name, alias, WWID"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":3,"id":"6f542004_b3fd9cd8","line":15,"range":{"start_line":15,"start_character":0,"end_line":15,"end_character":21},"updated":"2026-09-23 01:53:50.000000000","message":"debian distros are not the only ones consuming os-brick so better to mention device-mapper-multipath version as well since when the functionality changed.","commit_id":"0b39ed16b4968772a43a13b0bd2652ff93294f54"},{"author":{"_account_id":13425,"name":"Simon Dodsley","email":"simon@everpuredata.com","username":"sdodsley"},"change_message_id":"fabe2aa1223a0ff1821fbb06e5afa99253d8cdd9","unresolved":false,"context_lines":[{"line_number":12,"context_line":""},{"line_number":13,"context_line":"While multipathd is running that command does not flush locally; it"},{"line_number":14,"context_line":"forwards the request to the daemon as \"del map \u003carg\u003e\".  Up to"},{"line_number":15,"context_line":"multipath-tools 0.9.7 the daemon resolved \u003carg\u003e through libdevmapper,"},{"line_number":16,"context_line":"which accepts any path, and when that failed the multipath client fell"},{"line_number":17,"context_line":"back to a local flush.  Since 0.9.8 cli_del_map() looks the argument"},{"line_number":18,"context_line":"up with find_mp_by_str(), which accepts only a map name, alias, WWID"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":3,"id":"d21b4a45_184332dd","line":15,"range":{"start_line":15,"start_character":0,"end_line":15,"end_character":21},"in_reply_to":"6f542004_b3fd9cd8","updated":"2026-09-23 12:38:06.000000000","message":"Done","commit_id":"0b39ed16b4968772a43a13b0bd2652ff93294f54"},{"author":{"_account_id":27615,"name":"Rajat Dhasmana","email":"rajatdhasmana@gmail.com","username":"whoami-rajat"},"change_message_id":"4f2eb3e73bc8680566843c63dcb3689d4ca0bf60","unresolved":true,"context_lines":[{"line_number":17,"context_line":"back to a local flush.  Since multipath-tools 0.9.8 (released in 2024;"},{"line_number":18,"context_line":"the Red Hat family ships the same code as device-mapper-multipath with"},{"line_number":19,"context_line":"the same version numbers, so Fedora 42\u0027s 0.10.0 and later are affected"},{"line_number":20,"context_line":"as well as Ubuntu 26.04\u0027s 0.14.3) cli_del_map() looks the argument up"},{"line_number":21,"context_line":"with find_mp_by_str(), which accepts only a map name, alias, WWID or"},{"line_number":22,"context_line":"dm-N kernel name, so the by-id path comes back as -ENODEV and the"},{"line_number":23,"context_line":"command exits 1 with \"device not found\".  The client no longer falls"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":4,"id":"8cdb78f9_0c91a376","line":20,"range":{"start_line":20,"start_character":11,"end_line":20,"end_character":32},"updated":"2026-09-23 14:45:14.000000000","message":"I thought ubuntu only provided the multipath-tools package and not the device-mapper-mulitpath? also the fedora\u0027s and ubuntu\u0027s versions are off ...","commit_id":"63832771027ffc487a61ec0ff4c66d173e7e12af"}],"/PATCHSET_LEVEL":[{"author":{"_account_id":27615,"name":"Rajat Dhasmana","email":"rajatdhasmana@gmail.com","username":"whoami-rajat"},"change_message_id":"99d7d915fb34d0c6f4699c02a12e5c265d6f7cac","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":1,"id":"7349abdf_9aebdc09","updated":"2026-09-22 11:23:48.000000000","message":"Hi Simon, thanks for finding this important bug and fixing it.\nHowever, I\u0027ve suggested an alternative (consise) way to fix this, please take a look at the inline logic and let me know if the suggested approach works.","commit_id":"f633cc2742092be0a70115f9ee1b2a54d21f4893"},{"author":{"_account_id":13425,"name":"Simon Dodsley","email":"simon@everpuredata.com","username":"sdodsley"},"change_message_id":"f2baf5fca06590396ab91147fdc31dd5b2146404","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":1,"id":"e1dbab3b_a595e55b","updated":"2026-09-22 12:51:10.000000000","message":"Thanks Rajat, agreed on both counts. 2167932 is the right bug and PS2 will reference it. On the fix: I checked your realpath approach against both generations. On 0.9.8 and later multipathd accepts dm-N directly. On 0.9.7 and earlier the daemon rejects dm-N (libdevmapper treats it as a map name) but the multipath client then falls back to a local flush with the full /dev/dm-N path, which is also how the by-id path has been working on those versions all along. 0.14 dropped that fallback, hence the bug. So your version is safe on both and I\u0027ll take it, with a comment recording that reasoning and a test for the path-versus-name cases.","commit_id":"f633cc2742092be0a70115f9ee1b2a54d21f4893"},{"author":{"_account_id":13425,"name":"Simon Dodsley","email":"simon@everpuredata.com","username":"sdodsley"},"change_message_id":"4cce2b68428822abc2ecf5ae253dbe7cc7789a11","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":2,"id":"b9b42fbf_6d8ba071","updated":"2026-09-22 13:20:45.000000000","message":"run Everpure CI","commit_id":"8c978dc01b81509f88b56854eff26b1ef1283a08"},{"author":{"_account_id":5314,"name":"Brian Rosmaita","email":"rosmaita.fossdev@gmail.com","username":"brian-rosmaita"},"change_message_id":"463843b06231fd9e37c085030bb5c734733e5a14","unresolved":true,"context_lines":[],"source_content_type":"","patch_set":3,"id":"5a766c9a_0e9ca784","updated":"2026-09-23 12:02:10.000000000","message":"Code and tests LGTM, but I think you should fix the nits Rajat pointed out (they\u0027ll help in future maintenance).","commit_id":"0b39ed16b4968772a43a13b0bd2652ff93294f54"},{"author":{"_account_id":13425,"name":"Simon Dodsley","email":"simon@everpuredata.com","username":"sdodsley"},"change_message_id":"9066439c198f32ee68415cb57e778f38f4d72270","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":3,"id":"0356666c_90cd9ddc","updated":"2026-09-22 14:50:22.000000000","message":"PS3 closes a small gap, prompted by a further review offline: PS2 resolved the path once and then let the execute wrapper retry the same /dev/dm-N three times. Device-mapper reuses a freed minor immediately, so if the map were removed between attempts and another volume\u0027s map took the same minor, a retry could flush the wrong map. The retries now wrap the method instead of the command, so the path is resolved afresh on every attempt. Attempt count, the 20 and 40 second waits and the per-attempt timeout are unchanged, and two tests cover the re-resolution and the final failure.","commit_id":"0b39ed16b4968772a43a13b0bd2652ff93294f54"},{"author":{"_account_id":27615,"name":"Rajat Dhasmana","email":"rajatdhasmana@gmail.com","username":"whoami-rajat"},"change_message_id":"6e86468e9030248216264d76fe48c4fffdefea31","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":3,"id":"7e2d286e_4f8dfa94","updated":"2026-09-23 01:53:50.000000000","message":"few corrections but overall LGTM, thanks for fixing this Simon.","commit_id":"0b39ed16b4968772a43a13b0bd2652ff93294f54"},{"author":{"_account_id":13425,"name":"Simon Dodsley","email":"simon@everpuredata.com","username":"sdodsley"},"change_message_id":"fabe2aa1223a0ff1821fbb06e5afa99253d8cdd9","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":3,"id":"e849f691_e1d215f4","in_reply_to":"5a766c9a_0e9ca784","updated":"2026-09-23 12:38:06.000000000","message":"Done","commit_id":"0b39ed16b4968772a43a13b0bd2652ff93294f54"},{"author":{"_account_id":13425,"name":"Simon Dodsley","email":"simon@everpuredata.com","username":"sdodsley"},"change_message_id":"fabe2aa1223a0ff1821fbb06e5afa99253d8cdd9","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":4,"id":"45f1b041_98c018d1","updated":"2026-09-23 12:38:06.000000000","message":"PS4 addresses the nits only; code and tests are unchanged from PS3.\n\n- Commit message now says the change arrived in multipath-tools 0.9.8 and\n  that the Red Hat family ships the same code as device-mapper-multipath\n  with the same version numbers (Fedora 42 is on 0.10.0), so it is not\n  read as a Debian/Ubuntu-only problem.\n- The long comment in flush_multipath_device() is replaced by the short\n  form Rajat asked for (symlink worked before 0.9.8, multipathd now needs\n  the /dev/dm-N handle) plus Brian\u0027s wording for why the retries sit on\n  the function rather than in _execute().\n- The full analysis (client/daemon split, cli_del_map() before and after\n  0.9.8, removed local fallback, affected versions) is now on bug 2167932\n  rather than in the code.","commit_id":"63832771027ffc487a61ec0ff4c66d173e7e12af"},{"author":{"_account_id":5314,"name":"Brian Rosmaita","email":"rosmaita.fossdev@gmail.com","username":"brian-rosmaita"},"change_message_id":"21534578b13ebf7116648b55e06f81d1124507ce","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":4,"id":"b8d949dd_d342ff8b","updated":"2026-09-23 14:07:04.000000000","message":"Revisions LGTM.","commit_id":"63832771027ffc487a61ec0ff4c66d173e7e12af"},{"author":{"_account_id":27615,"name":"Rajat Dhasmana","email":"rajatdhasmana@gmail.com","username":"whoami-rajat"},"change_message_id":"4f2eb3e73bc8680566843c63dcb3689d4ca0bf60","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":4,"id":"f5b8dfe5_c51d8417","updated":"2026-09-23 14:45:14.000000000","message":"The code/tests looks good, thanks for fixing the comments however there are still few nits in code comments.","commit_id":"63832771027ffc487a61ec0ff4c66d173e7e12af"}],"os_brick/initiator/linuxscsi.py":[{"author":{"_account_id":27615,"name":"Rajat Dhasmana","email":"rajatdhasmana@gmail.com","username":"whoami-rajat"},"change_message_id":"99d7d915fb34d0c6f4699c02a12e5c265d6f7cac","unresolved":true,"context_lines":[{"line_number":470,"context_line":"                            \"device: %(code)s\", {\u0027code\u0027: exc.exit_code})"},{"line_number":471,"context_line":"                raise"},{"line_number":472,"context_line":""},{"line_number":473,"context_line":"    def get_multipath_map_name(self, device: str) -\u003e str:"},{"line_number":474,"context_line":"        \"\"\"Return the device-mapper name of a multipath map."},{"line_number":475,"context_line":""},{"line_number":476,"context_line":"        multipathd resolves a map only by its name, alias, WWID or dm-N"},{"line_number":477,"context_line":"        kernel name, so a caller that knows the map by one of its device"},{"line_number":478,"context_line":"        nodes or symlinks has to translate first:"},{"line_number":479,"context_line":""},{"line_number":480,"context_line":"            /dev/disk/by-id/dm-uuid-mpath-\u003cWWID\u003e"},{"line_number":481,"context_line":"            /dev/mapper/\u003cname\u003e"},{"line_number":482,"context_line":"            /dev/dm-N"},{"line_number":483,"context_line":""},{"line_number":484,"context_line":"        :param device: A map name, or any path that resolves to the map."},{"line_number":485,"context_line":"        :returns: The map name as multipathd knows it.  If the map has"},{"line_number":486,"context_line":"                  already gone and sysfs can no longer answer, fall back"},{"line_number":487,"context_line":"                  to the WWID a by-id symlink encodes or the basename of"},{"line_number":488,"context_line":"                  a /dev/mapper path.  Anything that is not a path is"},{"line_number":489,"context_line":"                  returned unchanged."},{"line_number":490,"context_line":"        \"\"\""},{"line_number":491,"context_line":"        if not device.startswith(\u0027/\u0027):"},{"line_number":492,"context_line":"            return device"},{"line_number":493,"context_line":"        dm \u003d os.path.basename(os.path.realpath(device))"},{"line_number":494,"context_line":"        if dm.startswith(\u0027dm-\u0027):"},{"line_number":495,"context_line":"            name \u003d self.get_dm_name(dm)"},{"line_number":496,"context_line":"            if name:"},{"line_number":497,"context_line":"                return name"},{"line_number":498,"context_line":"        basename \u003d os.path.basename(device)"},{"line_number":499,"context_line":"        if basename.startswith(MPATH_UUID_PREFIX):"},{"line_number":500,"context_line":"            return basename[len(MPATH_UUID_PREFIX):]"},{"line_number":501,"context_line":"        if device.startswith(\u0027/dev/mapper/\u0027):"},{"line_number":502,"context_line":"            return basename"},{"line_number":503,"context_line":"        return device"},{"line_number":504,"context_line":""},{"line_number":505,"context_line":"    def flush_multipath_device(self, device_map_name: str) -\u003e None:"},{"line_number":506,"context_line":"        # While multipathd is running \"multipath -f\" does not flush locally,"}],"source_content_type":"text/x-python","patch_set":1,"id":"9886e91f_33fbeb57","line":503,"range":{"start_line":473,"start_character":0,"end_line":503,"end_character":21},"updated":"2026-09-22 11:23:48.000000000","message":"looks like we are overcomplicating the solution by checking each case, which is verbose but inefficient way to handle this bug.\n\nHere are the two methods in the FC detach workflow where we fetch the device path via find_multipath_device_path and pass it to flush_multipath_device.\n\nLooking into find_multipath_device_path, there are only two paths possible\n\n1. /dev/disk/by-id/dm-uuid-mpath-%(wwn)s\n2. /dev/mapper/%(wwn)s\n\nboth are symlink files pointing to the actual device\n\n$ ls -l /dev/disk/by-id/dm-uuid-mpath-333333330000007d0 \nlrwxrwxrwx. 1 root root 10 Sep 22 16:00 /dev/disk/by-id/dm-uuid-mpath-333333330000007d0 -\u003e ../../dm-1\n\n$ ls -l /dev/mapper/333333330000007d0\nlrwxrwxrwx. 1 root root 7 Sep 22 16:00 /dev/mapper/333333330000007d0 -\u003e ../dm-1\n\nBoth the files resolve to /dev/dm-* device\n\nmpath_symlink \u003d \u0027/dev/disk/by-id/dm-uuid-mpath-333333330000007d0\u0027\nmpath_mapper \u003d \u0027/dev/mapper/333333330000007d0\u0027\n\nprint(os.path.realpath(mpath_symlink))\n/dev/dm-1 \u003c-- OUTPUT\nprint(os.path.realpath(mpath_mapper))\n/dev/dm-1 \u003c-- OUTPUT\n\n\n\nhttps://opendev.org/openstack/os-brick/src/commit/44c01994e45c781cb5fd3a9a9f9e8e3e5522d04c/os_brick/initiator/connectors/fibre_channel.py#L386-L389","commit_id":"f633cc2742092be0a70115f9ee1b2a54d21f4893"},{"author":{"_account_id":13425,"name":"Simon Dodsley","email":"simon@everpuredata.com","username":"sdodsley"},"change_message_id":"f2baf5fca06590396ab91147fdc31dd5b2146404","unresolved":false,"context_lines":[{"line_number":470,"context_line":"                            \"device: %(code)s\", {\u0027code\u0027: exc.exit_code})"},{"line_number":471,"context_line":"                raise"},{"line_number":472,"context_line":""},{"line_number":473,"context_line":"    def get_multipath_map_name(self, device: str) -\u003e str:"},{"line_number":474,"context_line":"        \"\"\"Return the device-mapper name of a multipath map."},{"line_number":475,"context_line":""},{"line_number":476,"context_line":"        multipathd resolves a map only by its name, alias, WWID or dm-N"},{"line_number":477,"context_line":"        kernel name, so a caller that knows the map by one of its device"},{"line_number":478,"context_line":"        nodes or symlinks has to translate first:"},{"line_number":479,"context_line":""},{"line_number":480,"context_line":"            /dev/disk/by-id/dm-uuid-mpath-\u003cWWID\u003e"},{"line_number":481,"context_line":"            /dev/mapper/\u003cname\u003e"},{"line_number":482,"context_line":"            /dev/dm-N"},{"line_number":483,"context_line":""},{"line_number":484,"context_line":"        :param device: A map name, or any path that resolves to the map."},{"line_number":485,"context_line":"        :returns: The map name as multipathd knows it.  If the map has"},{"line_number":486,"context_line":"                  already gone and sysfs can no longer answer, fall back"},{"line_number":487,"context_line":"                  to the WWID a by-id symlink encodes or the basename of"},{"line_number":488,"context_line":"                  a /dev/mapper path.  Anything that is not a path is"},{"line_number":489,"context_line":"                  returned unchanged."},{"line_number":490,"context_line":"        \"\"\""},{"line_number":491,"context_line":"        if not device.startswith(\u0027/\u0027):"},{"line_number":492,"context_line":"            return device"},{"line_number":493,"context_line":"        dm \u003d os.path.basename(os.path.realpath(device))"},{"line_number":494,"context_line":"        if dm.startswith(\u0027dm-\u0027):"},{"line_number":495,"context_line":"            name \u003d self.get_dm_name(dm)"},{"line_number":496,"context_line":"            if name:"},{"line_number":497,"context_line":"                return name"},{"line_number":498,"context_line":"        basename \u003d os.path.basename(device)"},{"line_number":499,"context_line":"        if basename.startswith(MPATH_UUID_PREFIX):"},{"line_number":500,"context_line":"            return basename[len(MPATH_UUID_PREFIX):]"},{"line_number":501,"context_line":"        if device.startswith(\u0027/dev/mapper/\u0027):"},{"line_number":502,"context_line":"            return basename"},{"line_number":503,"context_line":"        return device"},{"line_number":504,"context_line":""},{"line_number":505,"context_line":"    def flush_multipath_device(self, device_map_name: str) -\u003e None:"},{"line_number":506,"context_line":"        # While multipathd is running \"multipath -f\" does not flush locally,"}],"source_content_type":"text/x-python","patch_set":1,"id":"f121d37d_ae04e9bf","line":503,"range":{"start_line":473,"start_character":0,"end_line":503,"end_character":21},"in_reply_to":"9886e91f_33fbeb57","updated":"2026-09-22 12:51:10.000000000","message":"Acknowledged","commit_id":"f633cc2742092be0a70115f9ee1b2a54d21f4893"},{"author":{"_account_id":27615,"name":"Rajat Dhasmana","email":"rajatdhasmana@gmail.com","username":"whoami-rajat"},"change_message_id":"99d7d915fb34d0c6f4699c02a12e5c265d6f7cac","unresolved":true,"context_lines":[{"line_number":509,"context_line":"        # libdevmapper, which accepts any path; since 0.9.8 it accepts only"},{"line_number":510,"context_line":"        # a map name, alias, WWID or dm-N, and a device path such as"},{"line_number":511,"context_line":"        # /dev/disk/by-id/dm-uuid-mpath-\u003cWWID\u003e fails with \"device not found\"."},{"line_number":512,"context_line":"        map_name \u003d self.get_multipath_map_name(device_map_name)"},{"line_number":513,"context_line":"        LOG.debug(\"Flush multipath device %(name)s (%(device)s)\","},{"line_number":514,"context_line":"                  {\u0027name\u0027: map_name, \u0027device\u0027: device_map_name})"},{"line_number":515,"context_line":"        # NOTE(geguileo): With 30% connection error rates flush can get stuck,"}],"source_content_type":"text/x-python","patch_set":1,"id":"b93e7ea2_45e3ec32","line":512,"range":{"start_line":512,"start_character":8,"end_line":512,"end_character":63},"updated":"2026-09-22 11:23:48.000000000","message":"Since the above comment describes the working, here is the minimal fix that covers all cases mentioned above\n\n    if os.path.isabs(device_map_name):\n        device_map_name \u003d os.path.realpath(device_map_name)\n\nThis will not touch the iSCSI workflow (since iSCSI passes either WWID or alias name) and for FC, it will resolve to /dev/dm-* real path which is an acceptable paramter.\n\nThe /dev/dm-* will get translated to dm-*[1][2] and is an acceptable value for multipathd del \u003carg\u003e\n\n\n[1] https://github.com/opensvc/multipath-tools/blob/d53932bdbee02f440518ea384e63d7c4d3f66685/multipathd/cli_handlers.c#L760\n[2] https://github.com/opensvc/multipath-tools/blob/d53932bdbee02f440518ea384e63d7c4d3f66685/libmpathutil/util.c#L176","commit_id":"f633cc2742092be0a70115f9ee1b2a54d21f4893"},{"author":{"_account_id":13425,"name":"Simon Dodsley","email":"simon@everpuredata.com","username":"sdodsley"},"change_message_id":"f2baf5fca06590396ab91147fdc31dd5b2146404","unresolved":false,"context_lines":[{"line_number":509,"context_line":"        # libdevmapper, which accepts any path; since 0.9.8 it accepts only"},{"line_number":510,"context_line":"        # a map name, alias, WWID or dm-N, and a device path such as"},{"line_number":511,"context_line":"        # /dev/disk/by-id/dm-uuid-mpath-\u003cWWID\u003e fails with \"device not found\"."},{"line_number":512,"context_line":"        map_name \u003d self.get_multipath_map_name(device_map_name)"},{"line_number":513,"context_line":"        LOG.debug(\"Flush multipath device %(name)s (%(device)s)\","},{"line_number":514,"context_line":"                  {\u0027name\u0027: map_name, \u0027device\u0027: device_map_name})"},{"line_number":515,"context_line":"        # NOTE(geguileo): With 30% connection error rates flush can get stuck,"}],"source_content_type":"text/x-python","patch_set":1,"id":"8ce66efd_df7765d6","line":512,"range":{"start_line":512,"start_character":8,"end_line":512,"end_character":63},"in_reply_to":"b93e7ea2_45e3ec32","updated":"2026-09-22 12:51:10.000000000","message":"Acknowledged","commit_id":"f633cc2742092be0a70115f9ee1b2a54d21f4893"},{"author":{"_account_id":27615,"name":"Rajat Dhasmana","email":"rajatdhasmana@gmail.com","username":"whoami-rajat"},"change_message_id":"6e86468e9030248216264d76fe48c4fffdefea31","unresolved":false,"context_lines":[{"line_number":470,"context_line":"    # NOTE(geguileo): With 30% connection error rates flush can get stuck,"},{"line_number":471,"context_line":"    # set timeout to prevent it from hanging here forever.  Retry twice"},{"line_number":472,"context_line":"    # after 20 and 40 seconds."},{"line_number":473,"context_line":"    @utils.retry(putils.ProcessExecutionError, interval\u003d20, retries\u003d3)"},{"line_number":474,"context_line":"    def flush_multipath_device(self, device_map_name: str) -\u003e None:"},{"line_number":475,"context_line":"        # While multipathd is running \"multipath -f\" does not flush locally,"},{"line_number":476,"context_line":"        # it forwards the request to the daemon as \"del map \u003carg\u003e\".  Since"}],"source_content_type":"text/x-python","patch_set":3,"id":"34ce15b8_5c553df7","line":473,"range":{"start_line":473,"start_character":47,"end_line":473,"end_character":69},"updated":"2026-09-23 01:53:50.000000000","message":"I was slightly confused by this but somehow it matches our current behavior.\nretries\u003d3 doesn\u0027t mean first attempt+3 retries, it translates to 3 attempts in total[1].\nAlso interval in execute is multiplied by the backoff_rate (i.e. 2 by default[2]) so it matches here\n\n[1] https://github.com/openstack/os-brick/blob/master/os_brick/utils.py#L91\n[2] https://github.com/openstack/os-brick/blob/master/os_brick/privileged/rootwrap.py#L134-L135","commit_id":"0b39ed16b4968772a43a13b0bd2652ff93294f54"},{"author":{"_account_id":27615,"name":"Rajat Dhasmana","email":"rajatdhasmana@gmail.com","username":"whoami-rajat"},"change_message_id":"6e86468e9030248216264d76fe48c4fffdefea31","unresolved":true,"context_lines":[{"line_number":472,"context_line":"    # after 20 and 40 seconds."},{"line_number":473,"context_line":"    @utils.retry(putils.ProcessExecutionError, interval\u003d20, retries\u003d3)"},{"line_number":474,"context_line":"    def flush_multipath_device(self, device_map_name: str) -\u003e None:"},{"line_number":475,"context_line":"        # While multipathd is running \"multipath -f\" does not flush locally,"},{"line_number":476,"context_line":"        # it forwards the request to the daemon as \"del map \u003carg\u003e\".  Since"},{"line_number":477,"context_line":"        # multipath-tools 0.9.8 the daemon resolves \u003carg\u003e only as a map"},{"line_number":478,"context_line":"        # name, alias, WWID or dm-N, so a device path such as the"},{"line_number":479,"context_line":"        # /dev/disk/by-id/dm-uuid-mpath-\u003cWWID\u003e symlink the Fibre Channel"},{"line_number":480,"context_line":"        # connector passes fails with \"device not found\".  Resolve any path"},{"line_number":481,"context_line":"        # to its /dev/dm-N node: the daemon strips the /dev/ prefix and"},{"line_number":482,"context_line":"        # accepts dm-N.  Daemons older than 0.9.8 reject dm-N (libdevmapper"},{"line_number":483,"context_line":"        # treats it as a map name), but the multipath client of that era"},{"line_number":484,"context_line":"        # then falls back to a local flush by the full path, which is also"},{"line_number":485,"context_line":"        # how the by-id symlink has been working on those versions all"},{"line_number":486,"context_line":"        # along, so nothing changes there."},{"line_number":487,"context_line":"        #"},{"line_number":488,"context_line":"        # The retries wrap the whole method rather than the command so the"},{"line_number":489,"context_line":"        # path is resolved afresh on every attempt.  Device-mapper reuses a"}],"source_content_type":"text/x-python","patch_set":3,"id":"17ff82a7_389ae9f7","line":486,"range":{"start_line":475,"start_character":0,"end_line":486,"end_character":42},"updated":"2026-09-23 01:53:50.000000000","message":"nit: this is too verbose for a comment, maybe just mention that symlink path used to work pre-0.9.8 in multipath-tools but now we need to provide the actual block device path (i.e. the dm handle) for multipathd to be able to remove the path.","commit_id":"0b39ed16b4968772a43a13b0bd2652ff93294f54"},{"author":{"_account_id":13425,"name":"Simon Dodsley","email":"simon@everpuredata.com","username":"sdodsley"},"change_message_id":"fabe2aa1223a0ff1821fbb06e5afa99253d8cdd9","unresolved":false,"context_lines":[{"line_number":472,"context_line":"    # after 20 and 40 seconds."},{"line_number":473,"context_line":"    @utils.retry(putils.ProcessExecutionError, interval\u003d20, retries\u003d3)"},{"line_number":474,"context_line":"    def flush_multipath_device(self, device_map_name: str) -\u003e None:"},{"line_number":475,"context_line":"        # While multipathd is running \"multipath -f\" does not flush locally,"},{"line_number":476,"context_line":"        # it forwards the request to the daemon as \"del map \u003carg\u003e\".  Since"},{"line_number":477,"context_line":"        # multipath-tools 0.9.8 the daemon resolves \u003carg\u003e only as a map"},{"line_number":478,"context_line":"        # name, alias, WWID or dm-N, so a device path such as the"},{"line_number":479,"context_line":"        # /dev/disk/by-id/dm-uuid-mpath-\u003cWWID\u003e symlink the Fibre Channel"},{"line_number":480,"context_line":"        # connector passes fails with \"device not found\".  Resolve any path"},{"line_number":481,"context_line":"        # to its /dev/dm-N node: the daemon strips the /dev/ prefix and"},{"line_number":482,"context_line":"        # accepts dm-N.  Daemons older than 0.9.8 reject dm-N (libdevmapper"},{"line_number":483,"context_line":"        # treats it as a map name), but the multipath client of that era"},{"line_number":484,"context_line":"        # then falls back to a local flush by the full path, which is also"},{"line_number":485,"context_line":"        # how the by-id symlink has been working on those versions all"},{"line_number":486,"context_line":"        # along, so nothing changes there."},{"line_number":487,"context_line":"        #"},{"line_number":488,"context_line":"        # The retries wrap the whole method rather than the command so the"},{"line_number":489,"context_line":"        # path is resolved afresh on every attempt.  Device-mapper reuses a"}],"source_content_type":"text/x-python","patch_set":3,"id":"a188c72a_0a78b8e8","line":486,"range":{"start_line":475,"start_character":0,"end_line":486,"end_character":42},"in_reply_to":"0c42646a_5099eb28","updated":"2026-09-23 12:38:06.000000000","message":"Done","commit_id":"0b39ed16b4968772a43a13b0bd2652ff93294f54"},{"author":{"_account_id":5314,"name":"Brian Rosmaita","email":"rosmaita.fossdev@gmail.com","username":"brian-rosmaita"},"change_message_id":"463843b06231fd9e37c085030bb5c734733e5a14","unresolved":true,"context_lines":[{"line_number":472,"context_line":"    # after 20 and 40 seconds."},{"line_number":473,"context_line":"    @utils.retry(putils.ProcessExecutionError, interval\u003d20, retries\u003d3)"},{"line_number":474,"context_line":"    def flush_multipath_device(self, device_map_name: str) -\u003e None:"},{"line_number":475,"context_line":"        # While multipathd is running \"multipath -f\" does not flush locally,"},{"line_number":476,"context_line":"        # it forwards the request to the daemon as \"del map \u003carg\u003e\".  Since"},{"line_number":477,"context_line":"        # multipath-tools 0.9.8 the daemon resolves \u003carg\u003e only as a map"},{"line_number":478,"context_line":"        # name, alias, WWID or dm-N, so a device path such as the"},{"line_number":479,"context_line":"        # /dev/disk/by-id/dm-uuid-mpath-\u003cWWID\u003e symlink the Fibre Channel"},{"line_number":480,"context_line":"        # connector passes fails with \"device not found\".  Resolve any path"},{"line_number":481,"context_line":"        # to its /dev/dm-N node: the daemon strips the /dev/ prefix and"},{"line_number":482,"context_line":"        # accepts dm-N.  Daemons older than 0.9.8 reject dm-N (libdevmapper"},{"line_number":483,"context_line":"        # treats it as a map name), but the multipath client of that era"},{"line_number":484,"context_line":"        # then falls back to a local flush by the full path, which is also"},{"line_number":485,"context_line":"        # how the by-id symlink has been working on those versions all"},{"line_number":486,"context_line":"        # along, so nothing changes there."},{"line_number":487,"context_line":"        #"},{"line_number":488,"context_line":"        # The retries wrap the whole method rather than the command so the"},{"line_number":489,"context_line":"        # path is resolved afresh on every attempt.  Device-mapper reuses a"}],"source_content_type":"text/x-python","patch_set":3,"id":"0c42646a_5099eb28","line":486,"range":{"start_line":475,"start_character":0,"end_line":486,"end_character":42},"in_reply_to":"17ff82a7_389ae9f7","updated":"2026-09-23 12:02:10.000000000","message":"I agree with Rajat here.  I suggest adding the details you have in this comment into the LP bug report, since it\u0027s good information about what you determined in analyzing the bug; in this comment, just follow Rajat\u0027s suggestion","commit_id":"0b39ed16b4968772a43a13b0bd2652ff93294f54"},{"author":{"_account_id":5314,"name":"Brian Rosmaita","email":"rosmaita.fossdev@gmail.com","username":"brian-rosmaita"},"change_message_id":"463843b06231fd9e37c085030bb5c734733e5a14","unresolved":true,"context_lines":[{"line_number":485,"context_line":"        # how the by-id symlink has been working on those versions all"},{"line_number":486,"context_line":"        # along, so nothing changes there."},{"line_number":487,"context_line":"        #"},{"line_number":488,"context_line":"        # The retries wrap the whole method rather than the command so the"},{"line_number":489,"context_line":"        # path is resolved afresh on every attempt.  Device-mapper reuses a"},{"line_number":490,"context_line":"        # freed minor number immediately, so a dm-N resolved once before the"},{"line_number":491,"context_line":"        # retries could name a different map by the time a retry runs."},{"line_number":492,"context_line":"        if os.path.isabs(device_map_name):"},{"line_number":493,"context_line":"            device_map_name \u003d os.path.realpath(device_map_name)"},{"line_number":494,"context_line":"        LOG.debug(\"Flush multipath device %s\", device_map_name)"}],"source_content_type":"text/x-python","patch_set":3,"id":"9426f41b_129bfcbe","line":491,"range":{"start_line":488,"start_character":0,"end_line":491,"end_character":70},"updated":"2026-09-23 12:02:10.000000000","message":"This comment is a bit verbose and I think your point gets lost.  Your aim is to explain why you are moving the retries to the function level.  I suggest something like:\n\n```\n# NOTE: we intentionally do retries at the function level so that we get a fresh\n# path before trying the flush (device-mapper is aggressive about reusing freed\n# minor numbers, and so dm-N could name a different map when the retry runs)\n```\n\nThis way, someone using git blame will know exactly why you removed the retries from _execute()","commit_id":"0b39ed16b4968772a43a13b0bd2652ff93294f54"},{"author":{"_account_id":13425,"name":"Simon Dodsley","email":"simon@everpuredata.com","username":"sdodsley"},"change_message_id":"fabe2aa1223a0ff1821fbb06e5afa99253d8cdd9","unresolved":false,"context_lines":[{"line_number":485,"context_line":"        # how the by-id symlink has been working on those versions all"},{"line_number":486,"context_line":"        # along, so nothing changes there."},{"line_number":487,"context_line":"        #"},{"line_number":488,"context_line":"        # The retries wrap the whole method rather than the command so the"},{"line_number":489,"context_line":"        # path is resolved afresh on every attempt.  Device-mapper reuses a"},{"line_number":490,"context_line":"        # freed minor number immediately, so a dm-N resolved once before the"},{"line_number":491,"context_line":"        # retries could name a different map by the time a retry runs."},{"line_number":492,"context_line":"        if os.path.isabs(device_map_name):"},{"line_number":493,"context_line":"            device_map_name \u003d os.path.realpath(device_map_name)"},{"line_number":494,"context_line":"        LOG.debug(\"Flush multipath device %s\", device_map_name)"}],"source_content_type":"text/x-python","patch_set":3,"id":"3190888e_0bb4a576","line":491,"range":{"start_line":488,"start_character":0,"end_line":491,"end_character":70},"in_reply_to":"9426f41b_129bfcbe","updated":"2026-09-23 12:38:06.000000000","message":"Done","commit_id":"0b39ed16b4968772a43a13b0bd2652ff93294f54"},{"author":{"_account_id":27615,"name":"Rajat Dhasmana","email":"rajatdhasmana@gmail.com","username":"whoami-rajat"},"change_message_id":"4f2eb3e73bc8680566843c63dcb3689d4ca0bf60","unresolved":true,"context_lines":[{"line_number":474,"context_line":"    def flush_multipath_device(self, device_map_name: str) -\u003e None:"},{"line_number":475,"context_line":"        # NOTE: The Fibre Channel connector passes a symlink such as"},{"line_number":476,"context_line":"        # /dev/disk/by-id/dm-uuid-mpath-\u003cWWID\u003e.  That worked before"},{"line_number":477,"context_line":"        # multipath-tools 0.9.8, but multipathd now needs the actual block"},{"line_number":478,"context_line":"        # device (the /dev/dm-N handle) to be able to remove the map."},{"line_number":479,"context_line":"        #"},{"line_number":480,"context_line":"        # NOTE: we intentionally do retries at the function level so that we"}],"source_content_type":"text/x-python","patch_set":4,"id":"ccc9e865_56c9020a","line":477,"range":{"start_line":477,"start_character":10,"end_line":477,"end_character":31},"updated":"2026-09-23 14:45:14.000000000","message":"nit: this doesn\u0027t mention the device-mapper-multipath version","commit_id":"63832771027ffc487a61ec0ff4c66d173e7e12af"},{"author":{"_account_id":27615,"name":"Rajat Dhasmana","email":"rajatdhasmana@gmail.com","username":"whoami-rajat"},"change_message_id":"4f2eb3e73bc8680566843c63dcb3689d4ca0bf60","unresolved":true,"context_lines":[{"line_number":475,"context_line":"        # NOTE: The Fibre Channel connector passes a symlink such as"},{"line_number":476,"context_line":"        # /dev/disk/by-id/dm-uuid-mpath-\u003cWWID\u003e.  That worked before"},{"line_number":477,"context_line":"        # multipath-tools 0.9.8, but multipathd now needs the actual block"},{"line_number":478,"context_line":"        # device (the /dev/dm-N handle) to be able to remove the map."},{"line_number":479,"context_line":"        #"},{"line_number":480,"context_line":"        # NOTE: we intentionally do retries at the function level so that we"},{"line_number":481,"context_line":"        # get a fresh path before trying the flush (device-mapper is"}],"source_content_type":"text/x-python","patch_set":4,"id":"90bd1fae_508aadaa","line":478,"range":{"start_line":478,"start_character":18,"end_line":478,"end_character":38},"updated":"2026-09-23 14:45:14.000000000","message":"this is not the only valid value, we can also pass WWID or the user friendly alias (mpatha) -- when friendly names are turned on","commit_id":"63832771027ffc487a61ec0ff4c66d173e7e12af"}],"os_brick/tests/initiator/test_linuxscsi.py":[{"author":{"_account_id":5314,"name":"Brian Rosmaita","email":"rosmaita.fossdev@gmail.com","username":"brian-rosmaita"},"change_message_id":"21534578b13ebf7116648b55e06f81d1124507ce","unresolved":false,"context_lines":[{"line_number":151,"context_line":"                       side_effect\u003d[\u0027/dev/dm-3\u0027, \u0027/dev/dm-7\u0027])"},{"line_number":152,"context_line":"    def test_flush_multipath_device_retry_resolves_path_again("},{"line_number":153,"context_line":"            self, realpath_mock):"},{"line_number":154,"context_line":"        \"\"\"Each attempt resolves the path, so a reused minor is not hit.\"\"\""},{"line_number":155,"context_line":"        wwid \u003d \u00273600d0230000000000e13955cc3757800\u0027"},{"line_number":156,"context_line":"        path \u003d \u0027/dev/disk/by-id/dm-uuid-mpath-\u0027 + wwid"},{"line_number":157,"context_line":"        exec_mock \u003d mock.Mock(side_effect\u003d[putils.ProcessExecutionError(),"}],"source_content_type":"text/x-python","patch_set":4,"id":"5b00f6f6_c503dc1e","line":154,"updated":"2026-09-23 14:07:04.000000000","message":"This was a good catch, by the way.","commit_id":"63832771027ffc487a61ec0ff4c66d173e7e12af"},{"author":{"_account_id":27615,"name":"Rajat Dhasmana","email":"rajatdhasmana@gmail.com","username":"whoami-rajat"},"change_message_id":"4f2eb3e73bc8680566843c63dcb3689d4ca0bf60","unresolved":false,"context_lines":[{"line_number":151,"context_line":"                       side_effect\u003d[\u0027/dev/dm-3\u0027, \u0027/dev/dm-7\u0027])"},{"line_number":152,"context_line":"    def test_flush_multipath_device_retry_resolves_path_again("},{"line_number":153,"context_line":"            self, realpath_mock):"},{"line_number":154,"context_line":"        \"\"\"Each attempt resolves the path, so a reused minor is not hit.\"\"\""},{"line_number":155,"context_line":"        wwid \u003d \u00273600d0230000000000e13955cc3757800\u0027"},{"line_number":156,"context_line":"        path \u003d \u0027/dev/disk/by-id/dm-uuid-mpath-\u0027 + wwid"},{"line_number":157,"context_line":"        exec_mock \u003d mock.Mock(side_effect\u003d[putils.ProcessExecutionError(),"}],"source_content_type":"text/x-python","patch_set":4,"id":"b21f26b6_1f7f4886","line":154,"in_reply_to":"5b00f6f6_c503dc1e","updated":"2026-09-23 14:45:14.000000000","message":"+1","commit_id":"63832771027ffc487a61ec0ff4c66d173e7e12af"}]}
