lsvpd: Missing package dependency

Bug #1537116 reported by bugproxy
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
lsvpd (Ubuntu)
Fix Released
Undecided
Steve Langasek
Trusty
Won't Fix
Undecided
Steve Langasek

Bug Description

---Problem Description---
lsvpd uses iprconfig to get enclosure and disk related VPD information.
Hence we need iprconfig (iprutils package) during runtime.
Hence add iprutils as package dependency for lsvpd.

Machine Type = All Power System

---Steps to Reproduce---
  - Install lsvpd and run vpdupdate

---uname output---
Ubuntu 16.04

Userspace tool common name: lsvpd

Patch :
-------
diff -Naurp debian/control.org debian/control
--- debian/control.org 2016-01-21 05:56:46.030490432 -0600
+++ debian/control 2016-01-21 05:57:01.094491365 -0600
@@ -9,7 +9,7 @@ Homepage: http://sourceforge.net/project

 Package: lsvpd
 Architecture: powerpc ppc64 ppc64el
-Depends: ${shlibs:Depends}, ${misc:Depends}
+Depends: ${shlibs:Depends}, ${misc:Depends}, iprutils
 Description: Utility to List Device Vital Product Data (VPD)
  This utility lists device Vital Product Data (VPD), which includes the
  following information and more: vendor, version, revision level, serial

Note that we have this issue in 14.04.04 as well. Please apply this patch to both 16.04 and 14.04.04.

-Vasant

bugproxy (bugproxy)
tags: added: architecture-ppc64le bugnameltc-135877 severity-high targetmilestone-inin1604
Changed in ubuntu:
assignee: nobody → Taco Screen team (taco-screen-team)
Luciano Chavez (lnx1138)
affects: ubuntu → lsvpd (Ubuntu)
Steve Langasek (vorlon)
Changed in lsvpd (Ubuntu):
assignee: Taco Screen team (taco-screen-team) → Steve Langasek (vorlon)
status: New → In Progress
Changed in lsvpd (Ubuntu Trusty):
assignee: nobody → Steve Langasek (vorlon)
status: New → In Progress
Revision history for this message
Steve Langasek (vorlon) wrote :
Download full text (4.5 KiB)

So I uploaded lsvpd to the xenial archive with this change; but then after testing, I see that it merely trades one set of errors for another.

 - iprconfig is not shipped as /usr/sbin/iprconfig in Ubuntu, but as /sbin/iprconfig; so adding the dependency does not remove the error.
 - adjusting paths so that vpdupdate can find iprconfig results in a new stream of other error messages when invoking vpdupdate:
iprconfig[91936]: Could not open /dev/sg28. No such file or directory
iprconfig[91936]: Could not open /dev/sg28. No such file or directory
iprconfig[91936]: Could not open /dev/sg28. No such file or directory
iprconfig[91936]: Could not open /dev/sg28. No such file or directory
iprconfig[91936]: Could not open /dev/sg28. No such file or directory
iprconfig[91936]: Could not open /dev/sg25. No such file or directory
iprconfig[91936]: Could not open /dev/sg25. No such file or directory
iprconfig[91936]: Could not open /dev/sg25. No such file or directory
iprconfig[91936]: Could not open /dev/sg25. No such file or directory
iprconfig[91936]: Could not open /dev/sg25. No such file or directory
iprconfig[91936]: Could not open /dev/sg25. No such file or directory
iprconfig[91936]: Could not open /dev/sg30. No such file or directory
iprconfig[91936]: Could not open /dev/sg30. No such file or directory
iprconfig[91936]: Could not open /dev/sg30. No such file or directory
iprconfig[91936]: Could not open /dev/sg30. No such file or directory
iprconfig[91936]: Could not open /dev/sg30. No such file or directory
iprconfig[91936]: Could not open /dev/sg30. No such file or directory

(etc)

- after running vpdupdate with fixed paths, the output of 'lsvpd' is almost precisely identical from before. Only two lines of diference in the output, and it appears that the new output contains less information rather than more?

@@ -422,7 +422,7 @@
 *XB 3
 *XT 0
 *XL 0
-*YL U78CB.001.WZS008E-P1-C14-B3-T0-L0
+*YL U78CB.001.WZS008E-P1-C14
 *FC
 *DS -SCSI Enclosure Services Device
 *AX sg27
@@ -970,7 +970,7 @@
 *XB 3
 *XT 0
 *XL 0
-*YL U78CB.001.WZS008E-P1-C15-B3-T0-L0
+*YL U78CB.001.WZS008E-P1-C15
 *FC
 *DS -SCSI Disk Drive
 *AX sg39

Perhaps because this particular system doesn't support ipr scsi? Or perhaps, it's because if iprutils aren't installed, one can assume that ipr scsi isn't configured and therefore iprconfig is not going to provide any additional information...

