Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

puppet Error defining cs_primitive #308

Closed
ghost opened this issue Jul 5, 2016 · 12 comments
Closed

puppet Error defining cs_primitive #308

ghost opened this issue Jul 5, 2016 · 12 comments
Labels
needs-feedback Further information is requested

Comments

@ghost
Copy link

ghost commented Jul 5, 2016

I created a little class and would like to have a simple VIP
puppet-corosync 2.0.1 on centos 7 with puppet 3.7.4 ruby 2.0.0:

cs_primitive { 'haproxy_vip':
    primitive_class => 'ocf',
    primitive_type  => 'IPaddr2',
    provided_by     => 'heartbeat',
    parameters      => {
      'ip'           => '1.2.3.4',
      'cidr_netmask' => '24'
    },
    operations      => {
      'monitor' => {
        'interval' => '30s' }
      },
  }

But all I get on the puppet run is:

Error: Could not retrieve catalog from remote server: Error 400 on SERVER: Could not autoload puppet/type/cs_primitive: /etc/puppet/modules/corosync/lib/puppet/type/cs_primitive.rb:68: syntax error, unexpected ':', expecting ')'
newparam(:unmanaged_metadata, array_matching: :all) do
^
/etc/puppet/modules/corosync/lib/puppet/type/cs_primitive.rb:104: syntax error, unexpected ':', expecting ')'
newproperty(:operations, array_matching: :all) do
^ on node foo.bar

roidelapluie added a commit to roidelapluie/puppet-corosync that referenced this issue Jul 6, 2016
Signed-off-by: Julien Pivotto <roidelapluie@inuits.eu>
@roidelapluie
Copy link
Member

Can you try :

cs_primitive { 'haproxy_vip':
    primitive_class => 'ocf',
    primitive_type  => 'IPaddr2',
    provided_by     => 'heartbeat',
    parameters      => {
      'ip'           => '1.2.3.4',
      'cidr_netmask' => '24'
    },
    operations      => [{
      'monitor' => {
        'interval' => '30s' }
      }],
  }

@roidelapluie
Copy link
Member

This looks like an error with Ruby 1.8.7.

Our test succeed with ruby2.0.0:
https://travis-ci.org/voxpupuli/puppet-corosync/jobs/142659959

@ghost
Copy link
Author

ghost commented Jul 6, 2016

I tried as you mentioned with the cling square, but doesn't help.
I'm on ruby 2.0.0
facter -p | grep ruby rubyplatform => x86_64-linux rubysitedir => /usr/local/share/ruby/site_ruby/ rubyversion => 2.0.0

@roidelapluie
Copy link
Member

Can you try with system ruby? your rubysitedir points to /usr/local

@ghost
Copy link
Author

ghost commented Jul 6, 2016

There is nothing in the folder. So I assume there is something missing. I check.

@ghost
Copy link
Author

ghost commented Jul 6, 2016

Are there any gems necessary?!

@roidelapluie
Copy link
Member

No.

Are you using system ruby?

@ghost
Copy link
Author

ghost commented Jul 6, 2016

AFAIK it's the only ruby installation

@roidelapluie
Copy link
Member

roidelapluie commented Jul 7, 2016

Can we get the WHOLE log?

e.g

puppet agent --test --debug --trace

if you do not want to paste it on github, you can send it to me by email: roidelapluie@inuits.eu. My GPG fingerprint is 0C7F 1877 69D0 72B9 3B64 2BB9 E484 2505 33AE 92D

roidelapluie added a commit to roidelapluie/puppet-corosync that referenced this issue Aug 10, 2016
Signed-off-by: Julien Pivotto <roidelapluie@inuits.eu>
roidelapluie added a commit to roidelapluie/puppet-corosync that referenced this issue Aug 19, 2016
Reproduce voxpupuli#308

Signed-off-by: Julien Pivotto <roidelapluie@inuits.eu>
@roidelapluie
Copy link
Member

ping @fourti

1 similar comment
@roidelapluie
Copy link
Member

ping @fourti

@roidelapluie roidelapluie added the needs-feedback Further information is requested label Aug 30, 2016
bastelfreak added a commit that referenced this issue Aug 30, 2016
@roidelapluie
Copy link
Member

Closed as no feedback

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs-feedback Further information is requested
Projects
None yet
Development

No branches or pull requests

1 participant