Bug 1268139

Summary: Upgrading rpcbind from RHEL 7.1 to 7.2 gives scriptlet warning: chown: cannot access ‘/run/rpcbind’: No such file or directory
Product: Red Hat Enterprise Linux 7 Reporter: Richard W.M. Jones <rjones>
Component: rpcbindAssignee: Steve Dickson <steved>
Status: CLOSED ERRATA QA Contact: Yongcheng Yang <yoyang>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 7.3CC: eguan, fs-qe, rcain, rjones, tlavigne
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: rpcbind-0.2.0-32.el7 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-11-19 05:32:51 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Richard W.M. Jones 2015-10-01 22:10:47 UTC
Description of problem:

When updating from rpcbind-0.2.0-26.el7.x86_64 (RHEL 7.1) to
rpcbind-0.2.0-31.el7.x86_64 (RHEL 7.2) I get this scriptlet
warning

...
  Cleanup    : rpcbind-0.2.0-26.el7.x86_64                              432/704 
/var/tmp/rpm-tmp.pWE4Ad: line 1: [: missing `]'
chown: cannot access ‘/run/rpcbind’: No such file or directory
warning: %triggerpostun(rpcbind-0.2.0-31.el7.x86_64) scriptlet failed, exit status 1
Non-fatal <unknown> scriptlet failure in rpm package rpcbind-0.2.0-26.el7.x86_64
...

Version-Release number of selected component (if applicable):

rpcbind-0.2.0-31.el7.x86_64

How reproducible:

Unknown, but at least once.

Steps to Reproduce:
1. Install RHEL 7.1.
2. Upgrade to RHEL 7.2.

Comment 2 Steve Dickson 2015-10-02 01:03:13 UTC
This is the tigger 

%triggerpostun -- rpcbind < 0.2.0-29
[ ! -d /run/rpcbind ] mkdir /run/rpcbind
chown rpc:rpc /run/rpcbind
[ -f /var/lib/rpcbind/rpcbind.xdr ] && \
    mv /var/lib/rpcbind/rpcbind.xdr /run/rpcbind
[ -f /var/lib/rpcbind/portmap.xdr ] && \
    mv /var/lib/rpcbind/portmap.xdr /run/rpcbind

Maybe it is an SELinux thing? Was there anything in
/var/log/messages?

Comment 3 Richard W.M. Jones 2015-10-02 07:45:50 UTC
Doesn't seem to be anything in /var/log/messages nor in the
audit logs.  However my search is a bit inconclusive so I will
attach both.

The upgrade happened between 23:00 and 23:10 local time.

Comment 4 Richard W.M. Jones 2015-10-02 07:46:15 UTC
Created attachment 1079377 [details]
/var/log/messages

Comment 5 Richard W.M. Jones 2015-10-02 07:46:44 UTC
Created attachment 1079378 [details]
ausearch -ts yesterday -m avc

Comment 6 Richard W.M. Jones 2015-10-02 07:49:13 UTC
Actually I think the problem is in this line:

  [ ! -d /run/rpcbind ] mkdir /run/rpcbind

Are you missing '&&' in there?

Comment 7 Steve Dickson 2015-10-02 11:26:01 UTC
(In reply to Richard W.M. Jones from comment #6)
> Actually I think the problem is in this line:
> 
>   [ ! -d /run/rpcbind ] mkdir /run/rpcbind
> 
> Are you missing '&&' in there?

Good catch... lets see if we can get some acks...

Comment 10 Steve Dickson 2015-10-02 19:05:46 UTC
Richard,

Nice work... Thank you!!!

Comment 11 Yongcheng Yang 2015-10-12 00:36:21 UTC
Verified with rpcbind-0.2.0-32.el7
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[root@ibm-x3250m4-05 ~]# rpm -q rpcbind
rpcbind-0.2.0-26.el7.x86_64
[root@ibm-x3250m4-05 ~]# rm -rf /run/rpcbind
[root@ibm-x3250m4-05 ~]# rpm -Uvh rpcbind-0.2.0-32.el7.x86_64.rpm 
Preparing...                          ################################# [100%]
Updating / installing...
   1:rpcbind-0.2.0-32.el7             ################################# [ 50%]
Cleaning up / removing...
   2:rpcbind-0.2.0-26.el7             ################################# [100%]
[root@ibm-x3250m4-05 ~]# ls /run/rpcbind*
/run/rpcbind.lock  /run/rpcbind.sock  /run/rpcbind.xdr

/run/rpcbind:
portmap.xdr  rpcbind.xdr
[root@ibm-x3250m4-05 ~]# 

And reproduced with previous version rpcbind-0.2.0-31.el7
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[root@ibm-x3250m4-05 ~]# rpm -q rpcbind
rpcbind-0.2.0-26.el7.x86_64
[root@ibm-x3250m4-05 ~]# rm -rf /run/rpcbind
[root@ibm-x3250m4-05 ~]# rpm -Uvh rpcbind-0.2.0-31.el7.x86_64.rpm 
Preparing...                          ################################# [100%]
Updating / installing...
   1:rpcbind-0.2.0-31.el7             ################################# [ 50%]
Cleaning up / removing...
   2:rpcbind-0.2.0-26.el7             ################################# [100%]
/var/tmp/rpm-tmp.t0rfEz: line 1: [: missing `]'
chown: cannot access ‘/run/rpcbind’: No such file or directory
[root@ibm-x3250m4-05 ~]#

Move to VERIFIED

Comment 13 errata-xmlrpc 2015-11-19 05:32:51 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://rhn.redhat.com/errata/RHBA-2015-2205.html