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

Cannot complete agent / client add via puppet #585

Closed
mtdeguzis opened this issue Aug 14, 2019 · 3 comments
Closed

Cannot complete agent / client add via puppet #585

mtdeguzis opened this issue Aug 14, 2019 · 3 comments

Comments

@mtdeguzis
Copy link

Expected Behavior

The profile modules/profile/manifests/icinga2/agent.pp I added should respect the pki setting I added:

My agent.pp: https://gist.github.com/mtdeguzis/7036fc9fe8a9e7bc4b4078708b79c205
testnode.pp role: https://gist.github.com/mtdeguzis/a3af52f453a31179d73826effc15b412

Current Behavior

The puppet sync with master seems to ignore my pki setting of 'none'. I'll be happy to recheck docs if I missed something.

I install the Icinga module during the build of my master puppet node:

RUN puppet module install icinga-icinga2 --version 2.3.0

node sync:

[root@puppetagent-test /]# puppet agent -t
Info: Using configured environment 'production'
Info: Retrieving pluginfacts
Info: Retrieving plugin
Info: Retrieving locales
Info: Loading facts
Error: Could not retrieve catalog from remote server: Error 500 on SERVER: Server Error: Evaluation Error: Error while evaluating a Function Call, Parameter ticket_salt or ticket_id has be set when using pki='icinga2' (file: /etc/puppetlabs/code/environments/production/modules/icinga2/manifests/feature/api.pp, line: 289, column: 9) on node puppetagent-test.geisinger.edu
Warning: Not using cache on failed catalog
Error: Could not retrieve catalog; skipping run

Possible Solution

?

Context

Your Environment

  • Module version (puppet module list):
[root@puppetmaster-server /]# puppet module list
/etc/puppetlabs/code/environments/production/modules
├── ambariconfig_lof (???)
├── ambariconfig_prod (???)
├── ambariconfig_test (???)
├── firewalld_lofhadoopnode (???)
├── firewalld_prodhadoopnode (???)
├── grafana (???)
├── griddrive_manager (???)
├── helloworld (???)
├── icinga-icinga2 (v2.3.0)
├── jenkins (???)
├── limits_hdp (???)
├── pcfens-command_args (v0.2.0)
├── pcfens-rhn_register (v1.5.0)
├── profile (???)
├── puppetlabs-concat (v6.1.0)
├── puppetlabs-stdlib (v4.25.1)
├── puppetlabs-translate (v2.0.0)
├── python_customizations (???)
├── role (???)
├── sudoers (???)
├── thias-tuned (v1.0.3)
├── tuned_hdp_profile (???)
├── versionlock (???)
└── yum_repos (???)
  • Puppet version (puppet -V):
[root@puppetmaster-server /]# puppet -V
5.5.0
  • Operating System and version:
[root@puppetmaster-server /]# cat /etc/os-release 
NAME="Red Hat Enterprise Linux Server"
VERSION="7.4 (Maipo)"
ID="rhel"
ID_LIKE="fedora"
VARIANT="Server"
VARIANT_ID="server"
VERSION_ID="7.4"
PRETTY_NAME="Red Hat Enterprise Linux Server 7.4 (Maipo)"
ANSI_COLOR="0;31"
CPE_NAME="cpe:/o:redhat:enterprise_linux:7.4:GA:server"
HOME_URL="https://www.redhat.com/"
BUG_REPORT_URL="https://bugzilla.redhat.com/"

REDHAT_BUGZILLA_PRODUCT="Red Hat Enterprise Linux 7"
REDHAT_BUGZILLA_PRODUCT_VERSION=7.4
REDHAT_SUPPORT_PRODUCT="Red Hat Enterprise Linux"
REDHAT_SUPPORT_PRODUCT_VERSION="7.4"
@mtdeguzis
Copy link
Author

if I move the icinga2 profile for puppet-dev into the modules, then the install the upstream module itself dies.

Jenkins:

�[91m�[0m�[mNotice: Preparing to install into /etc/puppetlabs/code/environments/production/modules ...�[0m
�[mNotice: Downloading from https://forgeapi.puppet.com ...�[0m
�[91m�[1;31mError: Could not install module 'icinga-icinga2' (v2.3.0)
  Installation would overwrite /etc/puppetlabs/code/environments/production/modules/icinga2
    Currently, '' (???) is installed to that directory
    Use `puppet module install --force` to install this module anyway�[0m
�[0mService 'puppetmaster-server' failed to build: The command '/bin/sh -c puppet module install icinga-icinga2 --version 2.3.0' returned a non-zero code: 1

Am I supposed to edit the existing module or rename what I am doing as an "Extension" of the installed module?

@mtdeguzis
Copy link
Author

I think is just my misunderstanding of the module. I was using the same module names as the one I installed from puppet forge. Created a new module that does the agent connection in it's own class

modules/uda_icinga/agent.pp

  1 # Configure a given host with an Icinga agent
  2 class uda_icinga {
  3 
  4     # Notes and documentation:
  5     # https://forge.puppet.com/icinga/icinga2
  6 
  7     # By default, the icinga module only installs monitoring-plugins-base
  8     ensure_packages([
  9       'nagios-plugins-all',
 10       'monitoring-plugins-standard',
 11       'nagios-plugins-contrib',
 12     ], {
[...]

I know probably the best thing is to put this in the node role, but I wanted to share this common "module" with several roles

@mtdeguzis
Copy link
Author

My issue here was incorrectly adding "api" to the class { '::icinga2': piece. Disregard.

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

1 participant