Replace rescan_scsi_bus script with the latest one

Bug #1750774 reported by bugproxy
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
The Ubuntu-power-systems project
Invalid
High
Canonical Server
sg3-utils (Ubuntu)
Invalid
Undecided
Ubuntu on IBM Power Systems Bug Triage

Bug Description

== Comment: #0 - Peeyush Gupta - 2018-02-20 04:58:29 ==
---Problem Description---
There is a package sg3-utils that install a script "rescan_scsi_bus.sh". The script is not working as expected, but if I take the master script from https://github.com/hreinecke/sg3_utils/blob/master/scripts/rescan-scsi-bus.sh it works properly. Please get the latest script included in the package.

Machine Type = ppc64le ubuntu vm

---Steps to Reproduce---
 Create a disk with block storage, discover it through rescan_scsi_bus.sh.

---uname output---
Linux pcloud-icp2 4.4.0-112-generic #135-Ubuntu SMP Fri Jan 19 11:48:46 UTC 2018 ppc64le ppc64le ppc64le GNU/Linux

---Debugger---
A debugger is not configured

bugproxy (bugproxy)
tags: added: architecture-ppc64le bugnameltc-164869 severity-high targetmilestone-inin---
Changed in ubuntu:
assignee: nobody → Ubuntu on IBM Power Systems Bug Triage (ubuntu-power-triage)
affects: ubuntu → sg3-utils (Ubuntu)
Frank Heimes (fheimes)
Changed in ubuntu-power-systems:
importance: Undecided → High
assignee: nobody → Canonical Server Team (canonical-server)
tags: added: triage-g
Revision history for this message
David Britton (dpb) wrote :

It's encouraging that a script from the trunk of the project worked, but there is no detail in this bug report about key questions:

1) What did you try?

2) What happend (what went wrong)?

3) What should have happened?

4) Description of the environment under test, including the versions in play for the ubuntu OS and for the package in question (sg3-utils).

In this case, since it's a script, command lines and output of all of these things would be very helpful.

Also as this is about iSCSI, a brief description of the environment in use is most likely a requirement for successful resolution of the bug.

Changed in sg3-utils (Ubuntu):
status: New → Incomplete
Changed in ubuntu-power-systems:
status: New → Incomplete
Revision history for this message
Manoj Iyer (manjo) wrote :

Also, please consider reproducing this issue on the official Ubuntu GA kernel or linux-hwe when reporting bugs.

Revision history for this message
bugproxy (bugproxy) wrote : Comment bridged from LTC Bugzilla

------- Comment From <email address hidden> 2018-02-21 23:42 EDT-------
Hi,

Here are the details of what I tried:

I am using a Ubuntu 16.04 ppc64el machine and I am trying to mount an iscsi disk to the VM from a block storage. I created a volume on the block storage to be mounted with the VM.I was able to connect to the block storage using iscsi, but to discover the volume, I have to run the script "rescan_scsi_bus.sh", and it should be able to identify the volume and mount it on the host, but that is not happening.

The expected output it when I run the script, it should be able to discover that particular volume, but the script runs and never finds it.

I get this output for verison:

root@pcloud-icp2:~# apt-cache policy sg3-utils
sg3-utils:
Installed: 1.40-0ubuntu1
Candidate: 1.40-0ubuntu1
Version table:
*** 1.40-0ubuntu1 500
500 http://us.ports.ubuntu.com/ubuntu-ports xenial/main ppc64el Packages
100 /var/lib/dpkg/status

Let me know if you need any other details.

Revision history for this message
Christian Ehrhardt  (paelzer) wrote :

Hi
in tests we regularly create iscsi targets and mount them so it generally works. Thereby it is important how you exactly setup, create, pass and scan them. Only then can your specific issue be (hopefully) reproduced so that one can e.g. bisect on the changes to bisect on scripts/rescan-scsi-bus.sh

So it would be great to have
1. on Host to set up my iscsi disks I did ...
2. to make them available to the guest I did ...
3.1 then I resacn with ... but it fails like ...
3.2 if I use the script from git it works like ...

For 3.1 and 3.2 it might be useful to track kernel events (dmesg -w) and udev ((sudo udevadm monitor) and providing those as log files for each of the two cases (3.1 and 3.2).

Revision history for this message
Robie Basak (racb) wrote :

> Let me know if you need any other details.

Please provide full steps to reproduce this issue.

Revision history for this message
bugproxy (bugproxy) wrote :

------- Comment From <email address hidden> 2018-02-22 11:02 EDT-------
(In reply to comment #7)
> Hi
> in tests we regularly create iscsi targets and mount them so it generally
> works. Thereby it is important how you exactly setup, create, pass and scan
> them. Only then can your specific issue be (hopefully) reproduced so that
> one can e.g. bisect on the changes to bisect on scripts/rescan-scsi-bus.sh
>
> So it would be great to have
> 1. on Host to set up my iscsi disks I did ...
> 2. to make them available to the guest I did ...
> 3.1 then I resacn with ... but it fails like ...
> 3.2 if I use the script from git it works like ...
>
> For 3.1 and 3.2 it might be useful to track kernel events (dmesg -w) and
> udev ((sudo udevadm monitor) and providing those as log files for each of
> the two cases (3.1 and 3.2).

Sure, I will try these out. I don't have a setup handy as of now, will do the steps again and provide the logs.

------- Comment From <email address hidden> 2018-02-22 11:04 EDT-------
(In reply to comment #8)
> > Let me know if you need any other details.
>
> Please provide full steps to reproduce this issue.

Here are the steps to reproduce:

1. Create a volume on a iscsi target and map it to Ubuntu host.
2. Run rescan_iscsi_bus.sh script to identify that volume mounted on the host in form of the device and add it to multipath devices.
3. See the multipath available in "multipath -ll" output.

The script couldn't identify the new device.

Revision history for this message
Christian Ehrhardt  (paelzer) wrote :

Can't see that on my side still, waiting for the additional logs requested in comment #4 once you found the time for them.

For example [1] creates iscsi targets as well and uses them.
So what exactly is "create a volume" for you - could be the target creation, could be LVM2 on it, could be many other things ... :-/

When you log the data requested (logs), - please - it is be very how EXACTLY you do the
1. Create a volume on a iscsi target and map it to Ubuntu host.
2. ...
So a list of commands and config files you use to do so would be much++ better here.

[1]: https://objectstorage.prodstack4-5.canonical.com/v1/AUTH_77e2ada1e7a84929a74ba3b87153c0ac/autopkgtest-bionic/bionic/ppc64el/t/tgt/20180221_194453_e1ac2@/log.gz

Revision history for this message
Robie Basak (racb) wrote :

> Create a volume on a iscsi target and map it to Ubuntu host.

As Christian says: *how*? What commands did you type? If I don't know exactly what you did, how can I reproduce what you're doing?

Revision history for this message
bugproxy (bugproxy) wrote :

------- Comment From <email address hidden> 2018-03-13 04:53 EDT-------
Further investigation shows that the issue is not with the script but the multipath.conf file, a config issue. We can close this one.

Revision history for this message
Christian Ehrhardt  (paelzer) wrote :

Closing per former comment.

Changed in sg3-utils (Ubuntu):
status: Incomplete → Invalid
Changed in ubuntu-power-systems:
status: Incomplete → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.