deric / puppet-mesos

Puppet module for managing Mesos nodes
https://forge.puppetlabs.com/deric/mesos
Apache License 2.0
69 stars 61 forks source link

getting error from mesos_hash_parser #61

Closed systeemkabouter closed 8 years ago

systeemkabouter commented 8 years ago

I tried upgrading my puppet setup from last year to the current module. I tried running it and when that failed I tried again using the slave example in the README. In both occasions the puppet run fails on mesos_hash_parser :

Info: Retrieving pluginfacts Info: Retrieving plugin Info: Loading facts Error: Could not retrieve catalog from remote server: Error 400 on SERVER: mesos_hash_parser(): Wrong number of args given (3 for 1) at /etc/puppet/environments/production/modules/mesos/manifests/slave.pp:105 on node mesos01-dev.localdomain Warning: Not using cache on failed catalog Error: Could not retrieve catalog; skipping run

The offending line in the module slave code :

mesos_hash_parser($cgroups, 'slave', 'cgroups'),

The $cgroups should just be an empty hash as defined in the slave module itself

Running Ubuntu 14.04, Ruby 1.9.3p484, Puppet 3.8.6

Any hints greatly appreciated

deric commented 8 years ago

That's strange. Which version of this module do you use? The error message is slightly misleading, it should accept either 1 or 3 arguments. How do you install Puppet modules? Do you have appropriate version of puppet-stdlib?

Latest modification to this part of code was made in #48. Automated tests are passing on Ruby 1.9.3, Puppet 3.8.5.

systeemkabouter commented 8 years ago

I manage my modules using r10k :

forge "https://forge.puppetlabs.com"

mod 'deric/mesos', '0.7.0' mod 'deric/zookeeper', '0.5.1' mod 'puppetlabs/apache', '1.6.0' mod 'puppetlabs/apt', '2.1.0' mod 'puppetlabs/concat', '1.2.3' mod 'puppetlabs/firewall', '1.4.0' mod 'puppetlabs/mysql', '3.4.0' mod 'puppetlabs/stdlib', '4.11.0' mod 'richardc/datacat', '0.6.1'

mod 'puppetlabs/powershell', '1.0.6' # chocolatey dependancy mod 'badgerious/windows_env', '2.2.2' # chocolatey dependancy mod 'chocolatey/chocolatey', '1.2.1' mod 'puppetlabs/dism', '1.2.0'

deric commented 8 years ago

That should be ok. What arguments do you pass to mesos::slave? Do you configure somehow cgroups settings?

systeemkabouter commented 8 years ago

My original code was :

  class { '::mesos::slave':
    zookeeper      => $master_zookeepers,
    listen_address => $listen_address,
    attributes     => {
      'env' => 'production',
    },
    resources      => {
      'ports' => '[2000-65535]'
    },

    options        => {
      'containerizers' => 'docker,mesos',
      'hostname'       => $::fqdn,
    },

  }

(this is the part I used in a proof of concept las year)

As that failed, I commented it out and tried the example from the README :

  class{'::mesos::slave':
    zookeeper      => 'zk://192.168.1.1:2181,192.168.1.2:2181,192.168.1.3:2181/mesos',
    listen_address => $::ipaddress,
    attributes     => {
      'env' => 'production',
    },
    resources      => {
      'ports' => '[2000-65535]'
    }
  }

Both give the same error here.

deric commented 8 years ago

No other configuration in Hiera? Could you please test latest version from git master? I'm trying to reproduce this on Ubuntu 14.04.2, but everything works as expected.

systeemkabouter commented 8 years ago

The only messos related items below :

messos::master_zookeepers: 'zk://192.168.33.151:2181/mesos zk://192.168.33.152:2181/mesos' messos::master_iprange: '192.168.33.0/24'

I will try the master branch later on

systeemkabouter commented 8 years ago

I'm baffled now.

Tried the master branch version -> worked ok Removed this version and reinstalled released module using r10 -> worked ok

Same setup, same virtual machines, no reboots in between or such.

Maybe it was a weird apache / passenger caching issue, I'm really not sure. I will see what I can do tonight to reproduce the issue.

deric commented 8 years ago

Yeah, it looks like there was older version on master and new fact on client side. Reopen the ticket if the problem persists.