Bug 695374 - matchpathcon failed: No such file or directory
Summary: matchpathcon failed: No such file or directory
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: device-mapper
Version: 5.7
Hardware: All
OS: Linux
high
high
Target Milestone: rc
: ---
Assignee: Milan Broz
QA Contact: Corey Marthaler
URL:
Whiteboard:
Depends On:
Blocks: rhel57rtt
TreeView+ depends on / blocked
 
Reported: 2011-04-11 14:12 UTC by Martin Banas
Modified: 2013-03-01 04:10 UTC (History)
14 users (show)

Fixed In Version: device-mapper-1.02.63-4.el5
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2011-07-21 06:46:24 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2011:0981 0 normal SHIPPED_LIVE device-mapper bug fix and enhancement update 2011-07-20 15:45:12 UTC

Comment 1 Martin Banas 2011-04-11 14:17:16 UTC
Description of problem:
Error in install.log while installing default package set:
Installing kernel-2.6.18-256.el5.ppc64
  matchpathcon failed: No such file or directory

Version-Release number of selected component (if applicable):
RHEL5.7-Server-20110409.3
kernel-2.6.18-256.el5.ppc64

How reproducible:
always

Steps to Reproduce:
1. Start RHEL5.7 installation on PPC
2. Proceed to stage2, finish the installation, leave all options default
3. Reboot the system, check /root/install.log

Actual results:
Installing kernel-2.6.18-256.el5.ppc64
  matchpathcon failed: No such file or directory

Expected results:
No errors while installing packages

Comment 3 Jan Stodola 2011-04-14 08:36:02 UTC
Also reproduced on s390x:
...
Installing rhn-setup-0.4.20-53.el5.noarch
Installing kernel-2.6.18-256.el5.s390x
  matchpathcon failed: No such file or directory
Installing 2:xinetd-2.3.14-10.el5.s390x
...

Comment 4 Martin Banas 2011-05-23 07:23:28 UTC
Hello,
Is anybody working on this? There has been no progress for a month...

Comment 6 Linda Wang 2011-05-31 21:50:00 UTC
jan, do you see the same warning message coming from
installing/upgrading only the kernel package?

Comment 7 Jan Stodola 2011-06-01 07:44:57 UTC
So far I have only seen the message when installing the kernel package.
Retested on build RHEL5.7-Server-20110525.0 with kernel-2.6.18-264.el5 and the issue didn't happen on s390x (installed both default and everything package set), but still reproducible on ppc with default package set

Comment 8 Jan Stodola 2011-06-01 08:28:05 UTC
It seems to be a package-dependency problem and selinux-policy-targeted should be installed before the kernel package:

from install.log:
...
Installing selinux-policy-2.4.6-306.el5.noarch
Installing kernel-2.6.18-264.el5.ppc64
  matchpathcon failed: No such file or directory
Installing java-1.4.2-gcj-compat-1.4.2.0-40jpp.115.ppc
...
Installing selinux-policy-targeted-2.4.6-306.el5.noarch
...


Trying to reproduce on installed system:
[root@ibm-js22-vios-02-lp1 ~]# rpm -i kernel-2.6.18-265.el5.ppc64.rpm 
[root@ibm-js22-vios-02-lp1 ~]# rpm -e kernel-2.6.18-265.el5
[root@ibm-js22-vios-02-lp1 ~]# rpm -e selinux-policy-targeted
[root@ibm-js22-vios-02-lp1 ~]# rpm -i kernel-2.6.18-265.el5.ppc64.rpm 
  matchpathcon failed: No such file or directory
[root@ibm-js22-vios-02-lp1 ~]#

Comment 9 Tomas Kopecek 2011-06-03 10:42:35 UTC
lvm (used in mkinitrd) throws this warning for every command, when selinux-policy-targeted is not installed. Maybe it should detect if selinux is in use?

# rpm -e selinux-policy-targeted
# lvm help
  matchpathcon failed: není souborem ani adresářem
  Available lvm commands:
  Use 'lvm help <command>' for more information

Comment 10 Milan Broz 2011-06-03 10:53:16 UTC
# rpm -e selinux-policy-targeted

Is this supported for RHEL?

Comment 11 Milan Broz 2011-06-03 11:04:58 UTC
I think it should not be allowed to remove policy files for active policy in the first place.

Comment 14 Daniel Walsh 2011-06-03 15:46:58 UTC
Seems like more of an lvm bug the an selinux one.

Comment 15 Milan Broz 2011-06-06 11:25:30 UTC
Please see comment #10 and #11. How is handled situation when policy files are removed / not installed yet? Should not selinux policy prevent it somehow?

Comment 16 Alasdair Kergon 2011-06-06 12:49:58 UTC
In other words, lvm2 just happens to be the example used to demonstrate the problem, but other rpms have the same problem.  The current workaround in lvm2 is just to hide the error message!

The actual problem here - we think - is that there are extra dependencies that rpm does not know: the rpm for the currently-active selinux policy can be removed while the policy is in use, and then anything that calls matchpatchcon after that fails.  And the inverse - rpm is installing the lvm package before the selinux policy package.

So even though matchpathcon is available, it doesn't work because it depends on a policy package that is not present => a missing dependency?

Comment 17 Alasdair Kergon 2011-06-06 12:52:59 UTC
(In reply to comment #12)
> (Upstream lvm has this error moved to debug level so it is not visible in
> default log level

Which should be seen just as a temporary workaround until the underlying problem can be addressed: might it not then leave you with a mis-labelled file or is there guaranteed to be a system-wide relabelling afterwards to fix it?

Comment 21 Milan Broz 2011-06-10 17:28:15 UTC
Fixed in device-mapper-1.02.63-4.el5.

Comment 24 errata-xmlrpc 2011-07-21 06:46:24 UTC
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHBA-2011-0981.html


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