Jira (PDB-5630) RHEL Platform 7 to Platform 8 upgrade failure

11 views
Skip to first unread message

Austin Blatt (Jira)

unread,
Apr 17, 2023, 5:00:03 PM4/17/23
to puppe...@googlegroups.com
Austin Blatt created an issue
 
PuppetDB / Bug PDB-5630
RHEL Platform 7 to Platform 8 upgrade failure
Issue Type: Bug Bug
Assignee: Unassigned
Created: 2023/04/17 1:59 PM
Priority: Normal Normal
Reporter: Austin Blatt

Problem: On RedHat-based OSes, PuppetDB fails to start after upgrading from Platform 7 to Platform 8. EZBake controls which java we run with by setting JAVA_BIN to /usr/bin/java in our service defaults. On Debian and Redhat (at least), this is actually a symlink to java controlled by update-alternatives and alternatives respectively. RedHat's Java 8 package still has a higher alternatives priority than Java 11, so even though our PuppetDB 8 packages install java 11, the symlink at /usr/bin/java is not updated and we continue trying to use java 8. This breaks because HikariCP was updated to a version that does not run on java 8 anymore. It is also possible that we would hit this on Debian-based OSes on any installation where an admin has manually selected java 8.

Add Comment Add Comment
 
This message was sent by Atlassian Jira (v8.20.11#820011-sha1:0629dd8)
Atlassian logo

Austin Blatt (Jira)

unread,
Apr 17, 2023, 5:05:02 PM4/17/23
to puppe...@googlegroups.com
Austin Blatt updated an issue
Change By: Austin Blatt
Problem: On RedHat-based OSes, PuppetDB fails to start after upgrading from Platform 7 to Platform 8. EZBake controls which java we run with by setting JAVA_BIN to /usr/bin/java in our service defaults. On Debian and Redhat (at least), this is actually a symlink to java controlled by update-alternatives and alternatives respectively. RedHat's Java 8 package still has a higher alternatives priority than Java 11, so even though our PuppetDB 8 packages install java 11, the symlink at /usr/bin/java is not updated and we continue trying to use java 8. This breaks because HikariCP was updated to a version that does not run on java 8 anymore. It is also possible that we would hit this on Debian-based OSes on any installation where an admin has manually selected java 8.


This does not affect PE because the hard-coded path in EZBake is to pe-java and not a java managed by update-alternatives.

Option 1: Guide users through the problem manually with documentation. On RedHat, they could be instructed to install java 11 and select it as the preferred java. Con: module upgrades will not work without manual intervention.

Option 2: We can use the output of the alternatives cli tools to "sniff" out available java versions and select one that will work for us even if the user has an incompatible java selected as the default java. In this case we would remove EZBake's hard-coded JAVA_BIN setting, but allow users to override the sniffing by setting JAVA_BIN themselves (this will also maintain their ability to use a java that is not registered with the alternatives programs.

Open questions: SLES?

Rob Browning (Jira)

unread,
Apr 17, 2023, 5:18:02 PM4/17/23
to puppe...@googlegroups.com
Rob Browning updated an issue
Change By: Rob Browning
Problem: On RedHat-based OSes, PuppetDB fails to start after upgrading from Platform 7 to Platform 8. EZBake controls which java we run with by setting JAVA_BIN to /usr/bin/java in our service defaults. On Debian and Redhat (at least), this is actually a symlink to java controlled by update-alternatives and alternatives respectively. RedHat's Java 8 package still has a higher alternatives priority than Java 11, so even though our PuppetDB 8 packages install java 11, the symlink at /usr/bin/java is not updated and we continue trying to use java 8. This breaks because HikariCP was updated to a version that does not run on java 8 anymore. It is also possible that we would hit this on Debian-based OSes on any installation where an admin has manually selected java 8.

This does not affect PE because the hard-coded path in EZBake is to pe-java and not a java managed by update-alternatives.

Option 1: Guide users through the problem manually with documentation. On RedHat, they could be instructed to install java 11 and select it as the preferred java. Con: module upgrades will not work without manual intervention.

Option 2: We can use the output of the alternatives cli tools to "sniff" out available java versions and select one that will work for us even if the user has an incompatible java selected as the default java. In this case we would remove EZBake's current /etc/default/PACKAGE hard-coded JAVA_BIN =/usr/bin/java setting, but still allow users to set that there to override the sniffing by setting JAVA_BIN themselves auto-detection (this will also maintain their ability to use a java that is not registered with the alternatives programs.

Open questions: SLES?

Rob Browning (Jira)

unread,
Apr 17, 2023, 5:19:02 PM4/17/23
to puppe...@googlegroups.com
Rob Browning updated an issue
Problem: On RedHat-based OSes, PuppetDB fails to start after upgrading from Platform 7 to Platform 8. EZBake controls which java we run with by setting JAVA_BIN to /usr/bin/java in our service defaults. On Debian and Redhat (at least), this is actually a symlink to java controlled by update-alternatives and alternatives respectively. RedHat's Java 8 package still has a higher alternatives priority than Java 11, so even though our PuppetDB 8 packages install java 11, the symlink at /usr/bin/java is not updated and we continue trying to use java 8. This breaks because HikariCP was updated to a version that does not run on java 8 anymore. It is also possible that we would hit this on Debian-based OSes on any installation where an admin has manually selected java 8.

This does not affect PE because the hard-coded path in EZBake is to pe-java and not a java managed by update-alternatives.

Option 1: Guide users through the problem manually with documentation. On RedHat, they could be instructed to install java 11 and select it as the preferred java. Con: module upgrades will not work without manual intervention.

Option 2: We can use the output of the alternatives cli tools to "sniff" out available java versions and select one that will work for us even if the user has an incompatible java selected as the default java. In this case we would remove EZBake's current /etc/default/PACKAGE hard-coded JAVA_BIN=/usr/bin/java setting, but we'd still allow users to set that JAVA_BIN there to override the auto-detection (this will also maintain their ability to use a java that is not registered with the alternatives programs.

Open questions: SLES?

Austin Blatt (Jira)

unread,
Apr 18, 2023, 1:12:03 PM4/18/23
to puppe...@googlegroups.com
Austin Blatt assigned an issue to Rob Browning
Change By: Austin Blatt
Assignee: Rob Browning

Austin Blatt (Jira)

unread,
Apr 20, 2023, 8:07:01 PM4/20/23
to puppe...@googlegroups.com
Austin Blatt assigned an issue to Austin Blatt
Change By: Austin Blatt
Assignee: Rob Browning Austin Blatt
Reply all
Reply to author
Forward
0 new messages