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

Add conditionals for Rhel9 in common role #3802

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

AswathySK
Copy link
Contributor

The common role for Unix playbook doesnt include conditionals for rhel9 causing playbook failures.

Failures caused due to current condition:

  • EPEL release not enabled for rhel9
  • packags included in Installing additional build tools if NOT RHEL 8 task is applicable for rhel9 as well. For example NTP is replaced by chronyd.
  • Additional build tools for rhel 8 is also required by rhel 9
Checklist
  • commit message has one of the standard prefixes
  • faq.md updated if appropriate
  • other documentation is changed or added (if applicable)
  • playbook changes run through VPC or QPC (if you have access)
  • VPC/QPC not applicable for this PR
  • for inventory.yml changes, bastillion/nagios/jenkins updated accordingly

Copy link
Contributor

@AdamBrousseau AdamBrousseau left a comment

Choose a reason for hiding this comment

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

@AswathySK can we make these conditions smarter so we don't have to keep updating them every time a new OS is released? Or do we prefer to leave it like this so we can test the new major OS releases?

@AswathySK
Copy link
Contributor Author

@AdamBrousseau instead of changing conditional to do it for everything greater than or equal to rhel 8 instead?
There could be change in package dependencies for the future releases.
So how to make the change right now is up to the community I suppose.

@AdamBrousseau
Copy link
Contributor

Sure. We can get other opinions. If we change it to be something like >=, and it stops working, the PBs will presumably fail and someone can investigate at that point. That would have to happen either way, but at least this way, you don't have to monitor and update it when it works.

@AdamBrousseau
Copy link
Contributor

@sxa do you have an opinion on the above?

Signed-off-by: Aswathy S Kumar <aswathyskumar144@gmail.com>
@AswathySK
Copy link
Contributor Author

@AdamBrousseau , I have made the change as per your suggestion.

yum: name=https://dl.fedoraproject.org/pub/epel/epel-release-latest-{{ ansible_distribution_major_version }}.noarch.rpm
failed_when: false
when:
- ansible_architecture != "s390x"
- (ansible_distribution_major_version == "8") or (ansible_distribution_major_version == "6") or (ansible_distribution_major_version == "7")
- (ansible_distribution_major_version | int >= 6)
Copy link
Contributor

Choose a reason for hiding this comment

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

If this is needed for rhel6+ why do we even need a condition for it?

package: "name={{ item }} state=latest"
with_items: "{{ Java_RHEL8 }}"
when: (ansible_distribution_major_version == "8")
when: (ansible_distribution_major_version | int >= 8)
Copy link
Contributor

Choose a reason for hiding this comment

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

Are these 3 cases still what we want?
From

Java_RHEL8:
  - java-1.8.0-openjdk-devel

Java_NOT_RHEL6_PPC64:             # Not RHEL8 either
  - java-1.7.0-openjdk-devel
  - java-1.8.0-openjdk-devel

Java_RHEL6_PPC64:
  - java-1.7.0-ibm-devel
  - java-1.8.0-ibm-devel

What is java 7 and 8 used for?

Copy link
Contributor Author

@AswathySK AswathySK Nov 12, 2024

Choose a reason for hiding this comment

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

@AdamBrousseau @sxa , I am not sure. Should we bump it to 17 or 21?

Copy link
Contributor

Choose a reason for hiding this comment

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

As far as I can tell it's been there since the beginning. Java is needed for 2 purposes that I know of.

  • Connecting agents to jenkins.
  • Bootjdk for compiling java.

Since Jenkins now requires jdk17 to run agents, and jdk11 was required 2 years ago, I don't think leaving this at java8 for jenkins connections is necessary.
For bootjdk requirement, the build scripts will pull the needed jdk during the build process so having a permanent install of 8 is not necessary in my opinion.

I would want an opinion from Adopt/@sxa before we remove it completely though.

@@ -52,11 +52,11 @@
##########################
# Additional build tools #
##########################
- name: Install additional build tools if NOT RHEL 8
- name: Install additional build tools if NOT RHEL 8 AND RHEL9
package: "name={{ item }} state=latest"
with_items: "{{ Additional_Build_Tools_NOT_RHEL8 }}"
Copy link
Contributor

Choose a reason for hiding this comment

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

Should we rename this variable to Additional_Build_Tools_NOT_RHEL8Plus?

@@ -102,11 +102,11 @@
- (ansible_distribution_major_version == "6") or (ansible_distribution_major_version == "7")
tags: build_tools

- name: Install additional build tools for RHEL 8
- name: Install additional build tools for RHEL >= 8
package: "name={{ item }} state=latest"
with_items: "{{ Additional_Build_Tools_RHEL8 }}"
Copy link
Contributor

Choose a reason for hiding this comment

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

Should we rename this variable to Additional_Build_Tools_RHEL8Plus?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

That sounds good.

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

Successfully merging this pull request may close these issues.

2 participants