HewlettPackard / oneview-puppet

This project is no longer being developed and has limited support. In the near future this repository will be fully deprecated. Please consider using other OneView projects, such as Terraform and Ansible Collection
https://forge.puppet.com/hewlettpackard/oneview
Apache License 2.0
8 stars 17 forks source link

Error: Munging failed for value :synergy in class provider: wrong number of arguments (3 for 1) #167

Closed fkippke closed 6 years ago

fkippke commented 6 years ago

Scenario/Intent

I'm trying to run the OneView HP Module. I set up the Login.json file with the proper data. When I try a puppet apply i get the following error:

Error: Munging failed for value :synergy in class provider: wrong number of arguments (3 for 1)

Steps to Reproduce

I set up the Login.json with following Content:

{
  "url": "********",
  "user": "oneviewapi",
  "password": "********",
  "ssl_enabled": "true",
  "api_version": 300,
  "log_level": "info",
  "hardware_variant": "Synergy"
}

This shell script runs the puppet apply:

#!/usr/bin/env bash
PATH=/opt/puppetlabs/puppet/bin:$PATH
environment=production
environment_dir=/etc/puppetlabs/code/environments
repo_dir="${environment_dir}/${environment}"export FACTER_fqdn=********
puppet apply  --verbose --debug --report --show_diff --summarize \  
--modulepath "${repo_dir}/site:${repo_dir}/modules:/etc/puppetlabs/code/modules" \  
--hiera_config="${repo_dir}/hiera-oneview.yaml" \  
-e "include oneviewconf"

Expected Result

There should be a new Datacenter applied on the oneview appliance

fgbulsoni commented 6 years ago

Hello @fkippke, I'm not sure why that issue is being hit, but we will definitely need more information to properly diagnose it.

I've just performed a clean install to validate your configs and they seem to have worked fine.

I've used the following login.json file copied from yours and with modified info:

{
  "url": "https://172.16.101.48",
  "user": "Administrator",
  "password": "sample_pass",
  "ssl_enabled": "true",
  "api_version": 300,
  "log_level": "info",
  "hardware_variant": "Synergy"
}

And directly ran the command:

puppet apply  --verbose --debug --report --show_diff --summarize --modulepath "/home/vagrant/dev/puppet/" datacenter.pp

Which resulted in a clean run: Gist

Can you share some more information?

1- What exactly is the manifest that you're trying to run and is causing that error? 2- Have you tried running a simpler command, such as puppet apply directly on an example manifest? i.e.

puppet apply datacenter.pp -d

3- Are you using a custom module path? Did you clone your oneview module from GitHub or have you installed it through puppet module install hewlettpackard-oneview ?

fkippke commented 6 years ago

Thanks for your reply. But I solved the problem after all. It was the wrong sdk Version. 1.0.0. Now 3.1.0 is installed and working fine!

fgbulsoni commented 6 years ago

@fkippke Glad to know the issue is solved.

I would also suggest moving onto the latest version available of the SDK whenever possible, to have the most updated and bug-free code. The oneview-sdk-ruby is currently on version 5.2.0.

Closing down this issue since it is resolved :octocat: