sous-chefs / sc-mongodb

Development repository for the sc-mongodb cookbook
https://supermarket.chef.io/cookbooks/sc-mongodb
Apache License 2.0
75 stars 91 forks source link

mongos fails in rewrite for mongos-ubuntu-1404 #144

Closed shortdudey123 closed 7 years ago

shortdudey123 commented 7 years ago
Recipe: sc-mongodb::mongos
  * ruby_block[chef_gem_at_converge_time] action run[2017-04-12T08:10:28+00:00] INFO: Processing ruby_block[chef_gem_at_converge_time] action run (sc-mongodb::mongos line 28)
[2017-04-12T08:10:35+00:00] INFO: ruby_block[chef_gem_at_converge_time] called

    - execute the ruby block chef_gem_at_converge_time
  * template[/etc/default/mongos] action create[2017-04-12T08:10:35+00:00] INFO: Processing template[/etc/default/mongos] action create (sc-mongodb::mongos line 134)
[2017-04-12T08:10:35+00:00] INFO: template[/etc/default/mongos] created file /etc/default/mongos

    - create new file /etc/default/mongos[2017-04-12T08:10:35+00:00] INFO: template[/etc/default/mongos] updated file contents /etc/default/mongos

    - update content in file /etc/default/mongos from none to ed5aeb
    --- /etc/default/mongos  2017-04-12 08:10:35.617769726 +0000
    +++ /etc/default/.chef-mongos20170412-1536-jek79z    2017-04-12 08:10:35.617769726 +0000
    @@ -1 +1,10 @@
    +#
    +# Automatically Generated by Chef, do not edit directly!
    +#
    +
    +CONFIGFILE="/etc/mongos.conf"
    +DAEMON="/usr/bin/$NAME"
    +DAEMON_OPTS="--config /etc/mongos.conf"
    +DAEMON_USER="mongodb"
    +ENABLE_MONGODB="yes"[2017-04-12T08:10:35+00:00] INFO: template[/etc/default/mongos] owner changed to 0
[2017-04-12T08:10:35+00:00] INFO: template[/etc/default/mongos] group changed to 0
[2017-04-12T08:10:35+00:00] INFO: template[/etc/default/mongos] mode changed to 644

    - change mode from '' to '0644'
    - change owner from '' to 'root'
    - change group from '' to 'root'
  * template[/etc/mongos.conf] action create[2017-04-12T08:10:35+00:00] INFO: Processing template[/etc/mongos.conf] action create (sc-mongodb::mongos line 147)
[2017-04-12T08:10:35+00:00] INFO: template[/etc/mongos.conf] created file /etc/mongos.conf

    - create new file /etc/mongos.conf[2017-04-12T08:10:35+00:00] INFO: template[/etc/mongos.conf] updated file contents /etc/mongos.conf

    - update content in file /etc/mongos.conf from none to a57e87
    --- /etc/mongos.conf 2017-04-12 08:10:35.637769726 +0000
    +++ /etc/.chef-mongos20170412-1536-8alj48.conf   2017-04-12 08:10:35.637769726 +0000
    @@ -1 +1,16 @@
    +#
    +# Automatically Generated by Chef, do not edit directly!
    +#
    +
    +---
    +net:
    +  port: 27017
    +  bindIp: 0.0.0.0
    +systemLog:
    +  destination: file
    +  logAppend: true
    +  path: "/var/log/mongodb/mongos.log"
    +sharding:
    +  configDB: 127.0.0.1:27019
    +[2017-04-12T08:10:35+00:00] INFO: template[/etc/mongos.conf] owner changed to 0
[2017-04-12T08:10:35+00:00] INFO: template[/etc/mongos.conf] group changed to 0
[2017-04-12T08:10:35+00:00] INFO: template[/etc/mongos.conf] mode changed to 644

    - change mode from '' to '0644'
    - change owner from '' to 'root'
    - change group from '' to 'root'
[2017-04-12T08:10:35+00:00] INFO: template[/etc/mongos.conf] not queuing delayed action restart on service[mongos] (delayed), as it's already been queued
  * directory[/var/log/mongodb] action create[2017-04-12T08:10:35+00:00] INFO: Processing directory[/var/log/mongodb] action create (sc-mongodb::mongos line 161)
[2017-04-12T08:10:35+00:00] WARN: only_if block for directory[/var/log/mongodb] returned "/var/log/mongodb/mongod.log", did you mean to run a command? If so use 'only_if "/var/log/mongodb/mongod.log"' in your code.
 (up to date)
  * directory[/data] action create[2017-04-12T08:10:35+00:00] INFO: Processing directory[/data] action create (sc-mongodb::mongos line 171)
 (skipped due to not_if)
  * execute[mongodb-systemctl-daemon-reload-mongos] action nothing[2017-04-12T08:10:35+00:00] INFO: Processing execute[mongodb-systemctl-daemon-reload-mongos] action nothing (sc-mongodb::mongos line 181)
 (skipped due to action :nothing)
  * template[/etc/init/mongos] action create[2017-04-12T08:10:35+00:00] INFO: Processing template[/etc/init/mongos] action create (sc-mongodb::mongos line 187)
