Actions
Bug #25739
closedkatello-rhsm-consumer can fail, breaking the isntallation of katello-ca-consumer.rpm
Difficulty:
Triaged:
Yes
Pull request:
Description
I have a host (well, container), where hostname -f
returns an error:
[root@a8cc0652a1a1 ~]# hostname a8cc0652a1a1 [root@a8cc0652a1a1 ~]# hostname -f hostname.orig: Unknown host [root@a8cc0652a1a1 ~]# echo $? 1
This results in katello-rhsm-consumer
failing when executed:
[root@a8cc0652a1a1 ~]# /usr/bin/katello-rhsm-consumer hostname: Unknown host [root@a8cc0652a1a1 ~]# echo $? 1
Which in turn makes %post
of katello-ca-consumer.rpm
fail:
# rpm -Uvh http://katello.example.com/pub/katello-ca-consumer-latest.noarch.rpm Retrieving http://katello.example.com/pub/katello-ca-consumer-latest.noarch.rpm Preparing... ################################################## katello-ca-consumer-katello.################################################## hostname: Unknown host error: %post(katello-ca-consumer-katello.example.com-1.0-3.noarch) scriptlet failed, exit status 1
The problem here is that katello-rhsm-consumer
is executed with set -e
(which is good in general!), which makes it fail on the first subprocess fail instead of allowing us to handle the failure ourself.
Actions