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

Refs #37291 - Reset Puppet's java_bin #922

Merged
merged 1 commit into from
Mar 22, 2024

Conversation

ekohl
Copy link
Member

@ekohl ekohl commented Mar 22, 2024

In theforeman/puppet 19.2.0 the puppet::server_jvm_java_bin parameter was changed to undef and determined at runtime. This helps with Puppet 8 upgrades.

In theforeman/puppet 19.2.0 the puppet::server_jvm_java_bin parameter
was changed to undef and determined at runtime. This helps with Puppet 8
upgrades.
@ekohl
Copy link
Member Author

ekohl commented Mar 22, 2024

Commit message assumes theforeman/puppet-puppet#911 is merged & released

@evgeni
Copy link
Member

evgeni commented Mar 22, 2024

/packit build

@ekohl
Copy link
Member Author

ekohl commented Mar 22, 2024

I think this is unrelated:

Red Hat Enterprise Linux - BaseOS               3.1 MB/s | 3.1 kB     00:00    
Traceback (most recent call last):
  File "/usr/bin/dnf-3", line 62, in <module>
    main.user_main(sys.argv[1:], exit_code=True)
  File "/usr/lib/python3.12/site-packages/dnf/cli/main.py", line 208, in user_main
    errcode = main(args)
              ^^^^^^^^^^
  File "/usr/lib/python3.12/site-packages/dnf/cli/main.py", line 67, in main
    return _main(base, args, cli_class, option_parser_class)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/site-packages/dnf/cli/main.py", line 106, in _main
    return cli_run(cli, base)
           ^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/site-packages/dnf/cli/main.py", line 130, in cli_run
    ret = resolving(cli, base)
          ^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/site-packages/dnf/cli/main.py", line 183, in resolving
    base.do_transaction(display=displays)
  File "/usr/lib/python3.12/site-packages/dnf/cli/cli.py", line 238, in do_transaction
    self.gpgsigcheck(install_pkgs)
  File "/usr/lib/python3.12/site-packages/dnf/cli/cli.py", line 294, in gpgsigcheck
    self._get_key_for_package(po, fn)
  File "/usr/lib/python3.12/site-packages/dnf/base.py", line 2533, in _get_key_for_package
    keys = dnf.crypto.retrieve(keyurl, repo)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/site-packages/dnf/crypto.py", line 137, in retrieve
    keyinfos = rawkey2infos(handle)
               ^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/site-packages/dnf/crypto.py", line 127, in rawkey2infos
    keys = libdnf.repo.Key.keysFromFd(key_fo.fileno())
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib64/python3.12/site-packages/libdnf/repo.py", line 341, in keysFromFd
    return _repo.Key_keysFromFd(fileDescriptor)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
RuntimeError: Parsing armored OpenPGP packet(s) failed

@evgeni
Copy link
Member

evgeni commented Mar 22, 2024

Yeah, pretty sure it is. I was just curious if it was a fluke.

@ekohl
Copy link
Member Author

ekohl commented Mar 22, 2024

I just tried this out on a previously broken centos9-stream-foreman-nightly and it passed after:

# grep JAVA_BIN /etc/sysconfig/puppetserver
JAVA_BIN=/usr/lib/jvm/jre-17/bin/java
# pgrep --list-full java
5902 /usr/lib/jvm/jre-17/bin/java --add-opens java.base/sun.nio.ch=ALL-UNNAMED --add-opens java.base/java.io=ALL-UNNAMED -Xms2G -Xmx2G -Dcom.redhat.fips=false -Djruby.logger.class=com.puppetlabs.jruby_utils.jruby.Slf4jLogger -XX:ReservedCodeCacheSize=512m -Dlogappender=F1 -XX:+CrashOnOutOfMemoryError -XX:ErrorFile=/var/log/puppetlabs/puppetserver/puppetserver_err_pid%p.log -cp /opt/puppetlabs/server/apps/puppetserver/puppet-server-release.jar:/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/facter.jar:/opt/puppetlabs/server/data/puppetserver/jars/* clojure.main -m puppetlabs.trapperkeeper.main --config /etc/puppetlabs/puppetserver/conf.d --bootstrap-config /etc/puppetlabs/puppetserver/services.d/,/opt/puppetlabs/server/apps/puppetserver/config/services.d/ --restart-file /opt/puppetlabs/server/data/puppetserver/restartcounter

@ekohl ekohl merged commit 1931059 into theforeman:develop Mar 22, 2024
3 of 4 checks passed
@ekohl ekohl deleted the 37291-java-version branch March 22, 2024 18:42
@@ -0,0 +1,3 @@
if answers['puppet'].is_a?(Hash) && answers['puppet']['server_jvm_java_bin']
Copy link
Member

Choose a reason for hiding this comment

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

should this be

if answers['puppet'].is_a?(Hash) && answers['puppet']['server_jvm_java_bin'] == '/usr/bin/java'

Copy link
Member Author

Choose a reason for hiding this comment

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

Oops. Still doesn't explain why AlmaLinux didn't work

Copy link
Member

Choose a reason for hiding this comment

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

Yeah, I just went looking and thought "oh, wait" :)

Copy link
Member Author

Choose a reason for hiding this comment

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants