Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement foreman test environment #1047

Open
wants to merge 3 commits into
base: production
Choose a base branch
from

Conversation

bastelfreak
Copy link
Contributor

I added an INSTALL.md with some instructions. This doesn't pass yet. So far this works:

puppet agent -t accounts,prometheus,chrony,yumrepo,auditd,tftp,convenience,debugutils,rsyslog,discovery,puppetserver,host,irqbalance,ssh,lldpd,sysstat

Somehow something breaks the dynflow database if I apply the whole catalog and then foreman doesn't start anymore. I will investigate next week.

@bastelfreak bastelfreak force-pushed the bastelfreak branch 2 times, most recently from a41c107 to 4d1ed9a Compare February 11, 2024 14:57
@bastelfreak bastelfreak marked this pull request as ready for review February 11, 2024 19:25
@bastelfreak
Copy link
Contributor Author

bastelfreak commented Feb 11, 2024

@jhoblitt this works for me now:

[root@lsst ~]# puppet agent -t
Info: Using environment 'bastelfreak'
Info: Retrieving pluginfacts
Info: Retrieving plugin
Info: Loading facts
Warning: Facter: invalid or malformed lldp data: MalformedDataError: no lldp interface data found
Warning: The current total number of facts: 2490 exceeds the number of facts limit: 2048
Notice: Requesting catalog from $host:8140 ($ip)
Notice: Catalog compiled by $host
Info: Caching catalog for $host
Info: Applying configuration version '1707679430'
Notice: System Reboot Required Because:
  audit => modified
Notice: Applied catalog in 24.96 seconds
[root@lsst ~]#

There were a few minor hiera changes and I had to update the theforeman/foreman module. I only tested the latest version 24.1.0. The majority of the changes are related to the apache in front of foreman, not foreman itself.

I also think that the foreman module has some ordering issues and cannot apply the foreman_config_entry during the first puppet run and a bunch of foreman related packages are installed afterwards. I didn't dig too deep into this. They were all applied without issues during the second run and the third one is idempotent and has no changes.

To make the testing a bit easier, I made a few of your profiles optional/opt-out and provided those changes as dedicated PRs:

@bastelfreak bastelfreak force-pushed the bastelfreak branch 2 times, most recently from 518a00e to 62c5330 Compare February 11, 2024 19:39
@@ -81,6 +81,7 @@ foreman::oauth_active: true
#foreman::oauth_consumer_key: # secret
#foreman::oauth_consumer_secret: # secret
foreman::passenger: false # use puma; param removed in theforman/foreman >= 17.0.0
# we need to figure out how to configure columns in newer foreman versions
foreman::plugin::column_view::columns:
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the plugin doesn't exist anymore because the code moved into foreman core. The Hiera data is currently unused. I didn't investigate yet how to configure the columns on modern foreman.

@bastelfreak bastelfreak force-pushed the bastelfreak branch 2 times, most recently from 7db292f to f9b9e74 Compare February 11, 2024 22:54
@bastelfreak
Copy link
Contributor Author

For what it's worth, an upgrade to 3.9.1 works as well:

$ git diff bastelfreak -- hieradata/site/test.yaml
diff --git a/hieradata/site/test.yaml b/hieradata/site/test.yaml
index 9c8d5879..fe389676 100644
--- a/hieradata/site/test.yaml
+++ b/hieradata/site/test.yaml
@@ -28,8 +28,8 @@ profile::core::yum::versionlock:
     release: "1.el8"
     before: "Package[puppetdb-termini]"

-foreman::repo::repo: "3.8"
-foreman::version: "3.8.0"
+foreman::repo::repo: "3.9"
+foreman::version: "3.9.1"
 puppetdb::globals::version: '7.16.0'

 profile::core::common::manage_sssd: false

@jhoblitt jhoblitt added the enhancement New feature or request label Feb 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants