Sam Wan fc6ca22bdb Replace sg_scan with lsscsi to get '[H:C:T:L]'
The current get_device_info uses sg_scan to get device info but it only
returns HLU number lower than 255 due to bug#1793259. sg_scan was
designed for old days when 255 LUNs were enough. However we now have
requirement to support HLU number greater than 255. Since lsscsi doesn't
have the limit of 255, we should use lsscsi to get device info.

The 'device' of get_device_info can be of 2 types:
o /dev/disk/by-path/xxx, which is a symlink to /dev/sdX
o /dev/sdX

sg_scan can take any device name but lsscsi only show /dev/sdx names.
So if the device is a symlink, we use the device name it links to,
otherwise we use it directly.
Then get the device info '[H:C:T:L]' by comparing the device name with the
last column of lsscsi output
Also lsscsi doesn't require privilege.

Depends-on: https://review.opendev.org/743548
Change-Id: I867c972d9f712c0df4260ebc8211b786006ed7a2
Closes-bug: #1793259
2020-07-29 13:57:06 +00:00

47 lines
1.5 KiB
Plaintext

# This is a cross-platform list tracking distribution packages needed for
# install and tests
# see https://docs.openstack.org/infra/bindep/ for additional information.
curl
device-mapper-multipath [platform:rpm]
multipath-tools [platform:dpkg]
sg3-utils [platform:dpkg]
sg3_utils [platform:rpm]
libxml2-devel [platform:rpm]
libxml2-dev [platform:dpkg]
libxslt-devel [platform:rpm]
libxslt1-dev [platform:dpkg]
libssl-dev [platform:dpkg]
openssl-devel [platform:rpm !platform:suse]
libopenssl-devel [platform:suse !platform:rpm]
iscsi-initiator-utils [platform:rpm !platform:suse]
open-iscsi [platform:suse platform:dpkg]
lsscsi
# Binary dependencies for PDF doc generation
fonts-liberation [doc platform:dpkg]
texlive-latex-base [doc platform:dpkg]
texlive-latex-extra [doc platform:dpkg]
texlive-xetex [doc platform:dpkg]
texlive-fonts-recommended [doc platform:dpkg]
xindy [doc platform:dpkg]
latexmk [doc platform:dpkg]
texlive [doc platform:rpm]
texlive-fncychap [doc platform:rpm]
texlive-titlesec [doc platform:rpm]
texlive-tabulary [doc platform:rpm]
texlive-framed [doc platform:rpm]
texlive-wrapfig [doc platform:rpm]
texlive-upquote [doc platform:rpm]
texlive-capt-of [doc platform:rpm]
texlive-needspace [doc platform:rpm]
texlive-polyglossia [doc platform:rpm]
texlive-xetex [doc platform:rpm]
texlive-xindy [doc platform:rpm]
texlive-courier [doc platform:rpm]
latexmk [doc platform:rpm]
python3-sphinxcontrib-svg2pdfconverter-common [doc platform:rpm]
librsvg2-tools [doc platform:rpm]
librsvg2-bin [doc platform:dpkg]