RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1272841 - Upgrading rpcbind emit warning: triggerpostun(rpcbind-0.2.0-32.el7.x86_64) scriptlet failed, exit status 1
Summary: Upgrading rpcbind emit warning: triggerpostun(rpcbind-0.2.0-32.el7.x86_64) s...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: rpcbind
Version: 7.2
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: Steve Dickson
QA Contact: Yongcheng Yang
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-10-19 04:51 UTC by Yongcheng Yang
Modified: 2016-10-10 03:53 UTC (History)
7 users (show)

Fixed In Version: rpcbind-0.2.0-33.el7.src.rpm
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-10-10 03:53:59 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Yongcheng Yang 2015-10-19 04:51:32 UTC
Description of problem:
When updating rpcbind to rpcbind-0.2.0-32.el7 on TPS machines, always get warning as following:
warning: %triggerpostun(rpcbind-0.2.0-32.el7.x86_64) scriptlet failed, exit status 1

And the root cause could be that it always return 1 if there is no *.xdr file in /var/lib/rpcbind/
[yyc@dhcp-12-138 ~]$ rpm -qp --triggers rpcbind-0.2.0-32.el7.x86_64.rpm 
triggerun scriptlet (using /bin/sh) -- rpcbind < 0.2.0-15
/usr/bin/systemd-sysv-convert --save rpcbind >/dev/null 2>&1 ||:
/bin/systemctl --no-reload enable rpcbind.service >/dev/null 2>&1
/sbin/chkconfig --del rpcbind >/dev/null 2>&1 || :
/bin/systemctl try-restart rpcbind.service >/dev/null 2>&1 || :
triggerun scriptlet (using /bin/sh) -- rpcbind > 0.2.0-26
/bin/systemctl enable rpcbind.socket >/dev/null 2>&1 || :
triggerpostun scriptlet (using /bin/sh) -- 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
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ will return 1
[ -f /var/lib/rpcbind/portmap.xdr ] && \
	mv /var/lib/rpcbind/portmap.xdr /run/rpcbind
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ will return 1
[yyc@dhcp-12-138 ~]$ 

Version-Release number of selected component (if applicable):
rpcbind-0.2.0-32.el7

How reproducible:
100% with TPS machines

Steps to Reproduce:
1. Empty /var/lib/rpcbind/
2. rpm -Uvh rpcbind-0.2.0-32.el7.x86_64.rpm

Actual results:

.qa.[root@x86-64-7w-v1 tps]# rpm -q rpcbind 
rpcbind-0.2.0-26.el7.x86_64
.qa.[root@x86-64-7w-v1 tps]# ls /var/lib/rpcbind/
.qa.[root@x86-64-7w-v1 tps]# 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%]
warning: %triggerpostun(rpcbind-0.2.0-32.el7.x86_64) scriptlet failed, exit status 1
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^Reproduced
.qa.[root@x86-64-7w-v1 tps]# 

.qa.[root@x86-64-7c-v1 tps]# rpm -q rpcbind
rpcbind-0.2.0-26.el7.x86_64
.qa.[root@x86-64-7c-v1 tps]# ls /var/lib/rpcbind/
.qa.[root@x86-64-7c-v1 tps]# touch /var/lib/rpcbind/rpcbind.xdr
.qa.[root@x86-64-7c-v1 tps]# touch /var/lib/rpcbind/portmap.xdr
.qa.[root@x86-64-7c-v1 tps]# ls /var/lib/rpcbind/
portmap.xdr  rpcbind.xdr
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^workaround to get rip of the warning
.qa.[root@x86-64-7c-v1 tps]# 
.qa.[root@x86-64-7c-v1 tps]# rpm -q rpcbind 
rpcbind-0.2.0-26.el7.x86_64
.qa.[root@x86-64-7c-v1 tps]# 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%]
.qa.[root@x86-64-7c-v1 tps]# echo $?
0
.qa.[root@x86-64-7c-v1 tps]# 

Expected results:
No warning appear

Additional info:
Maybe this is an easy fix as following patch:
[yyc@dhcp-12-138 SPECS]$ diff rpcbind.spec.old rpcbind.spec.new 
160c160
< 	mv /var/lib/rpcbind/rpcbind.xdr /run/rpcbind
---
> 	mv /var/lib/rpcbind/rpcbind.xdr /run/rpcbind || :
162c162
< 	mv /var/lib/rpcbind/portmap.xdr /run/rpcbind
---
> 	mv /var/lib/rpcbind/portmap.xdr /run/rpcbind || :
[yyc@dhcp-12-138 SPECS]$ 