[2017-04-12T08:10:35+00:00] INFO: template[/etc/init/mongos] created file /etc/init/mongos

    - create new file /etc/init/mongos[2017-04-12T08:10:35+00:00] INFO: template[/etc/init/mongos] updated file contents /etc/init/mongos

    - update content in file /etc/init/mongos from none to fe181d
    --- /etc/init/mongos 2017-04-12 08:10:35.665769726 +0000
    +++ /etc/init/.chef-mongos20170412-1536-wa0n1m   2017-04-12 08:10:35.665769726 +0000
    @@ -1 +1,40 @@
    +#
    +# Automatically Generated by Chef, do not edit directly!
    +#
    +
    +limit as unlimited unlimited
    +limit cpu unlimited unlimited
    +limit fsize unlimited unlimited
    +limit nofile 64000 64000
    +limit nproc 32000 32000
    +limit rss unlimited unlimited
    +
    +kill timeout 300 # wait 300s between SIGTERM and SIGKILL.
    +
    +start on runlevel [2345]
    +stop on runlevel [06]
    +
    +script
    +  NAME=mongos
    +  ENABLE_MONGOD="yes"
    +  if [ -f /etc/default/mongos ]; then
    +    . /etc/default/mongos;
    +  fi
    +
    +  # Handle NUMA access to CPUs (SERVER-3574)
    +  # This verifies the existence of numactl as well as testing that the command works
    +  NUMACTL_ARGS="--interleave=all"
    +  if which numactl >/dev/null 2>/dev/null && numactl $NUMACTL_ARGS ls / >/dev/null 2>/dev/null
    +  then
    +      NUMACTL="`which numactl` -- $NUMACTL_ARGS"
    +      DAEMON_OPTS="$DAEMON_OPTS"
    +  else
    +      NUMACTL=""
    +      DAEMON_OPTS="-- $DAEMON_OPTS"
    +  fi
    +
    +  if [ "x$ENABLE_MONGOD" = "xyes" ]; then
    +  exec start-stop-daemon --start --quiet --chuid $DAEMON_USER --exec $NUMACTL $DAEMON $DAEMON_OPTS
    +  fi
    +end script[2017-04-12T08:10:35+00:00] INFO: template[/etc/init/mongos] owner changed to 0
[2017-04-12T08:10:35+00:00] INFO: template[/etc/init/mongos] group changed to 0
[2017-04-12T08:10:35+00:00] INFO: template[/etc/init/mongos] mode changed to 755

    - change mode from '' to '0755'
    - change owner from '' to 'root'
    - change group from '' to 'root'