So I'm not sure that the dependency on iprutils is actually required. But I am reasonably certain that vpdupdate should be fixed to suppress error output from iprconfig instead of displaying it.

Please consider whether making this change to lsvpd upstream is a better fix.

For reference, here is the output of 'iprconfig -c show-config 2>/dev/null' on the system where I tested:
Name PCI/SCSI Location Description Status
------ ------------------------- ------------------------- -----------------
       0001:08:00.0/0: PCI-E SCSI Adapter Not Operational
sda 0001:08:00.0/0:2:0:0 Unavailable Device Unknown
sdb 0001:08:00.0/0:2:1:0 Unavailable Device Unkn...

Read more...

Changed in lsvpd (Ubuntu):
status: In Progress → Incomplete
Changed in lsvpd (Ubuntu Trusty):
status: In Progress → Incomplete
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package lsvpd - 1.7.6-0ubuntu2

---------------
lsvpd (1.7.6-0ubuntu2) xenial; urgency=medium

  * Add dependency on iprutils, since iprconfig is needed. LP: #1537116.

 -- Steve Langasek <email address hidden> Fri, 22 Jan 2016 11:25:32 -0800

Changed in lsvpd (Ubuntu):
status: Incomplete → Fix Released
Steve Langasek (vorlon)
Changed in lsvpd (Ubuntu):
status: Fix Released → Incomplete
Revision history for this message
bugproxy (bugproxy) wrote : Comment bridged from LTC Bugzilla
Download full text (4.1 KiB)

