deric / puppet-mesos

Puppet module for managing Mesos nodes

Home Page:https://forge.puppetlabs.com/deric/mesos

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

/etc/init.d scripts not found on installation

psekar opened this issue · comments

When i install mesos mesos-0.21.1-1.1.centos65.x86_64 on centos65 i donot find /etc/init.d scripts. I do see the documentation regarding force_provider in the service.pp, what should be the provider for centos65 ? Also who creates the init scripts at /etc/init.d ?

Presently, i have a init.erb in my templates which gets created in /etc/init.d/mesos-master on mesos installation. I m also planning to use that script for mesos-slave ? Is this rite or the rpm is expected to have it ?

Who provides that package (Coudera, Mesosphere, ...)? Is there an upstart script? e.g. /etc/init/mesos-slave.conf?

I am having the same problem and the init.d scripts are nowhere to be found.

[vagrant@vagrant ~]$ lsb_release -a
LSB Version:    :base-4.0-amd64:base-4.0-noarch:core-4.0-amd64:core-4.0-noarch
Distributor ID: CentOS
Description:    CentOS release 6.7 (Final)
Release:    6.7
Codename:   Final
[vagrant@vagrant ~]$
[vagrant@vagrant ~]$ cat /etc/init/mesos-master.conf
description "mesos master"

# Start just after the System-V jobs (rc) to ensure networking and zookeeper
# are started. This is as simple as possible to ensure compatibility with
# Ubuntu, Debian, CentOS, and RHEL distros. See:
# http://upstart.ubuntu.com/cookbook/#standard-idioms
start on stopped rc RUNLEVEL=[2345]
respawn

exec /usr/bin/mesos-init-wrapper master
[vagrant@vagrant ~]$ yum info mesos
Loaded plugins: fastestmirror, security
Loading mirror speeds from cached hostfile
 * base: ftp.rrzn.uni-hannover.de
 * epel: mirror.nsc.liu.se
 * extras: ftp.fau.de
 * remi-safe: remi.schlundtech.de
 * updates: wftp.tu-chemnitz.de
 * webtatic: uk.repo.webtatic.com
Installed Packages
Name        : mesos
Arch        : x86_64
Version     : 0.23.0
Release     : 1.0.centos65
Size        : 64 M
Repo        : installed
From repo   : mesosphere
Summary     : Cluster resource manager with efficient resource isolation
URL         : http://incubator.apache.org/mesos/
License     : Apache-2.0
Description : Cluster resource manager with efficient resource isolation
            : Apache Mesos is a cluster manager that offers efficient resource isolation
            : and sharing across distributed applications, or frameworks. It can run
            : Hadoop, MPI, Hypertable, Spark (a new framework for low-latency interactive
            : and iterative jobs), and other applications.

I've tried to change the force_provider to upstart with no success

mesos::master::force_provider: upstart # init

mesosphere's package is using upstart and updating force_provider to upstart is working for me.

I too am having this problem.

The puppet run error is:

Error: Could not start Service[mesos-slave]: Execution of '/sbin/service mesos-slave start' returned 1: mesos-slave: unrecognized service
Wrapped exception:
Execution of '/sbin/service mesos-slave start' returned 1: mesos-slave: unrecognized service
Error: /Stage[main]/Mesos::Slave/Mesos::Service[slave]/Service[mesos-slave]/ensure: change from stopped to running failed: Could not start Service[mesos-slave]: Execution of '/sbin/service mesos-slave start' returned 1: mesos-slave: unrecognized service

To verify the error, I looked where these scripts are for CentOS and true enough to the log message, mesos-slave is not there:

root@bottle-docker:~ # ls /etc/init.d
abrt-ccpp  acpid  auditd        cgconfig  cpuspeed  docker     halt       irqbalance  logstash  lxc      messagebus  netfs         nfs      nslcd    postfix  quota_nld    rngd     rpcidmapd   sandbox    single  svnserve   vboxadd
abrtd      atd    autofs        cgred     crond functions  ip6tables  kdump   lvm2-lvmetad  mcollective  monit   network       nfslock  ntpd     psacct   rdisc    rpcbind  rpcsvcgssd  saslauthd  smartd  sysstat    vboxadd-service
abrt-oops  atop   blk-availability  consul    dnsmasq   haldaemon  iptables   killall     lvm2-monitor  mdmonitor    netconsole  newrelic-sysmond  nscd     ntpdate  puppet   restorecond  rpcgssd  rsyslog sendmail   sshd    udev-post  vboxadd-x11

The package was built by:

root@bottle-docker:~ # rpm -qi mesos
Name        : mesos                        Relocations: / 
Version     : 0.28.2                            Vendor: (none)
Release     : 2.0.27.centos65               Build Date: Tue 07 Jun 2016 11:17:38 AM PDT
Install Date: Tue 19 Jul 2016 02:40:29 PM PDT      Build Host: ip-10-186-50-151.ec2.internal
Group       : misc                          Source RPM: mesos-0.28.2-2.0.27.centos65.src.rpm
Size        : 92675753                         License: Apache-2.0
Signature   : RSA/SHA1, Tue 07 Jun 2016 11:23:33 AM PDT, Key ID df7d54cbe56151bf
Packager    : dev@mesos.apache.org
URL         : https://mesos.apache.org/
Summary     : Cluster resource manager with efficient resource isolation
Description :
Cluster resource manager with efficient resource isolation
Apache Mesos is a cluster manager that offers efficient resource isolation
and sharing across distributed applications, or frameworks. It can run
Hadoop, MPI, Hypertable, Spark (a new framework for low-latency interactive
and iterative jobs), and other applications.

Inspecting the list of files included in the mesos RPM, I found these were the closest to an init script the RPM comes with (very Debian-esque):

root@bottle-docker:~ # rpm -ql mesos 
/etc/default/mesos
/etc/default/mesos-master
/etc/default/mesos-slave
...

How should this be solved?

@pong-takepart could you test the version from master branch?

I took same approach as suggested @woosley. It might be a breaking change as we're overriding Puppet defaults that are better tested on different platforms. I've been trying to avoid this for as long as possible, as it might be incompatible with future versions. It this case it's mostly fault of Mesosphere packages which are inconsistent with system defaults.

force_provider was renamed to service_provider

@deric, Using master appears to work. Presently, puppetforge is 0.8.1 from June 21st. I like to use the puppet tools to manage modules; do you think you'll be updating that soon?

@pong-takepart Sure, it's tagged as v0.8.2 and should be available from forge.