Bug 1386084

Summary: Systemctl restart customservice in Post installation scripts are not successful
Product: Red Hat Enterprise Linux 7 Reporter: Veerabhadra <veeru.mallavarapu>
Component: yumAssignee: Packaging Maintenance Team <packaging-team-maint>
Status: CLOSED NOTABUG QA Contact: BaseOS QE Security Team <qe-baseos-security>
Severity: urgent Docs Contact:
Priority: unspecified    
Version: 7.4CC: dmach, james.antill, veeru.mallavarapu
Target Milestone: rc   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-09-24 12:34:05 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:
Attachments:
Description Flags
service file none

Description Veerabhadra 2016-10-18 05:47:52 UTC
Description of problem:
I am Using CentOS-7.2.1511 version and installing one of my custom software as an rpm bundle. Everything went fine. No  Issue.  The RPM bundle as post installation scripts which restarts my custom service.  During the upgrade of my software I am seeing an issue with my post installation scripts.  It actually restarting my service , however throwing a message as mentioned below. It is the verbose of my rpm --install command.

D: %post(videonet-edge-centos-8.0.107-1.noarch): scriptlet start
D: %post(videonet-edge-centos-8.0.107-1.noarch): execv(/bin/sh) pid 8031

+ set -e
+ echo 'System restarting'
+ sudo /usr/bin/systemctl restart vne

D: %post(videonet-edge-centos-8.0.107-1.noarch): waitpid(8031) rc 8031 status f

warning: %post(qumu-videonet-edge-centos-8.0.107-1.noarch) scriptlet failed, signal 15


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

CentOS-7.2.1511 

How reproducible:


Steps to Reproduce:
1. Install custom rpm package first (say custompackage.rpm)
2. make sure custompackage.rpm has post installation script which restrats custom service
3. upgrade the previously installed software in the CentOS machine with custompackage.rpm 


Actual results:

The post installation scripts is terminated with status f.  However the service is getting restarted.

Expected results:

The post installation script should be executed without any issues and should not throw any warnings or errors

Additional info:

Comment 2 Karel Srot 2016-11-02 07:28:33 UTC
This is a problem of your postinstall scriptlet, it should not be failing at the first place (Why do you use sudo when the package update is done by root?) and the service restart is being done by systemd. yum is only executing the respective commands and reporting the resulting exit code. 

IMHO this is not a bug and should be closed.

Comment 3 Veerabhadra 2016-11-02 09:26:12 UTC
Hi Karel

Thanks for your response.

I have tried without sudo also as a first step, however it was failing. So tried this approach.

Really not sure why it is complaining.  In the process of restarting, I am trying to stop my java service. What I found is that it is giving status code as 143, so I have handled it as successexitcode, but still no use.  My further steps in the scripts are not being executed.

I am attaching my service file here.



Regards
Veeru

Comment 4 Veerabhadra 2016-11-02 09:33:41 UTC
Created attachment 1216426 [details]
service file

Please find my service attached here.

Comment 5 Veerabhadra 2016-11-04 05:33:18 UTC
Hi All,

Did you get a chance to check my comments? Your early response is very much appreciated.

Comment 6 Veerabhadra 2016-11-08 08:09:27 UTC
Hi All,

Did you get a chance to check my comments? Your early response is very much appreciated.

Comment 7 Daniel Mach 2018-09-24 12:34:05 UTC
This is not a bug in yum.
This is a problem with package scriptlet that should be fixed in the spec file or somewhere else in the package.