vagrant / puppet init.d script reports start when no start occurred -


so, struggling major problem, i've tried multiple different workarounds try , working there happening between puppet , actual server boggling mind.

basically, have init.d script /etc/init.d/rserve copied on correctly , when used command-line on server works (i.e. sudo service rserve start|stop|status), service returns correct error codes based on testing using echo $? on different commands.

the puppet service statement follows:

service { 'rserve':     ensure => running,     enable => true,     require => [file["/etc/init.d/rserve"], package['r-base'], exec['install-r-packages']]  } 

when puppet hits service, runs it's status method, sees isn't running , sets running , presumably starts service, output puppet below:

==> twine: debug: /schedule[weekly]: skipping device resources because running on host  ==> twine: debug: /schedule[puppet]: skipping device resources because running on host  ==> twine: debug: service[rserve](provider=upstart): not find rserve.conf in /etc/init  ==> twine: debug: service[rserve](provider=upstart): not find rserve.conf in /etc/init.d  ==> twine: debug: service[rserve](provider=upstart): not find rserve in /etc/init  ==> twine: debug: service[rserve](provider=upstart): executing '/etc/init.d/rserve status'  ==> twine: debug: service[rserve](provider=upstart): executing '/etc/init.d/rserve start'  ==> twine: notice: /stage[main]/etl/service[rserve]/ensure: ensure changed 'stopped' 'running' 

now when check service using sudo service rserve status or ps aux | grep rserve service in fact not running , quick sudo service rserve start shows init.d script working fine , starting rserve service starts , visible ps aux.

is there i'm missing here? i've tried starting service creating puppet exec { "sudo service rserve start"} still reports executed service still not running on server.

tl;dr puppet says service started when hasn't , there's seemingly nothing wrong init.d script, exit codes or otherwise.

update 1 in comments below can see tried isolating service in it's own test.pp file , running using puppet apply on server same result.

update 2 i've tried creating .sh file command start rserve using separate vagrant provision , can see error. however, error confusing error not occur when running sudo service rserve start, in way vagrant executes .sh commands, or user executes them under causing option removed command inside init.d script when it's executed.

this error r , rserve specific complaining missing flag --no-save needing passed r when in fact present in init.d script , being correctly passed when ssh'd vagrant box , using init.d commands.

update 3 i've managed whole process working @ point, however, it's 1 of situations steps work didn't readily reveal understanding of why original problem existed. i'm going replicate broken version , see if can figure out going on using 1 of methods mentioned in comments can potentially post answer out later on. if has insight why might have been happening feel free answer in meantime however. clarify situation bit, here details:

  1. the service's dependencies installed correctly using puppet
  2. the service used script in /etc/init.d on ubuntu start|stop rserve service
  3. the software in question r (r-base) , rserve (a communication layer between other langs , r)
  4. running command sudo service rserve start command-line worked expected
  5. the init.d script returned correct error codes
  6. a service {} block being used start service puppet
  7. puppet reported starting service when service wasn't started
  8. adding provision option vagrantfile .sh file containing sudo service rserve start revealed arguments in init.d being ignored when run vagrants provisioning not user active on shell.


Comments

Popular posts from this blog

java - Oracle EBS .ClassNotFoundException: oracle.apps.fnd.formsClient.FormsLauncher.class ERROR -

c# - how to use buttonedit in devexpress gridcontrol -

nvd3.js - angularjs-nvd3-directives setting color in legend as well as in chart elements -