Re: [ovirt-users] can not use iscsi storage type onovirtandGlusterfshyper-converged environment
Hi 胡茂荣, Can you test this patch? https://gerrit.ovirt.org/67844 I also need more information on your setup, to add more details to the commit message. Thanks for reporting this, Nir On Mon, Dec 5, 2016 at 10:28 AM, 胡茂荣 <maorong...@horebdata.cn> wrote: > > Thanks for Yaniv Kaul , change code need build vdsm source code , and > if only change /usr/share/vdsm/storage/devicemapper.py will not really > take effect . > >could this problem as a bug , and correct it to ovirt vdsm source code > ? > > -- Original -- > *From: * "Yaniv Kaul"<yk...@redhat.com>; > *Date: * Sun, Dec 4, 2016 07:07 PM > *To: * "胡茂荣"<maorong...@horebdata.cn>; > *Cc: * "胡晓宇"<samuel@horebdata.cn>; "users"<users@ovirt.org>; "Sahina > Bose"<sab...@redhat.com>; "Jeff Nelson"<jenel...@redhat.com>; > *Subject: * Re: [ovirt-users] can not use iscsi storage type > onovirtandGlusterfshyper-converged environment > > > > On Dec 2, 2016 11:53 AM, "胡茂荣" <maorong...@horebdata.cn> wrote: > >I find supervdsm used " /usr/sbin/dmsetup status" : > > MainProcess|jsonrpc.Executor/2::DEBUG::2016-12-02 > 17:12:16,372::supervdsmServer::92::SuperVdsm.ServerCallback::(wrapper) > call getPathsStatus with () {} > MainProcess|jsonrpc.Executor/2::DEBUG::2016-12-02 > 17:12:16,373::devicemapper::154::Storage.Misc.excCmd::(_getPathsStatus) > /usr/bin/taskset --cpu-list 0-7 /usr/sbin/dmsetup status (cwd None) > MainProcess|jsonrpc.Executor/2::DEBUG::2016-12-02 > 17:12:16,377::devicemapper::154::Storage.Misc.excCmd::(_getPathsStatus) > SUCCESS: = ''; = 0 > MainProcess|jsonrpc.Executor/2::ERROR::2016-12-02 > 17:12:16,378::supervdsmServer::96::SuperVdsm.ServerCallback::(wrapper) Error > in getPathsStatus > > problem : > how can I change Storage.Misc.excCmd _getPathsStatus " /usr/bin/taskset > --cpu-list 0-7 /usr/sbin/dmsetup status" to : > >/usr/bin/taskset --cpu-list 0-7 /usr/sbin/dmsetup status --target > multipah > > I think add iscsi type storage , if supervdsm scan mulitpah will solve > my problem .(my environment have other dm devices, use "dmsetup status" > will show them, and vdsm get dm path status will occur error ) > > > > so I changed some as follow : > (1) >I define EXT_DMSETUP_STATUS in > /usr/lib/python2.7/site-packages/vdsm/constants.py > : > > /usr/lib/python2.7/site-packages/vdsm/constants.py:EXT_DMSETUP = > '/usr/sbin/dmsetup' > /usr/lib/python2.7/site-packages/vdsm/constants.py:EXT_DMSETUP_STATUS = > "/usr/sbin/dmsetup status --target multipath" > > (2) > /usr/share/vdsm/storage/devicemapper.py add : > from vdsm.constants import EXT_DMSETUP_STATUS > > and changed getPathsStatus cmd to " EXT_DMSETUP_STATUS" : > > def _getPathsStatus(): > cmd = [EXT_DMSETUP_STATUS]# before : cmd=[ > EXT_DMSETUP,"status"] > > > Why not change this to: > cmd = [EXT_DMSETUP, "status", "--target", "multipath"] > > Y. > > rc, out, err = misc.execCmd(cmd) > > === > > but log in supervdsm log also not change . Please help me ,how to change > code to let supervdsm exec "/usr/sbin/dmsetup status --target multipath" > in function getPathsStatus() 。 > > > > > -- Original -- > *From: * "胡茂荣"<maorong...@horebdata.cn>; > *Date: * Fri, Nov 25, 2016 05:44 PM > *To: * "Sahina Bose"<sab...@redhat.com>; > *Cc: * "Maor Lipchuk"<mlipc...@redhat.com>; "Jeff Nelson"< > jenel...@redhat.com>; "users"<users@ovirt.org>; > *Subject: * Re: [ovirt-users] can not use iscsi storage type on > ovirtandGlusterfshyper-converged environment > > > ===--- > >###vdsm or supervdsm log report : > > MainProcess|jsonrpc.Executor/7::ERROR::2016-11-01 > 11:07:00,178::supervdsmServer::96::SuperVdsm.ServerCallback::(wrapper) > Error in getPathsStatus > > MainProcess|jsonrpc.Executor/4::ERROR::2016-11-01 > 11:07:20,964::supervdsmServer::96::SuperVdsm.ServerCallback::(wrapper) > Error in getPathsStatus > some code info > > [root@horeba storage]# pwd > /usr/share/vdsm/storage > > [root@horeba storage]# grep "getPathsStatus" -R ./ > ./devicemapper.py:def _getPathsStatus(): > .
Re: [ovirt-users] can not use iscsi storage type onovirtandGlusterfshyper-converged environment
Hi, After changing the code, you need to restart the VDSM service to take effect. Regards, Fred On Mon, Dec 5, 2016 at 10:28 AM, 胡茂荣 <maorong...@horebdata.cn> wrote: > > Thanks for Yaniv Kaul , change code need build vdsm source code , and > if only change /usr/share/vdsm/storage/devicemapper.py will not really > take effect . > >could this problem as a bug , and correct it to ovirt vdsm source code > ? > > -- Original -- > *From: * "Yaniv Kaul"<yk...@redhat.com>; > *Date: * Sun, Dec 4, 2016 07:07 PM > *To: * "胡茂荣"<maorong...@horebdata.cn>; > *Cc: * "胡晓宇"<samuel@horebdata.cn>; "users"<users@ovirt.org>; "Sahina > Bose"<sab...@redhat.com>; "Jeff Nelson"<jenel...@redhat.com>; > *Subject: * Re: [ovirt-users] can not use iscsi storage type > onovirtandGlusterfshyper-converged environment > > > > On Dec 2, 2016 11:53 AM, "胡茂荣" <maorong...@horebdata.cn> wrote: > >I find supervdsm used " /usr/sbin/dmsetup status" : > > MainProcess|jsonrpc.Executor/2::DEBUG::2016-12-02 > 17:12:16,372::supervdsmServer::92::SuperVdsm.ServerCallback::(wrapper) > call getPathsStatus with () {} > MainProcess|jsonrpc.Executor/2::DEBUG::2016-12-02 > 17:12:16,373::devicemapper::154::Storage.Misc.excCmd::(_getPathsStatus) > /usr/bin/taskset --cpu-list 0-7 /usr/sbin/dmsetup status (cwd None) > MainProcess|jsonrpc.Executor/2::DEBUG::2016-12-02 > 17:12:16,377::devicemapper::154::Storage.Misc.excCmd::(_getPathsStatus) > SUCCESS: = ''; = 0 > MainProcess|jsonrpc.Executor/2::ERROR::2016-12-02 > 17:12:16,378::supervdsmServer::96::SuperVdsm.ServerCallback::(wrapper) Error > in getPathsStatus > > problem : > how can I change Storage.Misc.excCmd _getPathsStatus " /usr/bin/taskset > --cpu-list 0-7 /usr/sbin/dmsetup status" to : > >/usr/bin/taskset --cpu-list 0-7 /usr/sbin/dmsetup status --target > multipah > > I think add iscsi type storage , if supervdsm scan mulitpah will solve > my problem .(my environment have other dm devices, use "dmsetup status" > will show them, and vdsm get dm path status will occur error ) > > > > so I changed some as follow : > (1) >I define EXT_DMSETUP_STATUS in > /usr/lib/python2.7/site-packages/vdsm/constants.py > : > > /usr/lib/python2.7/site-packages/vdsm/constants.py:EXT_DMSETUP = > '/usr/sbin/dmsetup' > /usr/lib/python2.7/site-packages/vdsm/constants.py:EXT_DMSETUP_STATUS = > "/usr/sbin/dmsetup status --target multipath" > > (2) > /usr/share/vdsm/storage/devicemapper.py add : > from vdsm.constants import EXT_DMSETUP_STATUS > > and changed getPathsStatus cmd to " EXT_DMSETUP_STATUS" : > > def _getPathsStatus(): > cmd = [EXT_DMSETUP_STATUS]# before : cmd=[ > EXT_DMSETUP,"status"] > > > Why not change this to: > cmd = [EXT_DMSETUP, "status", "--target", "multipath"] > > Y. > > rc, out, err = misc.execCmd(cmd) > > === > > but log in supervdsm log also not change . Please help me ,how to change > code to let supervdsm exec "/usr/sbin/dmsetup status --target multipath" > in function getPathsStatus() 。 > > > > > -- Original -- > *From: * "胡茂荣"<maorong...@horebdata.cn>; > *Date: * Fri, Nov 25, 2016 05:44 PM > *To: * "Sahina Bose"<sab...@redhat.com>; > *Cc: * "Maor Lipchuk"<mlipc...@redhat.com>; "Jeff Nelson"< > jenel...@redhat.com>; "users"<users@ovirt.org>; > *Subject: * Re: [ovirt-users] can not use iscsi storage type on > ovirtandGlusterfshyper-converged environment > > > ===--- > >###vdsm or supervdsm log report : > > MainProcess|jsonrpc.Executor/7::ERROR::2016-11-01 > 11:07:00,178::supervdsmServer::96::SuperVdsm.ServerCallback::(wrapper) > Error in getPathsStatus > > MainProcess|jsonrpc.Executor/4::ERROR::2016-11-01 > 11:07:20,964::supervdsmServer::96::SuperVdsm.ServerCallback::(wrapper) > Error in getPathsStatus > some code info > > [root@horeba storage]# pwd > /usr/share/vdsm/storage > > [root@horeba storage]# grep "getPathsStatus" -R ./ > ./devicemapper.py:def _getPathsStatus(): > ./devicemapper.py:def getPathsStatus(): > ./devicemapper.py:return getProxy
Re: [ovirt-users] can not use iscsi storage type onovirtandGlusterfshyper-converged environment
Thanks for Yaniv Kaul , change code need build vdsm source code , and if only change /usr/share/vdsm/storage/devicemapper.py will not really take effect . could this problem as a bug , and correct it to ovirt vdsm source code ? -- Original -- From: "Yaniv Kaul"<yk...@redhat.com>; Date: Sun, Dec 4, 2016 07:07 PM To: "胡茂荣"<maorong...@horebdata.cn>; Cc: "胡晓宇"<samuel@horebdata.cn>; "users"<users@ovirt.org>; "Sahina Bose"<sab...@redhat.com>; "Jeff Nelson"<jenel...@redhat.com>; Subject: Re: [ovirt-users] can not use iscsi storage type onovirtandGlusterfshyper-converged environment On Dec 2, 2016 11:53 AM, "胡茂荣" <maorong...@horebdata.cn> wrote: I find supervdsm used " /usr/sbin/dmsetup status" : MainProcess|jsonrpc.Executor/2::DEBUG::2016-12-02 17:12:16,372::supervdsmServer::92::SuperVdsm.ServerCallback::(wrapper) call getPathsStatus with () {} MainProcess|jsonrpc.Executor/2::DEBUG::2016-12-02 17:12:16,373::devicemapper::154::Storage.Misc.excCmd::(_getPathsStatus) /usr/bin/taskset --cpu-list 0-7 /usr/sbin/dmsetup status (cwd None) MainProcess|jsonrpc.Executor/2::DEBUG::2016-12-02 17:12:16,377::devicemapper::154::Storage.Misc.excCmd::(_getPathsStatus) SUCCESS: = ''; = 0 MainProcess|jsonrpc.Executor/2::ERROR::2016-12-02 17:12:16,378::supervdsmServer::96::SuperVdsm.ServerCallback::(wrapper) Error in getPathsStatus problem : how can I change Storage.Misc.excCmd _getPathsStatus " /usr/bin/taskset --cpu-list 0-7 /usr/sbin/dmsetup status" to : /usr/bin/taskset --cpu-list 0-7 /usr/sbin/dmsetup status --target multipah I think add iscsi type storage , if supervdsm scan mulitpah will solve my problem .(my environment have other dm devices, use "dmsetup status" will show them, and vdsm get dm path status will occur error ) so I changed some as follow : (1) I define EXT_DMSETUP_STATUS in /usr/lib/python2.7/site-packages/vdsm/constants.py : /usr/lib/python2.7/site-packages/vdsm/constants.py:EXT_DMSETUP = '/usr/sbin/dmsetup' /usr/lib/python2.7/site-packages/vdsm/constants.py:EXT_DMSETUP_STATUS = "/usr/sbin/dmsetup status --target multipath" (2) /usr/share/vdsm/storage/devicemapper.py add : from vdsm.constants import EXT_DMSETUP_STATUS and changed getPathsStatus cmd to " EXT_DMSETUP_STATUS" : def _getPathsStatus(): cmd = [EXT_DMSETUP_STATUS]# before : cmd=[EXT_DMSETUP,"status"] Why not change this to: cmd = [EXT_DMSETUP, "status", "--target", "multipath"] Y. rc, out, err = misc.execCmd(cmd) === but log in supervdsm log also not change . Please help me ,how to change code to let supervdsm exec "/usr/sbin/dmsetup status --target multipath" in function getPathsStatus() 。 -- Original -- From: "胡茂荣"<maorong...@horebdata.cn>; Date: Fri, Nov 25, 2016 05:44 PM To: "Sahina Bose"<sab...@redhat.com>; Cc: "Maor Lipchuk"<mlipc...@redhat.com>; "Jeff Nelson"<jenel...@redhat.com>; "users"<users@ovirt.org>; Subject: Re: [ovirt-users] can not use iscsi storage type on ovirtandGlusterfshyper-converged environment ===--- ###vdsm or supervdsm log report : MainProcess|jsonrpc.Executor/7::ERROR::2016-11-01 11:07:00,178::supervdsmServer::96::SuperVdsm.ServerCallback::(wrapper) Error in getPathsStatus MainProcess|jsonrpc.Executor/4::ERROR::2016-11-01 11:07:20,964::supervdsmServer::96::SuperVdsm.ServerCallback::(wrapper) Error in getPathsStatus some code info > [root@horeba storage]# pwd /usr/share/vdsm/storage [root@horeba storage]# grep "getPathsStatus" -R ./ ./devicemapper.py:def _getPathsStatus(): ./devicemapper.py:def getPathsStatus(): ./devicemapper.py:return getProxy().getPathsStatus() ./multipath.py:pathStatuses = devicemapper.getPathsStatus() def _getPathsStatus(): cmd = [EXT_DMSETUP, "status"] rc, out, err = misc.execCmd(cmd) if rc != 0: raise Exception("Could not get device statuses") res = {} for statusLine in out: try: devName, statusLine = statusLine.split(":", 1) except ValueError: if len(out) == 1: # return an empty dict when status output is: No devices found return res else: raise for m in PATH_STATUS_RE.finditer(statusLine): devNum, status = m.gro