You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ambari.apache.org by "Henning Kropp (JIRA)" <ji...@apache.org> on 2016/09/27 10:24:20 UTC
[jira] [Commented] (AMBARI-14526) CentOS 7.2/RHEL 7.2 ambari-server
systemd script is broken
[ https://issues.apache.org/jira/browse/AMBARI-14526?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15525699#comment-15525699 ]
Henning Kropp commented on AMBARI-14526:
----------------------------------------
Seems that AMBARI-15090 breaks this for RHEL 7.2. With AMBARI-15090 it is possible to set a custom {{$ROOT}} for Amabri scripts. The {{$ROOT}} folder is determined by going 2 folders up. So if the current script is under {{/etc/init.d}} {{$ROOT}} becomes /.
Now with RHEL 7.2 the script is stored under {{/etc/rc.d/init.d}} which makes the {{$ROOT}} folder {{/etc}}. This results in python-wrapper not being located and fails with the error message {{"Need python version > 2.6"}}.
The attached patch fixes this by testing if {{$ROOT/usr/lib/ambari-server}} exists, if not it goes up one more directory. For better error handling if {{$ROOT/usr/lib/ambari-server}} still does not exist after going up one more dir, it fails with the message: {{"Can't locate Ambari lib folder under: $ROOT/usr/lib/ambari-server"}}
> CentOS 7.2/RHEL 7.2 ambari-server systemd script is broken
> ----------------------------------------------------------
>
> Key: AMBARI-14526
> URL: https://issues.apache.org/jira/browse/AMBARI-14526
> Project: Ambari
> Issue Type: Bug
> Components: ambari-server
> Affects Versions: 2.1.1
> Reporter: Greg Hill
>
> systemd was updated in RHEL 7.2 and thus also in CentOS 7.2. This update breaks compatibility with how ambari-server starts up. There is a simple fix, just create the file /usr/lib/systemd/system/ambari-server.service with these contents:
> {noformat}
> [Unit]
> Description=ambari-server service
> After=xe-linux-distribution.service
> [Service]
> Type=forking
> ExecStart=/usr/sbin/ambari-server start
> ExecStop=/usr/sbin/ambari-server stop
> [Install]
> WantedBy=multi-user.target
> {noformat}
> There's probably a better way to work with systemd in a more systemd-ish way, but this restores compatibility for now with minimal effort. We should update the RPM to install this file if the system is managed by systemd.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)