-
Notifications
You must be signed in to change notification settings - Fork 6
Javafoo #61
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
Draft
bastelfreak
wants to merge
25
commits into
OpenVoxProject:main
Choose a base branch
from
bastelfreak:javafoo
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Javafoo #61
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
fcf4670 to
ef259d9
Compare
bastelfreak
added a commit
to bastelfreak/ezbake
that referenced
this pull request
Jan 2, 2026
This reverts commit e43660e. e43660e added a denylist for needrestart to ignore openvoxdb/openvoxserver. Both services write files into /tmp/, which triggered service restarts, that were not required. Since puppetlabs/ezbake@bf1a75d, both services use the PrivateTmp feature from systemd, that makes the denylist obsolete. This now ensures that needsrestart will restart openvoxdb/openvoxserver on Java updates. That will fix puppetlabs/puppetserver#2900. (cherry picked from commit 2ff6317) --- This is cherry-picked from OpenVoxProject#61 and was originally added in OpenVoxProject#12
bastelfreak
added a commit
to bastelfreak/ezbake
that referenced
this pull request
Jan 2, 2026
(cherry picked from commit fcbd7e9) This is cherry-picked from OpenVoxProject#61 and was originally added in OpenVoxProject#16 --- Delete more PE leftovers (cherry picked from commit 48036a8) this is cherry-picked from OpenVoxProject#61 and was originally added in OpenVoxProject#18
fc6b548 to
94d21e0
Compare
These service wrappers only replicate the default systemd behavior. Running it directly simplifies it greatly because it also drops the need to manage the rundir, which systemd will now take care of for us.
This reverts commit e43660e. e43660e added a denylist for needrestart to ignore openvoxdb/openvoxserver. Both services write files into /tmp/, which triggered service restarts, that were not required. Since puppetlabs/ezbake@bf1a75d, both services use the PrivateTmp feature from systemd, that makes the denylist obsolete. This now ensures that needsrestart will restart openvoxdb/openvoxserver on Java updates. That will fix puppetlabs/puppetserver#2900.
This removes Jenkins related rake tasks that Perforce used. I haven't tested this and I don't know if there are more tasks we can remove, e.g. https://github.com/OpenVoxProject/ezbake/blob/main/resources/puppetlabs/lein-ezbake/template/global/tasks/integration.rake
This fixes a regression introduced in OpenVoxProject#5 / b2de7c7 openvox-server has some ERB templates: https://github.com/OpenVoxProject/openvox-server/tree/main/resources/ext/cli and since above change, they aren't rendered anymore. The templates are still required and builds fail.
The Gemfile is a template. For every ezbake based build, the Gemfile is copied into the build dir. Aftwards the gems are installed. the packaging gem is used to publish packages, update repos and render different templates, e.g. the systemd unit files for openvox-server and openvox-db. As far as I know, the erb template rendering is the only feature from packaging that we use. I didn't want to deal with a new gem name yet, the packaging rubygems namespace is already owned by Perforce: https://rubygems.org/gems/packaging I assume in the long term we will get rid of packaging, so I didn't bother with renaming the gem. Because of that, we cannot publish it to rubygems.org right. Because of that the Gemfile now uses `github:` to fetch the release from there.
The `/usr` directory contains only two files: ``` /usr /usr/lib /usr/lib/tmpfiles.d /usr/lib/tmpfiles.d/puppetserver.conf /usr/share /usr/share/doc /usr/share/doc/openvox-server /usr/share/doc/openvox-server/changelog.gz ``` Since OpenVoxProject#5, we don't package /usr/lib/tmpfiles.d/puppetserver.conf anymore. And the changelog.gz is autogenerated by fpm afterwards. That means that in our packaging directory, there is no `/usr`. If we force fpm to package it, it will raise an error. This change was tested in https://github.com/OpenVoxProject/openvox-server
Making it a config option allows for differentation. The comment for version 8 was outdated, since puppetserver 8 refuses to start up with Java 8.
The EnvironmentFile paths are config locations so if a user ever modified them, they're not replaced. By defining this in the service file, the packaging will update the location. The result is that even if a java location changes that a simple yum/apt upgrade will respect the new value in most situations.
In OpenVoxProject@6b3ad93 we introduced a new configuration option for java_bin. To get this working, we need to add it to ezbake itself. Otherwise the variable won't exist and we cannot use it in templates: ``` ExecStart= $JAVA_ARGS $LOG_APPENDER \ '-XX:OnOutOfMemoryError=kill -9 %p' -XX:+CrashOnOutOfMemoryError \ -XX:ErrorFile="$LOGS_DIRECTORY/puppetserver_err_pid%p.log" \ -cp "$INSTALL_DIR/puppet-server-release.jar" \ clojure.main \ -m puppetlabs.trapperkeeper.main \ --config "$CONFIG" \ --bootstrap-config "$BOOTSTRAP_CONFIG" \ $TK_ARGS ``` (see the whitespace after `ExecStart=` where the java path should be.
ezbake-functions.sh.erb uses the deprecated netstat from the deprecated net-tools package. But I can't find any uses of the functions in ezbake-functions.sh.erb, so let's remove it. The functions were used in the wrappers which were eliminated in OpenVoxProject#5. Fixes OpenVoxProject#13.
Fixes: b2de7c7 ("Drop service wrappers")
This was initially set in /opt/puppetlabs/server/apps/puppetserver/cli/apps/foreground and went missing during b2de7c7 Thix fixes a regression.
In the ezbake config we define the desired Java binary location, but we don't always have access to this so it still needs some fallback.
In 9768a77 the java binary was overridden, but this didn't have a point because it's not available when the files are rendered. They only have access to the ezbake config. This takes an approach of patching the files after the fact. It writes out backup files that are restored after. That is to deal with the fact that our build process isn't clean and is reused between multiple builds. Fixes: 9768a77 ("Use virtual Java packages on Red Hat and set java_bin")
foreground is a subcommand for openvox-server and openvoxdb. This this a public interface to our users and removing it is a breaking change. This fixes a regression introduced in b2de7c7
This is a regression from b2de7c7 Previously we had `ext/cli_defaults/*.erb`. This is still required because openvox-server ships a file there: https://github.com/OpenVoxProject/openvox-server/blob/main/resources/ext/cli_defaults/cli-defaults.sh.erb
This fixes a regression from b2de7c7 where we removed the reload script. Now that we don't fork anymore, we can just rely on `$MAINPID`, which is a variable provided by systemd. see https://www.freedesktop.org/software/systemd/man/latest/systemd.service.html#ExecReload=
…also make it work on busybox/alpine
With the merge of OpenVoxProject/trapperkeeper#23, we can switch to notify. Then the service will notify systemd when the service is actually started.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is a rebase of the https://github.com/OpenVoxProject/ezbake/tree/dev branch against main