sous-chefs / sc-mongodb

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

mongos fails in rewrite for mongos-ubuntu-1604 #145

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:26:30+00:00] INFO: Processing ruby_block[chef_gem_at_converge_time] action run (sc-mongodb::mongos line 28)
[2017-04-12T08:26:37+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:26:37+00:00] INFO: Processing template[/etc/default/mongos] action create (sc-mongodb::mongos line 134)
[2017-04-12T08:26:37+00:00] INFO: template[/etc/default/mongos] created file /etc/default/mongos

    - create new file /etc/default/mongos[2017-04-12T08:26:37+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:26:37.420153452 +0000
    +++ /etc/default/.chef-mongos20170412-1689-uk4x26    2017-04-12 08:26:37.420153452 +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:26:37+00:00] INFO: template[/etc/default/mongos] owner changed to 0
[2017-04-12T08:26:37+00:00] INFO: template[/etc/default/mongos] group changed to 0
[2017-04-12T08:26:37+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:26:37+00:00] INFO: Processing template[/etc/mongos.conf] action create (sc-mongodb::mongos line 147)
[2017-04-12T08:26:37+00:00] INFO: template[/etc/mongos.conf] created file /etc/mongos.conf

    - create new file /etc/mongos.conf[2017-04-12T08:26:37+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:26:37.436161451 +0000
    +++ /etc/.chef-mongos20170412-1689-5k11nb.conf   2017-04-12 08:26:37.436161451 +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:26:37+00:00] INFO: template[/etc/mongos.conf] owner changed to 0
[2017-04-12T08:26:37+00:00] INFO: template[/etc/mongos.conf] group changed to 0
[2017-04-12T08:26:37+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:26:37+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:26:37+00:00] INFO: Processing directory[/var/log/mongodb] action create (sc-mongodb::mongos line 161)
[2017-04-12T08:26:37+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:26:37+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:26:37+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:26:37+00:00] INFO: Processing template[/etc/init/mongos] action create (sc-mongodb::mongos line 187)
[2017-04-12T08:26:37+00:00] INFO: template[/etc/init/mongos] created file /etc/init/mongos

    - create new file /etc/init/mongos[2017-04-12T08:26:37+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:26:37.452169451 +0000
    +++ /etc/init/.chef-mongos20170412-1689-iitgxk   2017-04-12 08:26:37.452169451 +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:26:37+00:00] INFO: template[/etc/init/mongos] owner changed to 0
[2017-04-12T08:26:37+00:00] INFO: template[/etc/init/mongos] group changed to 0
[2017-04-12T08:26:37+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:26:37+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:26:37+00:00] INFO: Processing service[mongos] action enable (sc-mongodb::mongos line 209)

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

    Mixlib::ShellOut::ShellCommandFailed
    ------------------------------------
    Expected process to exit with [0], but received '1'
    ---- Begin output of /bin/systemctl --system enable mongos ----
    STDOUT: 
    STDERR: Failed to execute operation: No such file or directory
    ---- End output of /bin/systemctl --system enable mongos ----
    Ran /bin/systemctl --system enable 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:0x00000004400548 @chef_server_rest=nil, @name="mongodb-configserver-001", @chef_environment="_default", @primary_runlist=#<Chef::RunList:0x000000044004f8 @run_list_items=[#<Chef::RunList::RunListItem:0x000000043f1f70 @version=nil, @type=:role, @name="mongodb-configserver">]>, @override_runlist=#<Chef::RunList:0x00000004400480 @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"}
      provider Chef::Provider::Service::Systemd
      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:26:37+00:00] INFO: Running queued delayed notifications before re-raising exception
[2017-04-12T08:26:37+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:26:37+00:00] INFO: Processing service[mongod] action restart (sc-mongodb::configserver line 209)
[2017-04-12T08:26:37+00:00] INFO: service[mongod] restarted

    - restart service service[mongod]
[2017-04-12T08:26:37+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:26:37+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 '5'
    ---- Begin output of /bin/systemctl --system restart mongos ----
    STDOUT: 
    STDERR: Failed to restart mongos.service: Unit mongos.service not found.
    ---- End output of /bin/systemctl --system restart mongos ----
    Ran /bin/systemctl --system restart mongos returned 5

    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:0x00000004400548 @chef_server_rest=nil, @name="mongodb-configserver-001", @chef_environment="_default", @primary_runlist=#<Chef::RunList:0x000000044004f8 @run_list_items=[#<Chef::RunList::RunListItem:0x000000043f1f70 @version=nil, @type=:role, @name="mongodb-configserver">]>, @override_runlist=#<Chef::RunList:0x00000004400480 @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"}
      provider Chef::Provider::Service::Systemd
      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:26:37+00:00] ERROR: Running exception handlers
Running handlers complete
[2017-04-12T08:26:37+00:00] ERROR: Exception handlers complete
Chef Client failed. 22 resources updated in 47 seconds
[2017-04-12T08:26:37+00:00] FATAL: Stacktrace dumped to /tmp/kitchen/cache/chef-stacktrace.out
[2017-04-12T08:26:37+00:00] FATAL: Please provide the contents of the stacktrace.out file if you file a bug report
[2017-04-12T08:26:37+00:00] ERROR: Chef::Exceptions::MultipleFailures
[2017-04-12T08:26:38+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.