Testing logs:
.qa.[root@x86-64-7w-v1 tps]# ls /var/lib/rpcbind/
.qa.[root@x86-64-7w-v1 tps]# 
.qa.[root@x86-64-7w-v1 tps]# [ -f /var/lib/rpcbind/rpcbind.xdr ] && mv /var/lib/rpcbind/rpcbind.xdr /run/rpcbind
.qa.[root@x86-64-7w-v1 tps]# echo $?
1
.qa.[root@x86-64-7w-v1 tps]# [ -f /var/lib/rpcbind/rpcbind.xdr ] && mv /var/lib/rpcbind/rpcbind.xdr /run/rpcbind || :
.qa.[root@x86-64-7w-v1 tps]# echo $?
0
.qa.[root@x86-64-7w-v1 tps]#

Comment 2 Karel Srot 2015-10-19 06:04:00 UTC
There is another bug in the postun trigger which is not doing restorecon on a newly created /run/rpcbind directory which resulted in faulty request on selinux-policy updated tracked in bug 1265266, see https://bugzilla.redhat.com/show_bug.cgi?id=1265266#c29.

Comment 3 Steve Dickson 2015-10-19 20:54:19 UTC
(In reply to Yongcheng Yang from comment #0)
> Description of problem:
> When updating rpcbind to rpcbind-0.2.0-32.el7 on TPS machines, always get
> warning as following:
> warning: %triggerpostun(rpcbind-0.2.0-32.el7.x86_64) scriptlet failed, exit
> status 1
> 
> And the root cause could be that it always return 1 if there is no *.xdr
> file in /var/lib/rpcbind/
> [yyc@dhcp-12-138 ~]$ rpm -qp --triggers rpcbind-0.2.0-32.el7.x86_64.rpm 
> triggerun scriptlet (using /bin/sh) -- rpcbind < 0.2.0-15
> /usr/bin/systemd-sysv-convert --save rpcbind >/dev/null 2>&1 ||:
> /bin/systemctl --no-reload enable rpcbind.service >/dev/null 2>&1
> /sbin/chkconfig --del rpcbind >/dev/null 2>&1 || :
> /bin/systemctl try-restart rpcbind.service >/dev/null 2>&1 || :
> triggerun scriptlet (using /bin/sh) -- rpcbind > 0.2.0-26
> /bin/systemctl enable rpcbind.socket >/dev/null 2>&1 || :
> triggerpostun scriptlet (using /bin/sh) -- 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
> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ will return 1
> [ -f /var/lib/rpcbind/portmap.xdr ] && \
> 	mv /var/lib/rpcbind/portmap.xdr /run/rpcbind
> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ will return 1
> [yyc@dhcp-12-138 ~]$ 
> 
> Version-Release number of selected component (if applicable):
> rpcbind-0.2.0-32.el7
> 
> How reproducible:
> 100% with TPS machines
> 
> Steps to Reproduce:
> 1. Empty /var/lib/rpcbind/
> 2. rpm -Uvh rpcbind-0.2.0-32.el7.x86_64.rpm
> 
> Actual results:
> 
> .qa.[root@x86-64-7w-v1 tps]# rpm -q rpcbind 
> rpcbind-0.2.0-26.el7.x86_64
> .qa.[root@x86-64-7w-v1 tps]# ls /var/lib/rpcbind/
> .qa.[root@x86-64-7w-v1 tps]# 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%]
> warning: %triggerpostun(rpcbind-0.2.0-32.el7.x86_64) scriptlet failed, exit
> status 1
> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^Reproduced
> .qa.[root@x86-64-7w-v1 tps]# 
> 
> .qa.[root@x86-64-7c-v1 tps]# rpm -q rpcbind
> rpcbind-0.2.0-26.el7.x86_64
> .qa.[root@x86-64-7c-v1 tps]# ls /var/lib/rpcbind/
> .qa.[root@x86-64-7c-v1 tps]# touch /var/lib/rpcbind/rpcbind.xdr
> .qa.[root@x86-64-7c-v1 tps]# touch /var/lib/rpcbind/portmap.xdr
> .qa.[root@x86-64-7c-v1 tps]# ls /var/lib/rpcbind/
> portmap.xdr  rpcbind.xdr
> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^workaround to get rip of the
> warning
> .qa.[root@x86-64-7c-v1 tps]# 
> .qa.[root@x86-64-7c-v1 tps]# rpm -q rpcbind 
> rpcbind-0.2.0-26.el7.x86_64
> .qa.[root@x86-64-7c-v1 tps]# 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%]
> .qa.[root@x86-64-7c-v1 tps]# echo $?
> 0
> .qa.[root@x86-64-7c-v1 tps]# 
> 
> Expected results:
> No warning appear
> 
> Additional info:
> Maybe this is an easy fix as following patch:
> [yyc@dhcp-12-138 SPECS]$ diff rpcbind.spec.old rpcbind.spec.new 
> 160c160
> < 	mv /var/lib/rpcbind/rpcbind.xdr /run/rpcbind
> ---
> > 	mv /var/lib/rpcbind/rpcbind.xdr /run/rpcbind || :
> 162c162
> < 	mv /var/lib/rpcbind/portmap.xdr /run/rpcbind
> ---
> > 	mv /var/lib/rpcbind/portmap.xdr /run/rpcbind || :
> [yyc@dhcp-12-138 SPECS]$ 
> 
> Testing logs:
> .qa.[root@x86-64-7w-v1 tps]# ls /var/lib/rpcbind/
> .qa.[root@x86-64-7w-v1 tps]# 
> .qa.[root@x86-64-7w-v1 tps]# [ -f /var/lib/rpcbind/rpcbind.xdr ] && mv
> /var/lib/rpcbind/rpcbind.xdr /run/rpcbind
> .qa.[root@x86-64-7w-v1 tps]# echo $?
> 1
Why is it returning 1? 

Is there any error message?

Comment 4 Yongcheng Yang 2015-10-20 07:25:40 UTC
(In reply to Steve Dickson from comment #3)
> (In reply to Yongcheng Yang from comment #0)
> > .qa.[root@x86-64-7w-v1 tps]# [ -f /var/lib/rpcbind/rpcbind.xdr ] && mv
> > /var/lib/rpcbind/rpcbind.xdr /run/rpcbind
> > .qa.[root@x86-64-7w-v1 tps]# echo $?
> > 1
> Why is it returning 1? 
> 
> Is there any error message?

[ -f /var/lib/rpcbind/rpcbind.xdr ] && mv /var/lib/rpcbind/rpcbind.xdr /run/rpcbind
- if "/var/lib/rpcbind/rpcbind.xdr" exists, execute the mv command;
- if there is no rpcbind.xdr exists, will not mv and return 1

[root@ibm-x3250m4-07 ~]# [ -f no_exists ] && echo "exists"
[root@ibm-x3250m4-07 ~]# echo $?
1
[root@ibm-x3250m4-07 ~]# [ -f no_exists ] && echo "exists" || :
[root@ibm-x3250m4-07 ~]# echo $?
0
[root@ibm-x3250m4-07 ~]#

Comment 5 Steve Dickson 2015-10-20 14:47:31 UTC
(In reply to Yongcheng Yang from comment #4)
> (In reply to Steve Dickson from comment #3)
> > (In reply to Yongcheng Yang from comment #0)
> > > .qa.[root@x86-64-7w-v1 tps]# [ -f /var/lib/rpcbind/rpcbind.xdr ] && mv
> > > /var/lib/rpcbind/rpcbind.xdr /run/rpcbind
> > > .qa.[root@x86-64-7w-v1 tps]# echo $?
> > > 1
> > Why is it returning 1? 
> > 
> > Is there any error message?
> 
> [ -f /var/lib/rpcbind/rpcbind.xdr ] && mv /var/lib/rpcbind/rpcbind.xdr
> /run/rpcbind
> - if "/var/lib/rpcbind/rpcbind.xdr" exists, execute the mv command;
> - if there is no rpcbind.xdr exists, will not mv and return 1
> 
> [root@ibm-x3250m4-07 ~]# [ -f no_exists ] && echo "exists"
> [root@ibm-x3250m4-07 ~]# echo $?
> 1
> [root@ibm-x3250m4-07 ~]# [ -f no_exists ] && echo "exists" || :
> [root@ibm-x3250m4-07 ~]# echo $?
> 0
Ok... I see...

Is is there time to make it into 7.2? Tom?

Comment 11 Yongcheng Yang 2016-10-10 03:53:59 UTC
This issue has been fixed in rpcbind-0.2.0-33.el7


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