Some Puppet Classes are unavailable in the selected environment

Problem:

Hi,
On HostGroup [puppet ENC], i have this message :
“Some Puppet Classes are unavailable in the selected environment”

I have no errors in my classes.
Everything is working fine.

How can I correct this warning?
Thanks

Foreman and Proxy versions:
foreman 3.0 - puppet 7.11 - ubuntu 20.04

Foreman and Proxy plugin versions:

Distribution and version:

Other relevant data:

1 Like

I specify that all the classes are in the production environment

Hey @Sebseb
Welcome to the community!

Are you a new user or have you upgraded?
Are you saying that it makes no material different but you’re getting this error message you don’t understand?

Hi @mcorr

i did a fresh install, ubuntu 20.04 + foreman 3.0 + open source 7.11 puppet

I don’t understand why foreman displays this warning.

I would say the puppet environment you have selected on the “Host Group” tab for this host group does not contain some of those classes.

Either, you have selected the wrong environment there or you haven’t imported the classes into foreman from the Puppet - Environment or Puppet - Classes page.

1 Like

hi @gvde

All the classes are in the production environment and they have all been imported with the import environment button from foreman

Did you import the latest version? Just import again and it shows you if it‘s up to date or not.

Did you select the production environment for the host group? (Don’t confuse it with the life cycle environment if you have…)

everything is perfectly up to date and the environment is correctly declared in the host groups…

image

I am having the same issue.

Foreman 3.0.0
Puppet 6.17.0
Ubuntu 20.04

Host Groups with directly included classes display the warning “Some Puppet Classes are unavailable in the selected environment”. Puppet itself runs fine and the classes are applied to the hosts without error when puppet agent runs.

I have confirmed the Host Group environment and class environments all match “production”. I have tried removing and re-adding the classes from the Host Group. I have tried removing the classes from Foreman and re-importing them. It makes no difference.

On nested Host Groups, where the same classes are inherited, the warning does not appear. It only appears on Host Groups where classes are directly included (screenshots below to demonstrate this).

image

Screenshot below shows how the warning is not present on the same classes when they are inherited from a parent Host Group.

image

This is a fresh Foreman/Puppet install on Ubuntu 20.04 following the quickstart guide: Foreman :: Quickstart

@hermz @Sebseb Which version of the foreman_puppet plugin are you using?

1 Like

I tried to reproduce this, but was not successful. Did you try running your Foreman in private mode or clearing the browser cache? Maybe it is a JS issue.

1 Like

I have the exact same behaviour as @hermz on two different fresh 3.1/4.3RC4 installs on Rocky Linux 8.5. Everything works fine, classes get applied to hosts so is appears there is something fishy with the puppet plugin. This behaviour occurs for any hostgroup regardless if it is nested, top level, or a unique/individual hostgroup.

I did see something odd when doing the following:

  • New install, single environment “production” with a couple of classes added to the “Base” hostgroup

  • Created a new environment called “testing” with no classes

  • Created a new hostgroup called “Edited Internal” with “Base” as the parent

  • Edited the “Edited Internal” hostgroup. A single error symbol was displayed beside the Puppet ENC tab. Going into the Puppet ENC tabs displays the “Some Puppet Classes are unavailable in the selected environment” error

  • Changed the Environment of the “Edited Internal” hostgrpoup from “production” to “testing” and two error symbols appeared on the Puppet ENC tab. Going into the Puppet ENC tabs displays a single “Some Puppet Classes are unavailable in the selected environment” error. No other errors displayed

  • Saved the “Edited Internal” hostgroup

  • Edited the “Edited Internal” hostgroup again. A single error symbol was displayed beside the Puppet ENC tab.

  • Changed the environment of “Edited Internal” from “testing” back to “production” and the error symbol disappeared

  • Saved the “Edited Internal” hostgroup

  • Edited the “Edited Internal” hostgroup again. A single error symbol was displayed beside the Puppet ENC tab.

  • The same behaviour occurs if you edit the hostgroup and change the environment from “inherited” to “production”. The error symbol disappears but will re-appear when you re-edit the hostgroup.

