Puppetserver mixes up modules of different environments #80
-
We have been using Puppet for 10+ years now without much troubles on the server sider. However, since updating to Puppet 7 (currently on puppetserver version 7.17.2 on Ubuntu 22.04) we are having troubles with our environments. It seems that the puppetserver uses code from one environment for other environments. We have two main environments: jammy and noble (for the respective Ubuntu versions). The jammy version worked fine until we introduced the noble environment and used updated modules there. It will probably apply to any module but to illustrate the problem I will use the https://forge.puppet.com/modules/puppetlabs/firewall module. The jammy environment uses version 4.0.1 of the firewall module which still uses "provider" instead of "protocol". The noble environment uses version 8.0.2 of the firewall module which has transitioned to using "protocol" over "provider". So when I run
So I'm not sure while there is the error on the first run but the second and further runs work okay. If I then run puppet on a noble host, I get this:
It complains about the invalid parameter "protocol" because the puppetserver somehow uses the firewall module from jammy which still uses "provider". Note that the When doing it the other way around, i.e. starting with the noble host, running the puppet agent on a jammy host leads to a failure because now the firewall module from noble is used. We have looked through the documentation and issues to find a solution for this but were unsuccessful so far. As seen above it looks like the separation of the code of the environments doesn't work but we don't know why. I thought that the configuration option "environment_timeout" might be at fault but it is not changed from its default value of 0. Has anybody experienced this or something similar? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
How do you deploy code and manage modules versions to the Puppet server? |
Beta Was this translation helpful? Give feedback.
Thanks! We are using r10k+puppetfile but that doesn't seem to be the problem.
I now started to re-create our environment from scratch, adding one module at a time and running on a test client to see what happens. The first few modules were okay.
Then I installed puppetlabs-concat version 7.4.0. This version defines a parameter named "create_empty_file". In our jammy environment we also have puppetlabs-concat but version 7.3.0 which doesn't have that parameter.
When I now run the agent on the client: