Skip to content

fix: install hiera-eyaml into puppetserver's JRuby gem-home (#148)#158

Merged
rwaffen merged 1 commit into
OpenVoxProject:mainfrom
bootc:fix/148-jruby-gem-path
Jun 26, 2026
Merged

fix: install hiera-eyaml into puppetserver's JRuby gem-home (#148)#158
rwaffen merged 1 commit into
OpenVoxProject:mainfrom
bootc:fix/148-jruby-gem-path

Conversation

@bootc

@bootc bootc commented Jun 26, 2026

Copy link
Copy Markdown
Member

Fixes #148.

Since #141, gems installed by openvoxserver/prep_release_container.sh via the distro gem land in the system CRuby gem path (e.g. /var/lib/gems/3.x), which is not on puppetserver's JRuby gem-path. Only openvox was being installed into the JRuby gem-home. As a result hiera-eyaml was invisible to the puppetserver JVM and eyaml-encrypted Hiera lookups failed during catalog compilation.

Changes

Install hiera-eyaml into the JRuby gem-home via puppetserver gem install, alongside the existing openvox install. These two are the only gems the puppetserver JVM loads at runtime.

hiera-eyaml is no longer installed under the distro Ruby at all — the server JVM is its only real consumer. The eyaml CLI is still available, exposed as a thin wrapper that runs the JRuby gem-home binstub under the distro Ruby with GEM_PATH pointed at the JRuby gem-home (a bare symlink would resolve the gem against the distro gem path, where it no longer lives). hiera-eyaml is a pure-Ruby gem, so it loads fine that way and the CLI avoids JVM start-up.

Everything else stays on the system CRuby gem path, because those gems back tools that run under the distro Ruby, not the JVM:

gem runtime that loads it gem path
openvox server JVM (puppet library) and puppet/facter CLIs both
hiera-eyaml server JVM (eyaml Hiera backend); eyaml CLI via distro-Ruby wrapper JRuby only
openvoxserver-ca puppetserver ca CLI (runs under distro Ruby) CRuby only
hocon dependency of puppetserver ca CRuby only
r10k r10k CLI CRuby only
rugged r10k dependency (native ext, cannot load on JRuby) CRuby only
racc, syslog Ruby 3.4+ stdlib replacements for the distro Ruby CRuby only

puppetserver ca is a CLI client: its cli/apps/ca app executes under /opt/puppetlabs/puppet/bin/ruby (the distro Ruby), so openvoxserver-ca and its hocon dependency must stay on the CRuby path — confirmed by the puppetserver ca -h LoadError when they were briefly moved JRuby-only.

🤖 Generated with Claude Code

@bootc bootc requested a review from a team as a code owner June 26, 2026 10:24
@bootc bootc marked this pull request as draft June 26, 2026 10:25
@bootc bootc force-pushed the fix/148-jruby-gem-path branch 2 times, most recently from 5f7c46f to 5eee225 Compare June 26, 2026 10:57
@bootc bootc changed the title fix: install JRuby-runtime gems into puppetserver's JRuby gem-home (#148) fix: install hiera-eyaml into puppetserver's JRuby gem-home (#148) Jun 26, 2026
@bootc bootc force-pushed the fix/148-jruby-gem-path branch 2 times, most recently from 2f9fc2a to 4e0e2b3 Compare June 26, 2026 11:16
…roject#148)

Since OpenVoxProject#141, gems installed by prep_release_container.sh land in the system
CRuby gem path (e.g. /var/lib/gems/3.x), which is not on puppetserver's
JRuby gem-path. As a result hiera-eyaml was invisible to the puppetserver
JVM and eyaml-encrypted Hiera lookups failed during catalog compilation.

Install hiera-eyaml into the JRuby gem-home via `puppetserver gem install`,
alongside the existing openvox install. These two gems are the only ones the
puppetserver JVM loads at runtime, and hiera-eyaml has no other consumer, so
it is no longer installed under the distro Ruby at all. The `eyaml` CLI is
exposed via a thin wrapper that runs the JRuby gem-home binstub under the
distro Ruby with GEM_PATH pointed at the JRuby gem-home (hiera-eyaml is a
pure-Ruby gem, so it loads fine there); a plain symlink would resolve the gem
against the distro gem path, where it no longer lives.

All other gems stay in the system CRuby gem path, where they are needed:
they back tools that run under the distro Ruby, not the JVM. In particular
`puppetserver ca` runs the cli/apps/ca app under /opt/puppetlabs/puppet/bin/ruby
(the distro Ruby), so openvoxserver-ca and its hocon dependency must remain on
the CRuby path; r10k/rugged and the puppet/facter CLIs likewise.

Fixes OpenVoxProject#148

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Signed-off-by: Chris Boot <bootc@boo.tc>
@bootc bootc force-pushed the fix/148-jruby-gem-path branch from 4e0e2b3 to 4218c53 Compare June 26, 2026 11:18
@bootc bootc marked this pull request as ready for review June 26, 2026 11:19
@rwaffen

rwaffen commented Jun 26, 2026

Copy link
Copy Markdown
Member

a bit talkative this claude. generating too much output. but the code looks ok to me.

@rwaffen rwaffen added the bug Something isn't working label Jun 26, 2026
@rwaffen rwaffen merged commit be3f81a into OpenVoxProject:main Jun 26, 2026
17 checks passed
@bootc bootc deleted the fix/148-jruby-gem-path branch June 26, 2026 21:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

prep_release_container.sh installs gems into the system CRuby path, invisible to puppetserver's JRuby (hiera-eyaml unusable)

2 participants