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

Duplicate declaration errors when both nvme and nagios_pci_megaraid_sas are true #175

Closed
hundredacres opened this issue Mar 26, 2020 · 1 comment

Comments

@hundredacres
Copy link

On a host where nagios_pci_megaraid_sas => true and nvme disks are present, the following error occurs:

Error: Could not retrieve catalog from remote server: Error 500 on SERVER: Server Error: Evaluation Error: Error while evaluating a Resource Statement, Duplicate declaration: Class[Nagios::Check::Ssd] is already declared at (file: /etc/puppetlabs/code/environments/production/modules/nagios/manifests/client.pp, line: 160); cannot redeclare (file: /etc/puppetlabs/code/environments/production/modules/nagios/manifests/client.pp, line: 162) (file: /etc/puppetlabs/code/environments/production/modules/nagios/manifests/client.pp, line: 162, column: 46) on node is03.riskiq
Warning: Not using cache on failed catalog
Error: Could not retrieve catalog; skipping run

Disk info from facter

disks => {
  nvme0n1 => {
    model => "INTEL SSDPEDME016T4",
    size => "1.46 TiB",
    size_bytes => 1600321314816
  },
  sda => {
    model => "PERC H710P",
    size => "1.27 TiB",
    size_bytes => 1396132806656,
    vendor => "DELL"
  }
}

I submitted a PR to fix, where we switch from declaring the class to including it.

@thias
Copy link
Owner

thias commented Oct 27, 2022

Good catch, and thanks for the fix! I've included 694a0b1

@thias thias closed this as completed Oct 27, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants