Bug 768856 - [ovirt] [vdsm] '/sbin/multipath' should use '-r' option on rescan() function in multipath.py so multipath will reload changes from config file
Summary: [ovirt] [vdsm] '/sbin/multipath' should use '-r' option on rescan() function...
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: oVirt
Classification: Retired
Component: vdsm
Version: unspecified
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
: 3.3.4
Assignee: Haim
QA Contact:
URL:
Whiteboard: storage
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-12-19 07:40 UTC by Haim
Modified: 2016-02-10 17:06 UTC (History)
8 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-03-12 09:37:01 UTC
oVirt Team: Storage


Attachments (Terms of Use)

Description Haim 2011-12-19 07:40:12 UTC
Description of problem:

case - support use_friendly_names 

issue - running multipath doesn't reload changes from /etc/multipath.conf hence when using use_friendly_names = yes and configuring aliases, changes are not taking affect, only after running multipath -r or reloading multipathd service. 

repro:

- vi /etc/multipath.conf
- add the following:

defaults {
    polling_interval        5
    getuid_callout          "/lib/udev/scsi_id -g -u -d /dev/%n"
    no_path_retry           fail
    user_friendly_names     yes
    flush_on_last_del       yes
    fast_io_fail_tmo        5
    dev_loss_tmo            30
    max_fds                 4096
}

multipaths {

        multipath {
                wwid                36090a068a0746b89ddee943b5b253db6
                alias               rhev-a24-01_myDev1
        }
        multipath {
                wwid               36090a068a074fb95ddeee43b5b259da7
                alias               rhev-a24-01_myDev2
        }
}


- [root@rhev-a24c-01 ~]# multipath
- [root@rhev-a24c-01 ~]# multipath -ll
  36090a068a074fb95ddeee43b5b259da7 dm-3 EQLOGIC,100E-00
  size=75G features='0' hwhandler='0' wp=rw
  `-+- policy='round-robin 0' prio=1 status=active
  `- 18:0:0:0 sdj 8:144 active ready  running
- [root@rhev-a24c-01 ~]# multipath -r
  Dec 19 02:32:50 | failed to find rport_id for target6:0:0
  Dec 19 02:32:50 | failed to find rport_id for target18:0:0
  Dec 19 02:32:50 | 36090a068a074fb95ddeee43b5b259da7: rename   
  36090a068a074fb95ddeee43b5b259da7 to rhev-a24-01_myDev2
  rename: rhev-a24-01_myDev2 (36090a068a074fb95ddeee43b5b259da7) undef   
  EQLOGIC,100E-00 size=75G features='0' hwhandler='0' wp=undef
  `-+- policy='round-robin 0' prio=1 status=undef
  `- 18:0:0:0 sdj 8:144 active ready  running

code relations: 

from multipath.py +71, execCmd should be changed to misc.execCmd([constants.EXT_MULTIPATH, '-r'])

tested and it works.

def rescan():
    """
    Forces multiupath daemon to rescan the list of available devices and
    refresh the mapping table. New devices can be found under /dev/mapper

    Should only be called from hsm._rescanDevices()
    """

    # First ask iSCSI to rescan all its sessions
    iscsi.rescan()

    supervdsm.getProxy().forceIScsiScan()

    # Now let multipath daemon pick up new devices
    misc.execCmd([constants.EXT_MULTIPATH])

Comment 1 Dan Kenigsberg 2011-12-19 11:38:36 UTC
Option -r is not documented; what does it do exactly?

Comment 2 Haim 2011-12-19 12:09:00 UTC
(In reply to comment #1)
> Option -r is not documented; what does it do exactly?

from multipath upstream git;

cat  multipath/multipath.8 | grep -B 1  reload
.B \-r
force devmap reload

Comment 3 Itamar Heim 2013-03-12 09:37:01 UTC
Closing old bugs. If this issue is still relevant/important in current version, please re-open the bug.


Note You need to log in before you can comment on or make changes to this bug.