candlepin-4.1.8-1.el8.noarch
candlepin-selinux-4.1.8-1.el8.noarch
foreman-3.1.0-1.el8.noarch
foreman-cli-3.1.0-1.el8.noarch
foreman-debug-3.1.0-1.el8.noarch
foreman-dynflow-sidekiq-3.1.0-1.el8.noarch
foreman-installer-3.1.0-1.el8.noarch
foreman-installer-katello-3.1.0-1.el8.noarch
foreman-postgresql-3.1.0-1.el8.noarch
foreman-proxy-3.1.0-1.el8.noarch
foreman-release-3.1.0-1.el8.noarch
foreman-service-3.1.0-1.el8.noarch
katello-4.3.0-0.6.rc4.el8.noarch
katello-certs-tools-2.8.2-1.el8.noarch
katello-client-bootstrap-1.7.7-1.el8.noarch
katello-common-4.3.0-0.6.rc4.el8.noarch
katello-debug-4.3.0-0.6.rc4.el8.noarch
katello-repos-4.3.0-0.2.rc4.el8.noarch
python38-pulp-ansible-0.10.1-1.el8.noarch
python38-pulp-certguard-1.5.1-1.el8.noarch
python38-pulp-container-2.9.0-1.el8.noarch
python38-pulp-deb-2.16.0-1.el8.noarch
python38-pulp-file-1.10.1-1.el8.noarch
python38-pulp-python-3.5.2-1.el8.noarch
python38-pulp-rpm-3.16.1-1.el8.noarch
python38-pulpcore-3.16.1-1.el8.noarch
qpid-proton-c-0.35.0-1.el8.x86_64
rubygem-foreman-tasks-5.2.0-1.fm3_1.el8.noarch
rubygem-foreman_host_reports-0.0.4-1.fm3_1.el8.noarch
rubygem-foreman_maintain-0.9.2-1.el8.noarch
rubygem-foreman_puppet-2.0.0-1.fm3_1.el8.noarch
rubygem-foreman_remote_execution-5.0.1-1.fm3_1.el8.noarch
rubygem-foreman_setup-7.0.0-3.fm2_5.el8.noarch
rubygem-hammer_cli-3.1.0-1.el8.noarch
rubygem-hammer_cli_foreman-3.1.0-1.el8.noarch
rubygem-hammer_cli_foreman_remote_execution-0.2.2-1.fm3_0.el8.noarch
rubygem-hammer_cli_foreman_tasks-0.0.16-1.fm3_0.el8.noarch
rubygem-hammer_cli_katello-1.3.1-1.el8.noarch
rubygem-katello-4.3.0-0.5.rc4.el8.noarch
rubygem-pulp_ansible_client-0.10.1-1.el8.noarch
rubygem-pulp_certguard_client-1.5.0-1.el8.noarch
rubygem-pulp_container_client-2.9.0-1.el8.noarch
rubygem-pulp_deb_client-2.16.0-1.el8.noarch
rubygem-pulp_file_client-1.10.0-1.el8.noarch
rubygem-pulp_ostree_client-2.0.0-0.1.a1.el8.noarch
rubygem-pulp_python_client-3.5.2-1.el8.noarch
rubygem-pulp_rpm_client-3.16.1-1.el8.noarch
rubygem-pulpcore_client-3.16.0-1.el8.noarch
rubygem-qpid_proton-0.35.0-1.el8.x86_64
rubygem-smart_proxy_pulp-3.2.0-1.fm3_1.el8.noarch

Any news on this?

Problem:
We are expiring the same problem. Puppet ENC shows:
‘Some Puppet Classes are unavailable in the selected environment’

Foreman and Proxy versions:
Foreman 3.1.0

Foreman and Proxy plugin versions:
foreman_puppet Version: 2.0.0

Distribution and version:
Description: CentOS Linux release 7.9.2009 (Core)

Other relevant data:
The error occurred for the first time after upgrading to 3.0.1.
Upgrading to 3.1.0 did not fix the problem.

We’ve just notice this today on Foreman 3.1. We’d previously been doing battle with other problems that resulted in us upgrading a few versions so I can’t be sure exactly where the bug (if indeed it is a bug) was introduced but we see no parameters now under our top level host group with the same error against Puppet ENC: Some Puppet Classes are unavailable in the selected environment

Looks like a bug to me. Opened Bug #34402: Hostgroup error: Some Puppet Classes are unavailable in the selected environment - Puppet - Foreman

1 Like

Same issue for me with 3.1.2

Hi,
any progress with this? Got the same issue on nightly, 3.3, 3.2, tested on ubuntu 20.4, debian 11 and 10 :frowning:

You do realize, that this is a “non-issue”? The message is incorrect. You can simply ignore it.