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?
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.
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).
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.
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
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.
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