Project

General

Profile

Bug #17504

Can't run foreman-installer: Could not find class ::foreman::params

Added by Jan-Otto Kröpke almost 3 years ago. Updated over 2 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Difficulty:
Triaged:
No
Bugzilla link:
Fixed in Releases:
Found in Releases:

Description

Hi,

i'm trying to run the foreman-installer, but I got this error:

# foreman-installer --trace --debug -i --noop
Could not get default values, check log file at /var/log/foreman-installer/foreman.log for more information

# cat /var/log/foreman-installer/foreman.log
[ERROR 2016-11-28 19:07:02 main] Errors encountered during run:
[ERROR 2016-11-28 19:07:02 main] echo '$kafo_config_file="/etc/foreman-installer/scenarios.d/foreman.yaml" $kafo_add_progress="true" $temp_dir="/tmp/d20161128-10915-b0rlg4" include foreman::params include foreman::cli::params include foreman_proxy::params include puppet::params include foreman::plugin::discovery::params include foreman::plugin::memcache::params include foreman::plugin::ovirt_provision::params include foreman::plugin::puppetdb::params include foreman::plugin::tasks::params include foreman_proxy::plugin::abrt::params include foreman_proxy::plugin::chef::params include foreman_proxy::plugin::discovery::params include foreman_proxy::plugin::openscap::params include foreman_proxy::plugin::pulp::params include foreman_proxy::plugin::remote_execution::ssh::params include foreman_proxy::plugin::salt::params dump_values("::foreman::params::foreman_url","::foreman::params::puppetrun","::foreman::params::unattended","::foreman::params::authentication","::foreman::params::passenger","::foreman::params::passenger_ruby","::foreman::params::passenger_ruby_package","::foreman::params::plugin_prefix","::foreman::params::use_vhost","::foreman::params::servername",::foreman::params::serveraliases,"::foreman::params::ssl","::foreman::params::custom_repo","::foreman::params::repo","::foreman::params::configure_epel_repo","::foreman::params::configure_scl_repo","::foreman::params::selinux","::foreman::params::gpgcheck","::foreman::params::version","::foreman::params::plugin_version","::foreman::params::db_manage","::foreman::params::db_type","::foreman::params::db_username","::foreman::params::db_password",::foreman::params::db_pool,"::foreman::params::app_root","::foreman::params::manage_user","::foreman::params::user","::foreman::params::group",::foreman::params::user_groups,"::foreman::params::rails_env","::foreman::params::puppet_home","::foreman::params::puppet_ssldir","::foreman::params::locations_enabled","::foreman::params::organizations_enabled","::foreman::params::passenger_interface","::foreman::params::vhost_priority",::foreman::params::server_port,::foreman::params::server_ssl_port,"::foreman::params::server_ssl_ca","::foreman::params::server_ssl_chain","::foreman::params::server_ssl_cert","::foreman::params::server_ssl_certs_dir","::foreman::params::server_ssl_key","::foreman::params::server_ssl_crl","::foreman::params::server_ssl_ca","::foreman::params::server_ssl_cert","::foreman::params::server_ssl_key","::foreman::params::keepalive",::foreman::params::max_keepalive_requests,::foreman::params::keepalive_timeout,"::foreman::params::oauth_active","::foreman::params::oauth_map_users","::foreman::params::oauth_consumer_key","::foreman::params::oauth_consumer_secret","::foreman::params::passenger_prestart","::foreman::params::passenger_min_instances","::foreman::params::passenger_start_timeout","::foreman::params::admin_username","::foreman::params::admin_password","::foreman::params::admin_first_name","::foreman::params::admin_last_name","::foreman::params::admin_email","::foreman::params::initial_organization","::foreman::params::initial_location","::foreman::params::ipa_authentication","::foreman::params::http_keytab","::foreman::params::pam_service","::foreman::params::ipa_manage_sssd","::foreman::params::websockets_encrypt","::foreman::params::websockets_ssl_key","::foreman::params::websockets_ssl_cert","::foreman::params::logging_level",::foreman::params::loggers,"::foreman::params::email_conf","::foreman::params::email_source","::foreman::params::email_delivery_method","::foreman::params::email_smtp_address",::foreman::params::email_smtp_port,"::foreman::params::email_smtp_domain","::foreman::params::email_smtp_authentication","::foreman::params::email_smtp_user_name","::foreman::params::email_smtp_password","::foreman::cli::params::foreman_url","::foreman::cli::params::manage_root_config","::foreman::cli::params::username","::foreman::cli::params::password","::foreman::cli::params::refresh_cache",::foreman::cli::params::request_timeout,"foreman_proxy::params::repo","foreman_proxy::params::gpgcheck","foreman_proxy::params::custom_repo","foreman_proxy::params::version","foreman_proxy::params::ensure_packages_version","foreman_proxy::params::plugin_version","foreman_proxy::params::bind_host",foreman_proxy::params::http_port,foreman_proxy::params::ssl_port,"foreman_proxy::params::dir","foreman_proxy::params::user","foreman_proxy::params::log","foreman_proxy::params::log_level",foreman_proxy::params::log_buffer,foreman_proxy::params::log_buffer_errors,"foreman_proxy::params::http","foreman_proxy::params::ssl","foreman_proxy::params::ssl_ca","foreman_proxy::params::ssl_cert","foreman_proxy::params::ssl_key","foreman_proxy::params::foreman_ssl_ca","foreman_proxy::params::foreman_ssl_cert","foreman_proxy::params::foreman_ssl_key",foreman_proxy::params::trusted_hosts,foreman_proxy::params::ssl_disabled_ciphers,"foreman_proxy::params::manage_sudoersd","foreman_proxy::params::use_sudoersd","foreman_proxy::params::puppetca","foreman_proxy::params::puppetca_listen_on","foreman_proxy::params::ssldir","foreman_proxy::params::puppetdir","foreman_proxy::params::puppetca_cmd","foreman_proxy::params::puppet_group","foreman_proxy::params::manage_puppet_group","foreman_proxy::params::puppet","foreman_proxy::params::puppet_listen_on","foreman_proxy::params::puppetrun_cmd","foreman_proxy::params::puppetrun_provider","foreman_proxy::params::customrun_cmd","foreman_proxy::params::customrun_args","foreman_proxy::params::mcollective_user","foreman_proxy::params::puppetssh_sudo","foreman_proxy::params::puppetssh_command","foreman_proxy::params::puppetssh_user","foreman_proxy::params::puppetssh_keyfile","foreman_proxy::params::puppetssh_wait","foreman_proxy::params::salt_puppetrun_cmd","foreman_proxy::params::puppet_user","foreman_proxy::params::puppet_url","foreman_proxy::params::ssl_ca","foreman_proxy::params::ssl_cert","foreman_proxy::params::ssl_key","foreman_proxy::params::puppet_use_environment_api","foreman_proxy::params::templates","foreman_proxy::params::templates_listen_on","foreman_proxy::params::template_url","foreman_proxy::params::logs","foreman_proxy::params::logs_listen_on","foreman_proxy::params::tftp","foreman_proxy::params::tftp_listen_on","foreman_proxy::params::tftp_managed","foreman_proxy::params::tftp_manage_wget",foreman_proxy::params::tftp_syslinux_filenames,"foreman_proxy::params::tftp_root",foreman_proxy::params::tftp_dirs,"foreman_proxy::params::tftp_servername","foreman_proxy::params::dhcp","foreman_proxy::params::dhcp_listen_on","foreman_proxy::params::dhcp_managed","foreman_proxy::params::dhcp_provider",foreman_proxy::params::dhcp_subnets,foreman_proxy::params::dhcp_option_domain,foreman_proxy::params::dhcp_search_domains,"foreman_proxy::params::dhcp_interface","foreman_proxy::params::dhcp_gateway","foreman_proxy::params::dhcp_range","foreman_proxy::params::dhcp_nameservers","foreman_proxy::params::dhcp_server","foreman_proxy::params::dhcp_config","foreman_proxy::params::dhcp_leases","foreman_proxy::params::dhcp_key_name","foreman_proxy::params::dhcp_key_secret",foreman_proxy::params::dhcp_omapi_port,"foreman_proxy::params::dns","foreman_proxy::params::dns_listen_on","foreman_proxy::params::dns_managed","foreman_proxy::params::dns_provider","foreman_proxy::params::dns_interface","foreman_proxy::params::dns_zone","foreman_proxy::params::dns_reverse","foreman_proxy::params::dns_server","foreman_proxy::params::dns_ttl","foreman_proxy::params::dns_tsig_keytab","foreman_proxy::params::dns_tsig_principal",foreman_proxy::params::dns_forwarders,"foreman_proxy::params::libvirt_network","foreman_proxy::params::libvirt_connection","foreman_proxy::params::bmc","foreman_proxy::params::bmc_listen_on","foreman_proxy::params::bmc_default_provider","foreman_proxy::params::realm","foreman_proxy::params::realm_listen_on","foreman_proxy::params::realm_provider","foreman_proxy::params::realm_keytab","foreman_proxy::params::realm_principal","foreman_proxy::params::freeipa_remove_dns","foreman_proxy::params::keyfile","foreman_proxy::params::register_in_foreman","foreman_proxy::params::foreman_base_url","foreman_proxy::params::registered_name","foreman_proxy::params::registered_proxy_url","foreman_proxy::params::oauth_effective_user","foreman_proxy::params::oauth_consumer_key","foreman_proxy::params::oauth_consumer_secret","foreman_proxy::params::puppet_use_cache","puppet::params::version","puppet::params::user","puppet::params::group","puppet::params::dir","puppet::params::codedir","puppet::params::vardir","puppet::params::logdir","puppet::params::rundir","puppet::params::ssldir","puppet::params::sharedir","puppet::params::manage_packages","puppet::params::dir_owner","puppet::params::dir_group","puppet::params::package_provider","puppet::params::package_source",puppet::params::port,"puppet::params::listen",puppet::params::listen_to,"puppet::params::pluginsync","puppet::params::splay","puppet::params::splaylimit","puppet::params::autosign",puppet::params::autosign_entries,"puppet::params::autosign_mode",puppet::params::runinterval,"puppet::params::usecacheonfailure","puppet::params::runmode",puppet::params::unavailable_runmodes,"puppet::params::cron_cmd","puppet::params::systemd_cmd","puppet::params::agent_noop","puppet::params::show_diff","puppet::params::module_repository",puppet::params::configtimeout,"puppet::params::ca_server",puppet::params::ca_port,"puppet::params::prerun_command","puppet::params::postrun_command",puppet::params::dns_alt_names,"puppet::params::use_srv_records","puppet::params::srv_domain","puppet::params::pluginsource","puppet::params::pluginfactsource",puppet::params::additional_settings,puppet::params::agent_additional_settings,"puppet::params::agent_restart_command","puppet::params::classfile","puppet::params::hiera_config","puppet::params::main_template","puppet::params::agent_template","puppet::params::auth_template","puppet::params::allow_any_crl_auth",puppet::params::auth_allowed,puppet::params::client_package,"puppet::params::agent","puppet::params::remove_lock","puppet::params::client_certname","puppet::params::puppetmaster","puppet::params::systemd_unit_name","puppet::params::service_name","puppet::params::syslogfacility","puppet::params::environment","puppet::params::server",puppet::params::server_admin_api_whitelist,"puppet::params::user","puppet::params::group","puppet::params::dir","puppet::params::ip",puppet::params::port,"puppet::params::server_ca","puppet::params::server_ca_auth_required",puppet::params::server_ca_client_whitelist,"puppet::params::server_http",puppet::params::server_http_port,puppet::params::server_http_allow,"puppet::params::server_reports","puppet::params::server_implementation","puppet::params::server_passenger","puppet::params::server_puppetserver_dir","puppet::params::server_puppetserver_vardir","puppet::params::server_puppetserver_version","puppet::params::server_service_fallback",puppet::params::server_passenger_min_instances,"puppet::params::server_passenger_pre_start","puppet::params::server_passenger_ruby","puppet::params::server_httpd_service","puppet::params::server_external_nodes","puppet::params::server_template","puppet::params::server_main_template",puppet::params::server_cipher_suites,"puppet::params::server_config_version",puppet::params::server_connect_timeout,"puppet::params::server_git_repo","puppet::params::server_dynamic_environments","puppet::params::server_directory_environments","puppet::params::server_default_manifest","puppet::params::server_default_manifest_path","puppet::params::server_default_manifest_content","puppet::params::server_enable_ruby_profiler",puppet::params::server_environments,"puppet::params::server_environments_owner","puppet::params::server_environments_group","puppet::params::server_environments_mode","puppet::params::server_envs_dir","puppet::params::server_envs_target",puppet::params::server_common_modules_path,"puppet::params::server_git_repo_mode","puppet::params::server_git_repo_path","puppet::params::server_git_repo_group","puppet::params::server_git_repo_user",puppet::params::server_git_branch_map,puppet::params::server_idle_timeout,"puppet::params::server_post_hook_content","puppet::params::server_post_hook_name","puppet::params::server_storeconfigs_backend","puppet::params::server_app_root",puppet::params::server_ruby_load_paths,"puppet::params::server_ssl_dir","puppet::params::server_ssl_dir_manage",puppet::params::server_ssl_protocols,"puppet::params::server_package","puppet::params::server_version","puppet::params::server_certname","puppet::params::server_enc_api","puppet::params::server_report_api",puppet::params::server_request_timeout,"puppet::params::server_ca_proxy","puppet::params::server_strict_variables",puppet::params::server_additional_settings,puppet::params::server_rack_arguments,"puppet::params::server_foreman","puppet::params::server_foreman_url","puppet::params::server_foreman_ssl_ca","puppet::params::server_foreman_ssl_cert","puppet::params::server_foreman_ssl_key","puppet::params::server_facts","puppet::params::server_puppet_basedir","puppet::params::server_puppetdb_host",puppet::params::server_puppetdb_port,"puppet::params::server_puppetdb_swf","puppet::params::server_parser","puppet::params::server_environment_timeout","puppet::params::server_jvm_java_bin","puppet::params::server_jvm_config","puppet::params::server_jvm_min_heap_size","puppet::params::server_jvm_max_heap_size","puppet::params::server_jvm_extra_args","puppet::params::server_jruby_gem_home",puppet::params::server_max_active_instances,"puppet::params::server_use_legacy_auth_conf","::foreman::plugin::discovery::params::install_images","::foreman::plugin::discovery::params::tftp_root","::foreman::plugin::discovery::params::source_url","::foreman::plugin::discovery::params::image_name",::foreman::plugin::memcache::params::hosts,::foreman::plugin::memcache::params::expires_in,"::foreman::plugin::memcache::params::namespace","::foreman::plugin::memcache::params::compress","foreman::plugin::ovirt_provision::params::package","foreman::plugin::puppetdb::params::package","foreman::plugin::puppetdb::params::address","foreman::plugin::puppetdb::params::dashboard_address","foreman::plugin::tasks::params::package","foreman::plugin::tasks::params::service","installed","installed","installed","installed","installed","installed","installed","::foreman_proxy::plugin::abrt::params::enabled","::foreman_proxy::plugin::abrt::params::listen_on","::foreman_proxy::plugin::abrt::params::version","::foreman_proxy::plugin::abrt::params::group","::foreman_proxy::plugin::abrt::params::abrt_send_log_file","::foreman_proxy::plugin::abrt::params::spooldir","::foreman_proxy::plugin::abrt::params::aggregate_reports",::foreman_proxy::plugin::abrt::params::send_period,"::foreman_proxy::plugin::abrt::params::faf_server_url","::foreman_proxy::plugin::abrt::params::faf_server_ssl_noverify","::foreman_proxy::plugin::abrt::params::faf_server_ssl_cert","::foreman_proxy::plugin::abrt::params::faf_server_ssl_key","::foreman_proxy::plugin::chef::params::enabled","::foreman_proxy::plugin::chef::params::listen_on","::foreman_proxy::plugin::chef::params::version","::foreman_proxy::plugin::chef::params::group","::foreman_proxy::plugin::chef::params::server_url","::foreman_proxy::plugin::chef::params::client_name","::foreman_proxy::plugin::chef::params::private_key","::foreman_proxy::plugin::chef::params::ssl_verify","::foreman_proxy::plugin::chef::params::ssl_pem_file","::foreman_proxy::plugin::discovery::params::install_images","::foreman_proxy::plugin::discovery::params::tftp_root","::foreman_proxy::plugin::discovery::params::source_url","::foreman_proxy::plugin::discovery::params::image_name","::foreman_proxy::plugin::openscap::params::configure_openscap_repo","::foreman_proxy::plugin::openscap::params::enabled","::foreman_proxy::plugin::openscap::params::version","::foreman_proxy::plugin::openscap::params::listen_on","::foreman_proxy::plugin::openscap::params::openscap_send_log_file","::foreman_proxy::plugin::openscap::params::spooldir","::foreman_proxy::plugin::openscap::params::contentdir","::foreman_proxy::plugin::openscap::params::reportsdir","::foreman_proxy::plugin::openscap::params::failed_dir","::foreman_proxy::plugin::pulp::params::enabled","::foreman_proxy::plugin::pulp::params::listen_on","::foreman_proxy::plugin::pulp::params::pulpnode_enabled","::foreman_proxy::plugin::pulp::params::version","::foreman_proxy::plugin::pulp::params::group","::foreman_proxy::plugin::pulp::params::pulp_url","::foreman_proxy::plugin::pulp::params::pulp_dir","::foreman_proxy::plugin::pulp::params::pulp_content_dir","::foreman_proxy::plugin::pulp::params::puppet_content_dir","::foreman_proxy::plugin::pulp::params::mongodb_dir","::foreman_proxy::plugin::remote_execution::ssh::params::enabled","::foreman_proxy::plugin::remote_execution::ssh::params::listen_on","::foreman_proxy::plugin::remote_execution::ssh::params::generate_keys","::foreman_proxy::plugin::remote_execution::ssh::params::ssh_identity_dir","::foreman_proxy::plugin::remote_execution::ssh::params::ssh_identity_file","::foreman_proxy::plugin::remote_execution::ssh::params::ssh_keygen","::foreman_proxy::plugin::remote_execution::ssh::params::local_working_dir","::foreman_proxy::plugin::remote_execution::ssh::params::remote_working_dir","::foreman_proxy::plugin::salt::params::autosign_file","::foreman_proxy::plugin::salt::params::enabled","::foreman_proxy::plugin::salt::params::listen_on","::foreman_proxy::plugin::salt::params::user","::foreman_proxy::plugin::salt::params::group","::foreman_proxy::plugin::salt::params::api","::foreman_proxy::plugin::salt::params::api_url","::foreman_proxy::plugin::salt::params::api_auth","::foreman_proxy::plugin::salt::params::api_username","::foreman_proxy::plugin::salt::params::api_password")' | RUBYLIB=/usr/share/gems/gems/kafo-0.9.8/lib/kafo/../..//modules: /opt/puppetlabs/bin/puppet apply --noop --reports= --modulepath /usr/share/foreman-installer/modules:/usr/share/gems/gems/kafo-0.9.8/modules 2>&1
[ERROR 2016-11-28 19:07:02 main] Warning: Assignment to $server_facts is deprecated
   (at /usr/share/foreman-installer/modules/puppet/manifests/params.pp:343)
