Dmytro Grinenko created AMBARI-22766:
----------------------------------------

             Summary: ambari-server setup with internal database may not work 
on centos 7
                 Key: AMBARI-22766
                 URL: https://issues.apache.org/jira/browse/AMBARI-22766
             Project: Ambari
          Issue Type: Bug
          Components: ambari-server
    Affects Versions: trunk
            Reporter: Dmytro Grinenko
            Assignee: Dmytro Grinenko
            Priority: Critical
             Fix For: trunk


it may happened so, that centos7 image will not have "service" command at all.

{code}
Default properties detected. Using built-in database.
INFO: Loading properties from /etc/ambari-server/conf/ambari.properties
INFO: Adjusting filesystem permissions
INFO: Loading properties from /etc/ambari-server/conf/ambari.properties
Configuring ambari database...
Checking PostgreSQL...
INFO: about to run command: /usr/bin/env service postgresql status
Running initdb: This may take up to a minute.
INFO: about to run command: /usr/bin/postgresql-setup initdb
About to start PostgreSQL
INFO: about to run command: /usr/bin/env service postgresql status
ERROR: Exiting with exit code 127.
REASON: Unable to start PostgreSQL server. Exiting
[root@node-test0 /]# service postgresql status
bash: service: command not found
[root@node-test0 /]# service postgresql status
bash: service: command not found
[root@node-test0 /]# service postgresql status
bash: service: command not found
[root@node-test0 /]# service postgresql status
bash: service: command not found
[root@node-test0 /]# service postgresql status
bash: service: command not found
{code}

*Background:*

This caused due to centos 7 using systemd by default and switched to use of 
{{systemctl}} command instead of {{service}}. Since that, service command exist 
only in backward compatibility context and r optional. Currently optional 
package, which provides this package called {{initscripts}}

Currently, everything ok r with standalone centos 7 image and it includes this 
package installed by default. However docker image centos/centos:7 doesn't 
provide this package by default, and systemd enabled image 
centos/systemd:latest use {{systemctl}} without installed {{initscripts}}: 
https://github.com/CentOS/sig-cloud-instance-images/issues/28

*Summary:*

Due to {{service}} command going to be deprecated, we need consider to switch 
fully to {{systemctl}} replacement for systemd enabled images



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to