Error while installing/configuring foreman-proxy 1.12: Invalid parameter dns_realm on Class[Foreman_proxy]

25 views
Skip to first unread message

Sankara

unread,
Dec 6, 2016, 4:34:38 PM12/6/16
to Puppet Users
Hi

I am trying to install and configure foreman-proxy 1.12 (in one of the node, say compile master) using the module available at https://forge.puppet.com/theforeman/foreman_proxy/3.0.1/compatibility

While running “puppet agent -t”  (to install and configure foreman-proxy) , I am getting the below error on my node. Can you please help me to find what could be the issue?

Error: Could not retrieve catalog from remote server: Error 400 on SERVER: Invalid parameter dns_realm on Class[Foreman_proxy] at /dev/modules/fmanproxy/manifests/config.pp:128 on node poc-agent.local
Warning: Not using cache on failed catalog
Error: Could not retrieve catalog; skipping run

config.pp:128 ===> The line#128 in config.pp file is a close curly brace of the class “class { '::foreman_proxy':”

Further details

I have separate machine for CA, CM, Foreman

I have the below to achieve this

I have my own module called fmanproxy which will invoke the external module.

Why do I have my own module?
    To customise/set the variables and values which I want to pass to external module

What I have in my module? Or how I am calling external module classes?

    the init.pp file in my module fmanproxy, I have the below
        class fmanproxy (
            <ALL my Variables>
            $dns_realm                  = $fmanproxy::params::dns_realm,
            .
            .
            .

        } inherits ::fmanproxy::params {

          # validate parameters here

          class { '::fmanproxy::install': } ->
          class { '::fmanproxy::config': } ~>
          class { '::fmanproxy::service': } ->
          Class['::fmanproxy']
        }

    =================================================
   
    the install.pp file in my module fmanproxy, I have the below
        class fmanproxy::install {
            <Setting up my custom REPO and installing, nothing else>
        }

    the config.pp file in my module fmanproxy, I have the below
        class fmanproxy::config {
          class { '::foreman_proxy':
            bind_host                    => $::fmanproxy::bind_host,
            bmc                          => $::fmanproxy::bmc,
            dns_realm                    => $::fmanproxy::dns_realm,
            .
            .
            .
            .

       
        } ## End of class ::foreman_proxy

          # Install the foreman_proxy
            include ::foreman_proxy

        } ## End of fmanproxy::config

    =================================================

    the service.pp file in my module fmanproxy, I have nothing
        class fmanproxy::service {
          # include ::foreman_proxy::service
        }

    =================================================

    the params.pp file in my module fmanproxy, I have the variables as below
        class fmanproxy::params {
            $custom_repo = true
            $dns_zone    = $::domain
            $dns_realm   = upcase($dns_zone)
            .
            .
            .
            .
        } ## End of Main class

    =================================================

What I have in my Puppetfile

    I have added the below line to download the module
        mod 'theforeman/foreman_proxy', '3.0.1'

    I have the below lines to download my custom module
        mod "fmanproxy",
          :git => “MY_REPO_URL”,
          :ref => ‘MY_BRANCH_NAME’

Thanks

Sankara


Greg Sutcliffe

unread,
Dec 8, 2016, 7:24:59 AM12/8/16
to puppet-users
On 6 December 2016 at 19:40, Sankara <saras...@gmail.com> wrote:
> While running “puppet agent -t”  (to install and configure foreman-proxy) , I am getting the below error on my node. Can you please help me to find what could be the issue?
>
> Error: Could not retrieve catalog from remote server: Error 400 on SERVER: Invalid parameter dns_realm on Class[Foreman_proxy] at /dev/modules/fmanproxy/manifests/config.pp:128 on node poc-agent.local
> Warning: Not using cache on failed catalog
> Error: Could not retrieve catalog; skipping run

Looking at https://github.com/theforeman/puppet-foreman_proxy/blob/master/manifests/init.pp the $dns_realm parameter isn't exposed for configuration - it's only used within params.pp to set $dns_tsig_principal (which *is* available in init.pp). Feel free to submit a bug or even send a patch if you feel that behaviour is wrong :)

Cheers
Greg
--
Greg Sutcliffe
Community Lead, Foreman
IRC: gwmngilfen

Sankara

unread,
Dec 8, 2016, 4:50:54 PM12/8/16
to Puppet Users
You are right, I had couple of parameters which is not in that module and caused the problem. Even after removing those parameters, the issue was not resolved because I had environment_timeout = unlimited and that did not flush my environment cache. To resolve that I changed the environment_timeout = 0 and restarted the puppetserver service.

Thank you for your help!

Now after fixing all those parameters I a got into different error. Since the new error is different, I will go ahead and create another topic.

Regards

Sankara
Reply all
Reply to author
Forward
0 new messages