Warning: Undefined variable 'installed';
   (file & line not available)
Notice: Compiled catalog for <hostname> in environment production in 0.63 seconds
Notice: Local environment: 'prod' doesn't match server specified environment 'production', restarting agent run with environment 'production'
Error: Evaluation Error: Error while evaluating a Function Call, Could not find class ::foreman::params for <hostname>  at line 1:135 on node <hostname>
Error: Could not retrieve catalog from remote server: Evaluation Error: Error while evaluating a Function Call, Could not find class ::foreman::params for <hostname> at line 1:135 on node <hostname>
Error: Could not retrieve catalog; skipping run

[ERROR 2016-11-28 19:07:02 main] Could not get default values, cannot continue

This error happens since 1.13.2.

# hiera -V
3.2.2

# puppet -V
4.8.1

# rpm -qa | grep foreman | sort
foreman-1.13.2-1.el7.noarch
foreman-cli-1.13.2-1.el7.noarch
foreman-compute-1.13.2-1.el7.noarch
foreman-debug-1.13.2-1.el7.noarch
foreman-installer-1.13.2-1.el7.noarch
foreman-ovirt-1.13.2-1.el7.noarch
foreman-postgresql-1.13.2-1.el7.noarch
foreman-proxy-1.13.2-1.el7.noarch
foreman-release-1.13.2-1.el7.noarch
foreman-selinux-1.13.2-1.el7.noarch
tfm-rubygem-foreman_bootdisk-8.0.2-1.fm1_13.el7.noarch
tfm-rubygem-foreman_dhcp_browser-0.0.7-3.fm1_11.el7.noarch
tfm-rubygem-foreman_discovery-7.0.0-1.fm1_13.el7.noarch
tfm-rubygem-foreman_hooks-0.3.12-1.fm1_13.el7.noarch
tfm-rubygem-foreman_setup-5.0.0-1.fm1_13.el7.noarch
tfm-rubygem-foreman_templates-3.1.0-1.fm1_13.el7.noarch
tfm-rubygem-hammer_cli_foreman-0.8.0-1.el7.noarch
tfm-rubygem-hammer_cli_foreman_bootdisk-0.1.3-5.el7.noarch
tfm-rubygem-puppetdb_foreman-1.0.4-1.fm1_13.el7.noarch