------- Comment From <email address hidden> 2016-01-28 10:58 EDT-------
(In reply to comment #5)
> So I uploaded lsvpd to the xenial archive with this change; but then after
> testing, I see that it merely trades one set of errors for another.
>
> - iprconfig is not shipped as /usr/sbin/iprconfig in Ubuntu, but as
> /sbin/iprconfig; so adding the dependency does not remove the error.

Hmmm. This is one of the challenge we constantly face with distros. I should have verified this :-(

Can you tell me the criteria to place commands to /sbin and /usr/sbin ? Because I see Ubuntu placed few commands under /sbin/ and few under /usr/sbin

ubuntu@lep8d:$ which vpdupdate
/usr/sbin/vpdupdate
ubuntu@lep8d:/home/hegdevasant$ which iprconfig
/sbin/iprconfig

Also can you please fix this in Ubuntu tree -OR- do you want us to fix it in upstream before you fix?

> - adjusting paths so that vpdupdate can find iprconfig results in a new
> stream of other error messages when invoking vpdupdate:
> iprconfig[91936]: Could not open /dev/sg28. No such file or directory
> iprconfig[91936]: Could not open /dev/sg28. No such file or directory
> iprconfig[91936]: Could not open /dev/sg28. No such file or directory
> iprconfig[91936]: Could not open /dev/sg28. No such file or directory
> iprconfig[91936]: Could not open /dev/sg28. No such file or directory
> iprconfig[91936]: Could not open /dev/sg25. No such file or directory
> iprconfig[91936]: Could not open /dev/sg25. No such file or directory
> iprconfig[91936]: Could not open /dev/sg25. No such file or directory
> iprconfig[91936]: Could not open /dev/sg25. No such file or directory
> iprconfig[91936]: Could not open /dev/sg25. No such file or directory
> iprconfig[91936]: Could not open /dev/sg25. No such file or directory
> iprconfig[91936]: Could not open /dev/sg30. No such file or directory
> iprconfig[91936]: Could not open /dev/sg30. No such file or directory
> iprconfig[91936]: Could not open /dev/sg30. No such file or directory
> iprconfig[91936]: Could not open /dev/sg30. No such file or directory
> iprconfig[91936]: Could not open /dev/sg30. No such file or directory
> iprconfig[91936]: Could not open /dev/sg30. No such file or directory
>
> (etc)
>
> - after running vpdupdate with fixed paths, the output of 'lsvpd' is almost
> precisely identical from before. Only two lines of diference in the output,
> and it appears that the new output contains less information rather than
> more?

Below output is expected.. Basically we use sg utility to get VPD information for disks/enclosures. Then we run iprconfig to fill missing information (if any) and update location code information.

>
> @@ -422,7 +422,7 @@
> *XB 3
> *XT 0
> *XL 0
> -*YL U78CB.001.WZS008E-P1-C14-B3-T0-L0
> +*YL U78CB.001.WZS008E-P1-C14
> *FC
> *DS -SCSI Enclosure Services Device
> *AX sg27
> @@ -970,7 +970,7 @@
> *XB 3
> *XT 0
> *XL 0
> -*YL U78CB.001.WZS008E-P1-C15-B3-T0-L0
> +*YL U78CB.001.WZS008E-P1-C15
> *FC
> *DS -SCSI Disk Drive
> *AX sg39
>
> Perhaps because this particular system doesn't support ipr scsi? Or
> perhaps, it's because if iprutils aren't installed, one can assume that ipr
> scsi isn't configured and therefore iprconfig ...

Read more...

Revision history for this message
Steve Langasek (vorlon) wrote : Re: [Bug 1537116] Comment bridged from LTC Bugzilla

On Thu, Jan 28, 2016 at 03:59:50PM -0000, bugproxy wrote:
> > - iprconfig is not shipped as /usr/sbin/iprconfig in Ubuntu, but as
> > /sbin/iprconfig; so adding the dependency does not remove the error.

> Hmmm. This is one of the challenge we constantly face with distros. I
> should have verified this :-(

> Can you tell me the criteria to place commands to /sbin and /usr/sbin ?
> Because I see Ubuntu placed few commands under /sbin/ and few under
> /usr/sbin

The command placement *should* conform to the FHS requirement, that /sbin is
for tools that may be needed in order to mount /usr, and /usr/sbin is for
everything else. In practice this line is not enforced clearly, and /usr as
a separate partition may require an initramfs to mount it. I don't know the
specific reason that iprconfig is placed in /sbin, but I would say that
vpdupdate should invoke iprconfig using the default system search path,
instead of hard coding a specific path to the command.

This probably doesn't affect Fedora and recent Red Hat either way, because
they have merged /usr and / so that /sbin and /usr/sbin are symlinked to
each other.

> Also can you please fix this in Ubuntu tree -OR- do you want us to fix
> it in upstream before you fix?

We would prefer to have an agreed upstream fix first that we can then pull
into Ubuntu.

> ------- Comment From <email address hidden> 2016-01-28 10:59 EDT-------
> (In reply to comment #6)
> > This bug was fixed in the package lsvpd - 1.7.6-0ubuntu2

> > ---------------
> > lsvpd (1.7.6-0ubuntu2) xenial; urgency=medium

> > * Add dependency on iprutils, since iprconfig is needed. LP: #1537116.

> Thanks!

> Did you fix iprconfig path as well?

No, this only added the dependency.

--
Steve Langasek Give me a lever long enough and a Free OS
Debian Developer to set it on, and I can move the world.
Ubuntu Developer http://www.debian.org/
<email address hidden> <email address hidden>

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

------- Comment From <email address hidden> 2016-01-29 01:43 EDT-------
Steve,

>
> The command placement *should* conform to the FHS requirement, that /sbin is
> for tools that may be needed in order to mount /usr, and /usr/sbin is for
> everything else. In practice this line is not enforced clearly, and /usr as
> a separate partition may require an initramfs to mount it. I don't know the
> specific reason that iprconfig is placed in /sbin, but I would say that
> vpdupdate should invoke iprconfig using the default system search path,
> instead of hard coding a specific path to the command.

Thanks for the clarification.

>
> This probably doesn't affect Fedora and recent Red Hat either way, because
> they have merged /usr and / so that /sbin and /usr/sbin are symlinked to
> each other.

Yes. They have merged both .

>
> > Also can you please fix this in Ubuntu tree -OR- do you want us to fix
> > it in upstream before you fix?
>
> We would prefer to have an agreed upstream fix first that we can then pull
> into Ubuntu.

Sure. We will fix it in upstream and raise separate defect for that.

>
> > (In reply to comment #6)
> > > This bug was fixed in the package lsvpd - 1.7.6-0ubuntu2
>
> > > ---------------
> > > lsvpd (1.7.6-0ubuntu2) xenial; urgency=medium
>
> > > * Add dependency on iprutils, since iprconfig is needed. LP: #1537116.
>
> > Thanks!
>
> > Did you fix iprconfig path as well?
>
> No, this only added the dependency.

Thanks. Since the original issue reported here is fixed, we can close this bug.

-Vasant

Revision history for this message
Steve Langasek (vorlon) wrote :

The complete fix for Ubuntu 17.04 and later has been handled via LP: #1666412.

Changed in lsvpd (Ubuntu):
status: Incomplete → Fix Released
Changed in lsvpd (Ubuntu Trusty):
status: Incomplete → Won't Fix
Revision history for this message
Steve Langasek (vorlon) wrote :

except the dependency was dropped and has not yet been re-added (LP: #1417608), so keeping this open until that is done.

Changed in lsvpd (Ubuntu):
status: Fix Released → Triaged
Steve Langasek (vorlon)
Changed in lsvpd (Ubuntu):
status: Triaged → Fix Committed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package lsvpd - 1.7.8-0ubuntu1

---------------
lsvpd (1.7.8-0ubuntu1) artful; urgency=medium

  * New upstream version.

 -- Matthias Klose <email address hidden> Mon, 21 Aug 2017 17:02:20 +0200

Changed in lsvpd (Ubuntu):
status: Fix Committed → Fix Released
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.