-
Notifications
You must be signed in to change notification settings - Fork 229
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
Support Puppet 7 #779
Support Puppet 7 #779
Conversation
@ekohl I'm working on this as well. I've issued a few rather trivial metadata.json PRs which make Kafo happy about Puppet version requirements. I was able to run our own puppetmaster-installer fine, but it fails with authorization errors. I'll look into that more tomorrow. If you have anything work in progress / unpushed let me know so that we can coordinate the work 😄. |
I haven't had time so all my work is here. Fact uploading is certainly broken right now. I do have some code for it and started theforeman/puppet-foreman#925 but puppetserver isn't writing out the files on my server and I couldn't figure it out until now. |
Also linking it back here: https://community.theforeman.org/t/puppet-7-support/22786 |
5831503
to
ab542a4
Compare
I pushed the cadir handling, but haven't had a chance to test it. That's why it's still a draft and not checked off. |
I believe this is now ready. Let's see if the tests agree. |
case ENV['BEAKER_PUPPET_COLLECTION'] | ||
when 'puppet7' | ||
from_version = '7.0.0' | ||
to_version = '7.2.0' | ||
when 'puppet6' | ||
from_version = '6.7.0' | ||
to_version = '6.7.2' | ||
when 'puppet5' | ||
from_version = '5.3.6' | ||
to_version = '5.3.7' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Somehow this finds puppet6 on Debian builds but not on CentOS. I don't understand why yet. There is a default is set here so perhaps it's not propagating somehow.
from_version = "5.3.6-1#{fact('lsbdistcodename')}" | ||
to_version = "5.3.7-1#{fact('lsbdistcodename')}" | ||
from_version_exact = "6.7.0-1#{fact('lsbdistcodename')}" | ||
to_version_exact = "6.7.2-1#{fact('lsbdistcodename')}" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ekohl Is this not the reason it is finding puppet6 on Debian? As this code says, when its Debian always use these versions.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That explains it. I'm not sure how I missed that when writing it.
I think the max open file limit is failing on Puppet 5 because it's pulling in camptocamp/systemd 3 (bd359f0) which has dropped support for Puppet 5. However, it is odd that it's failing here and not in master. |
This was never built so there's nothing to test
This was already true for AIO packages, but at least in Debian 10 and Fedora 33's non-AIO packages this is also true.
In Puppetserver 7 the legacy auth.conf has been removed. This also means the use-legacy-auth-conf setting is useless.
These are present in the default Puppetserver 7 auth.conf.
CentOS 6 build failures are expected, just like Puppet 5 + Ubuntu 20.04. Rest is still running. If they're green, I think this should be merged. |
Looks like down to just |
Looks like this is repeatable. The debug log:
However, when I run it later: # systemctl cat puppetserver
# Warning: puppetserver.service changed on disk, the version systemd has loaded is outdated.
# This output shows the current version of the unit's original fragment and drop-in files.
# If fragments or drop-ins were added or removed, they are not properly reflected in this output.
# Run 'systemctl daemon-reload' to reload units.
# /lib/systemd/system/puppetserver.service
...
# systemctl show --property=NeedDaemonReload -- puppetserver
NeedDaemonReload=yes
# cat /etc/systemd/system/puppetserver.service.d/limits.conf
[Service]
LimitNOFILE=32143 This looks like a real edge case and I'm not sure where it comes from. Race condition with systemd itself? |
Fun. I had seen this similar error with a Puppet 5 test so I agree it must be a bit of a race condition. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will let you merge in case anything needs to be squashed.
I found a minimal reproducer: # ls /etc/systemd/system/puppetserver.service.d
limits.conf
mv /etc/systemd/system/puppetserver.service.d ~ && systemctl show --property=NeedDaemonReload -- puppetserver
NeedDaemonReload=yes
# systemctl daemon-reload
# mv ~/puppetserver.service.d /etc/systemd/system/puppetserver.service.d && systemctl show --property=NeedDaemonReload -- puppetserver
NeedDaemonReload=no
# systemctl cat puppetserver
# /lib/systemd/system/puppetserver.service
#
# Local settings can be configured without being overwritten by package upgrades, for example
# if you want to increase puppetserver open-files-limit to 10000,
# you need to increase systemd's LimitNOFILE setting, so create a file named
# "/etc/systemd/system/puppetserver.service.d/limits.conf" containing:
# [Service]
# LimitNOFILE=10000
# You can confirm it worked by running systemctl daemon-reload
# then running systemctl show puppetserver | grep LimitNOFILE
#
[Unit]
Description=puppetserver Service
After=syslog.target network.target nss-lookup.target
[Service]
Type=forking
EnvironmentFile=/etc/default/puppetserver
User=puppet
TimeoutStartSec=300
TimeoutStopSec=60
Restart=on-failure
StartLimitBurst=5
PIDFile=/var/run/puppetlabs/puppetserver/puppetserver.pid
# https://tickets.puppetlabs.com/browse/EZ-129
# Prior to systemd v228, TasksMax was unset by default, and unlimited. Starting in 228 a default of '512'
# was implemented. This is low enough to cause problems for certain applications. In systemd 231, the
# default was changed to be 15% of the default kernel limit. This explicitly sets TasksMax to 4915,
# which should match the default in systemd 231 and later.
# See https://github.com/systemd/systemd/issues/3211#issuecomment-233676333
TasksMax=4915
#set default privileges to -rw-r-----
UMask=027
ExecReload=/opt/puppetlabs/server/apps/puppetserver/bin/puppetserver reload
ExecStart=/opt/puppetlabs/server/apps/puppetserver/bin/puppetserver start
ExecStop=/opt/puppetlabs/server/apps/puppetserver/bin/puppetserver stop
KillMode=process
SuccessExitStatus=143
StandardOutput=syslog
[Install]
WantedBy=multi-user.target
# systemctl daemon-reload
# systemctl cat puppetserver
# /lib/systemd/system/puppetserver.service
#
# Local settings can be configured without being overwritten by package upgrades, for example
# if you want to increase puppetserver open-files-limit to 10000,
# you need to increase systemd's LimitNOFILE setting, so create a file named
# "/etc/systemd/system/puppetserver.service.d/limits.conf" containing:
# [Service]
# LimitNOFILE=10000
# You can confirm it worked by running systemctl daemon-reload
# then running systemctl show puppetserver | grep LimitNOFILE
#
[Unit]
Description=puppetserver Service
After=syslog.target network.target nss-lookup.target
[Service]
Type=forking
EnvironmentFile=/etc/default/puppetserver
User=puppet
TimeoutStartSec=300
TimeoutStopSec=60
Restart=on-failure
StartLimitBurst=5
PIDFile=/var/run/puppetlabs/puppetserver/puppetserver.pid
# https://tickets.puppetlabs.com/browse/EZ-129
# Prior to systemd v228, TasksMax was unset by default, and unlimited. Starting in 228 a default of '512'
# was implemented. This is low enough to cause problems for certain applications. In systemd 231, the
# default was changed to be 15% of the default kernel limit. This explicitly sets TasksMax to 4915,
# which should match the default in systemd 231 and later.
# See https://github.com/systemd/systemd/issues/3211#issuecomment-233676333
TasksMax=4915
#set default privileges to -rw-r-----
UMask=027
ExecReload=/opt/puppetlabs/server/apps/puppetserver/bin/puppetserver reload
ExecStart=/opt/puppetlabs/server/apps/puppetserver/bin/puppetserver start
ExecStop=/opt/puppetlabs/server/apps/puppetserver/bin/puppetserver stop
KillMode=process
SuccessExitStatus=143
StandardOutput=syslog
[Install]
WantedBy=multi-user.target
# /etc/systemd/system/puppetserver.service.d/limits.conf
[Service]
LimitNOFILE=32143 So it looks like the For now I'll add the daemon reload as a workaround, but this may be a systemd bug. |
Config is testing the same thing latest and there's no need to clean the entire puppetserver in between. This speeds up the execution time. The upgrade tests are combined into a single file and also includes Puppet 7 upgrade tests now.
It can be determined on the fly. This will be needed if the ca directory becomes configurable.
Soon this will be needed in the ssl file location determination.
This is closer to the real version.
In Puppetserver 7 the CA directory was changed from $ssldir/ca to $puppetserver_dir/ca. This makes it safer to wipe $ssldir without also wiping your entire CA.
https://puppet.com/docs/puppet/7.4/server/release_notes.html
/etc/puppetlabs/puppetserver/ca