Related issues

Related to Kafo - Bug #17967: show_diff disabled in 1.0.6, should be enabledClosed2017-01-06

Associated revisions

Revision 88f99aeb (diff)
Added by Dominic Cleal over 2 years ago

fixes #17504, #15619 - use generated puppet.conf when running Puppet (#197)

History

#1 Updated by Jan-Otto Kröpke almost 3 years ago

We have a custom environment defined in /etc/puppetlabs/puppet/puppet.conf

If I change the environment to production, i got no error.

#2 Updated by Dominic Cleal almost 3 years ago

  • Project changed from Foreman to Kafo

What configuration do you have exactly? It'd be useful to see your puppet.conf.

#3 Updated by Jan-Otto Kröpke almost 3 years ago

# cat /etc/puppetlabs/puppet/puppet.conf
### File managed with puppet ###
## Module:           'puppet'

[main]
    # Where Puppet's general dynamic and/or growing data is kept

    # Allow services in the 'puppet' group to access key (Foreman + proxy)
    privatekeydir = $ssldir/private_keys { group = service }
    hostprivkey = $privatekeydir/$certname.pem { mode = 640 }

    show_diff     = false

### Next part of the file is managed by a different template ###
## Module:           'puppet'

[agent]
    # The file in which puppetd stores a list of the classes
    # associated with the retrieved configuration.  Can be loaded in
    # the separate ``puppet`` executable using the ``--loadclasses``
    # option.
    # The default value is '$statedir/classes.txt'.
    classfile = $statedir/classes.txt

    # Where puppetd caches the local configuration.  An
    # extension indicating the cache format is added automatically.
    # The default value is '$confdir/localconfig'.
    localconfig = $vardir/localconfig

    # Disable the default schedules as they cause continual skipped
    # resources to be displayed in Foreman - only for Puppet >= 3.4
    default_schedules = false

    report            = true
    pluginsync        = true
    masterport        = 8140
    environment       = prod
    certname          = foreman1
    server            = puppet1
    listen            = false
    splay             = false
    splaylimit        = 1800
    runinterval       = 1800
    noop              = false
    usecacheonfailure = true

Maybe kafo should be define a own puppet.conf file to avoid conflicts with existing configuration?

btw. foreman-installer 1.13.0 works fine.

#4 Updated by The Foreman Bot almost 3 years ago

  • Status changed from New to Ready For Testing
  • Assignee set to Dominic Cleal
  • Pull request https://github.com/theforeman/kafo/pull/197 added

#5 Updated by Dominic Cleal over 2 years ago

  • Status changed from Ready For Testing to Closed
  • % Done changed from 0 to 100

#6 Updated by Dominic Cleal over 2 years ago

  • Related to Bug #17967: show_diff disabled in 1.0.6, should be enabled added

Also available in: Atom PDF