[2017-04-12T08:10:35+00:00] INFO: template[/etc/init/mongos] not queuing delayed action restart on service[mongos] (delayed), as it's already been queued
  * service[mongos] action enable[2017-04-12T08:10:35+00:00] INFO: Processing service[mongos] action enable (sc-mongodb::mongos line 209)

    ================================================================================
    Error executing action `enable` on resource 'service[mongos]'
    ================================================================================

    ArgumentError
    -------------
    File '/etc/init/mongos.conf' does not exist

    Resource Declaration:
    ---------------------
    # In /tmp/kitchen/cache/cookbooks/sc-mongodb/definitions/mongodb.rb

    209:   service new_resource.name do
    210:     case node['platform']
    211:     when 'ubuntu'
    212:       if node['platform_version'].to_f >= 15.04
    213:         provider Chef::Provider::Service::Systemd
    214:       end
    215:     else

    Compiled Resource:
    ------------------
    # Declared in /tmp/kitchen/cache/cookbooks/sc-mongodb/definitions/mongodb.rb:209:in `block in from_file'

    service("mongos") do
      params {:mongodb_type=>"mongos", :action=>[:enable, :start], :logpath=>"/var/log/mongodb/mongod.log", :dbpath=>"/data", :configservers=>[#<Chef::Node:0x000000024c1d30 @chef_server_rest=nil, @name="mongodb-configserver-001", @chef_environment="_default", @primary_runlist=#<Chef::RunList:0x000000024c1ce0 @run_list_items=[#<Chef::RunList::RunListItem:0x00000002559950 @version=nil, @type=:role, @name="mongodb-configserver">]>, @override_runlist=#<Chef::RunList:0x000000024c1c18 @run_list_items=[]>, @policy_name=nil, @policy_group=nil, @attributes=#<Chef::Node::Attribute @default={"mongodb"=>{"cluster_name"=>"default", "is_configserver"=>"true"}, "mongodb_cluster_name"=>"default", "mongodb_is_configserver"=>"true"}, @env_default={}, @role_default={}, @force_default={}, @normal={"mongodb"=>{"cluster_name"=>"default", "is_configserver"=>"true"}, "mongodb_cluster_name"=>"default", "mongodb_is_configserver"=>"true"}, @override={}, @role_override={}, @env_override={}, @force_override={}, @automatic={"hostname"=>"vagrant.vm", "os"=>"centos"}, @merged_attributes=nil, @properties=nil>, @run_state={}>], :replicaset=>nil, :notifies=>[], :name=>"mongos"}
      action [:enable, :start]
      supports {:status=>true, :restart=>true}
      retries 0
      retry_delay 2
      default_guard_interpreter :default
      service_name "mongos"
      enabled nil
      running nil
      masked nil
      pattern "mongos"
      declared_type :service
      cookbook_name "sc-mongodb"
      recipe_name "mongos"
    end

    Platform:
    ---------
    x86_64-linux

[2017-04-12T08:10:35+00:00] INFO: Running queued delayed notifications before re-raising exception
[2017-04-12T08:10:35+00:00] INFO: template[/etc/default/mongodb] sending restart action to service[mongod] (delayed)
Recipe: sc-mongodb::configserver
  * service[mongod] action restart[2017-04-12T08:10:35+00:00] INFO: Processing service[mongod] action restart (sc-mongodb::configserver line 209)
[2017-04-12T08:10:36+00:00] INFO: service[mongod] restarted

    - restart service service[mongod]
[2017-04-12T08:10:36+00:00] INFO: template[/etc/default/mongos] sending restart action to service[mongos] (delayed)
Recipe: sc-mongodb::mongos
  * service[mongos] action restart[2017-04-12T08:10:36+00:00] INFO: Processing service[mongos] action restart (sc-mongodb::mongos line 209)

    ================================================================================
    Error executing action `restart` on resource 'service[mongos]'
    ================================================================================

    Mixlib::ShellOut::ShellCommandFailed
    ------------------------------------
    Expected process to exit with [0], but received '1'
    ---- Begin output of /sbin/start mongos ----
    STDOUT: 
    STDERR: start: Unknown job: mongos
    ---- End output of /sbin/start mongos ----
    Ran /sbin/start mongos returned 1

    Resource Declaration:
    ---------------------
    # In /tmp/kitchen/cache/cookbooks/sc-mongodb/definitions/mongodb.rb

    209:   service new_resource.name do
    210:     case node['platform']
    211:     when 'ubuntu'
    212:       if node['platform_version'].to_f >= 15.04
    213:         provider Chef::Provider::Service::Systemd
    214:       end
    215:     else

    Compiled Resource:
    ------------------
    # Declared in /tmp/kitchen/cache/cookbooks/sc-mongodb/definitions/mongodb.rb:209:in `block in from_file'

    service("mongos") do
      params {:mongodb_type=>"mongos", :action=>[:enable, :start], :logpath=>"/var/log/mongodb/mongod.log", :dbpath=>"/data", :configservers=>[#<Chef::Node:0x000000024c1d30 @chef_server_rest=nil, @name="mongodb-configserver-001", @chef_environment="_default", @primary_runlist=#<Chef::RunList:0x000000024c1ce0 @run_list_items=[#<Chef::RunList::RunListItem:0x00000002559950 @version=nil, @type=:role, @name="mongodb-configserver">]>, @override_runlist=#<Chef::RunList:0x000000024c1c18 @run_list_items=[]>, @policy_name=nil, @policy_group=nil, @attributes=#<Chef::Node::Attribute @default={"mongodb"=>{"cluster_name"=>"default", "is_configserver"=>"true"}, "mongodb_cluster_name"=>"default", "mongodb_is_configserver"=>"true"}, @env_default={}, @role_default={}, @force_default={}, @normal={"mongodb"=>{"cluster_name"=>"default", "is_configserver"=>"true"}, "mongodb_cluster_name"=>"default", "mongodb_is_configserver"=>"true"}, @override={}, @role_override={}, @env_override={}, @force_override={}, @automatic={"hostname"=>"vagrant.vm", "os"=>"centos"}, @merged_attributes=nil, @properties=nil>, @run_state={}>], :replicaset=>nil, :notifies=>[], :name=>"mongos"}
      action [:enable, :start]
      supports {:status=>true, :restart=>true}
      retries 0
      retry_delay 2
      default_guard_interpreter :default
      service_name "mongos"
      enabled nil
      running nil
      masked nil
      pattern "mongos"
      declared_type :service
      cookbook_name "sc-mongodb"
      recipe_name "mongos"
    end

    Platform:
    ---------
    x86_64-linux

Running handlers:
[2017-04-12T08:10:36+00:00] ERROR: Running exception handlers
Running handlers complete
[2017-04-12T08:10:36+00:00] ERROR: Exception handlers complete
Chef Client failed. 20 resources updated in 54 seconds
[2017-04-12T08:10:36+00:00] FATAL: Stacktrace dumped to /tmp/kitchen/cache/chef-stacktrace.out
[2017-04-12T08:10:36+00:00] FATAL: Please provide the contents of the stacktrace.out file if you file a bug report
[2017-04-12T08:10:36+00:00] ERROR: Chef::Exceptions::MultipleFailures
[2017-04-12T08:10:37+00:00] FATAL: Chef::Exceptions::ChildConvergeError: Chef run process exited unsuccessfully (exit code 1)
shortdudey123 commented 7 years ago

Completed

lock[bot] commented 6 years ago

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.