-
Notifications
You must be signed in to change notification settings - Fork 13
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
rewrite trento community checks regarding 'package version' #124
Changes from all commits
9dfe76e
759ea1d
193ef39
674d446
03f7557
998c6a2
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
id: "222A57" | ||
name: supported sbd version | ||
group: OS and package versions | ||
description: | | ||
SBD version is supported | ||
remediation: | | ||
## Abstract | ||
Installed SBD version must be equal or higher than the recommended value | ||
|
||
## Remediation | ||
Install or upgrade to a supported SBD version | ||
|
||
## Reference | ||
- https://documentation.suse.com/en-us/sbp/all/single-html/SLES4SAP-hana-sr-guide-PerfOpt-15/ | ||
|
||
when: env.provider in ["azure", "nutanix", "kvm"] | ||
|
||
facts: | ||
- name: package_sbd | ||
gatherer: package_version | ||
argument: sbd,1.4.0 | ||
|
||
expectations: | ||
- name: expectations_sbd_version | ||
expect: facts.package_sbd < 1 |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
id: "9FAAD0" | ||
name: unsupported pacemaker version | ||
group: OS and package versions | ||
description: | | ||
Pacemaker version is not the recommended value | ||
remediation: | | ||
## Abstract | ||
Installed Pacemaker version must not be equal than the recommended value | ||
|
||
## Remediation | ||
Install or upgrade to a supported Pacemaker version | ||
|
||
## Reference | ||
- https://documentation.suse.com/en-us/sbp/all/single-html/SLES4SAP-hana-sr-guide-PerfOpt-15/ | ||
|
||
facts: | ||
- name: exclude_package_pacemaker | ||
gatherer: package_version | ||
argument: pacemaker,2.0.3+20200511.2b248d828 | ||
|
||
expectations: | ||
- name: expectations_pacemaker_version_to_exclude | ||
expect: facts.exclude_package_pacemaker != 0 |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
id: "9FEFB0" | ||
name: supported pacemaker version | ||
group: OS and package versions | ||
description: | | ||
Pacemaker version is supported | ||
remediation: | | ||
## Abstract | ||
Installed Pacemaker version must be equal or higher than the recommended value | ||
|
||
## Remediation | ||
Install or upgrade to a supported Pacemaker version | ||
|
||
## Reference | ||
- https://documentation.suse.com/en-us/sbp/all/single-html/SLES4SAP-hana-sr-guide-PerfOpt-15/ | ||
|
||
facts: | ||
- name: package_pacemaker | ||
gatherer: package_version | ||
argument: pacemaker,2.0.1 | ||
|
||
expectations: | ||
- name: expectations_pacemaker_version | ||
expect: facts.package_pacemaker < 1 |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
id: "C3166E" | ||
name: unsupported sbd version | ||
group: OS and package versions | ||
description: | | ||
SBD version is not the recommended value | ||
remediation: | | ||
## Abstract | ||
Installed SBD version must not be equal than the recommended value | ||
|
||
## Remediation | ||
Install or upgrade to a supported SBD version | ||
|
||
## Reference | ||
- https://documentation.suse.com/en-us/sbp/all/single-html/SLES4SAP-hana-sr-guide-PerfOpt-15/ | ||
|
||
when: env.provider in ["azure", "nutanix", "kvm"] | ||
|
||
facts: | ||
- name: exclude_package_sbd | ||
gatherer: package_version | ||
argument: sbd,1.4.0+20190326.c38c5e6 | ||
|
||
expectations: | ||
- name: expectations_sbd_version_to_exclude | ||
expect: facts.exclude_package_sbd != 0 |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
id: "CAEFF1" | ||
name: OS flavor SLES_SAP | ||
group: OS and package versions | ||
description: | | ||
Operating system vendor is supported | ||
remediation: | | ||
## Abstract | ||
SAPHanaSR is only supported on SUSE Linux Enterprise Server for SAP Applications. | ||
|
||
## Remediation | ||
Please use SUSE Linux Enterprise Server for SAP Applications. | ||
|
||
## Reference | ||
Azure: | ||
|
||
- https://docs.microsoft.com/en-us/azure/virtual-machines/workloads/sap/sap-hana-high-availability | ||
|
||
AWS: | ||
|
||
- https://docs.aws.amazon.com/sap/latest/sap-hana/sap-hana-on-aws-ha-cluster-configuration-on-sles.html | ||
|
||
GCP: | ||
|
||
- https://cloud.google.com/solutions/sap/docs/sap-hana-os-support | ||
|
||
Nutanix: | ||
|
||
- https://documentation.suse.com/sbp/all/single-html/SLES4SAP-hana-sr-guide-PerfOpt-15/#id-planning-the-installation | ||
|
||
SUSE / KVM: | ||
|
||
- https://documentation.suse.com/sbp/all/single-html/SLES4SAP-hana-sr-guide-PerfOpt-15/#id-planning-the-installation | ||
|
||
facts: | ||
- name: os_flavor | ||
gatherer: package_version | ||
argument: SLES_SAP-release | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This usage of the $ rpm -q --qf "%{VERSION}" SLES_SAP-release Is this the way to determine that the OS is SLES4SAP? Asking because I might very well ignore it 😅 If the There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. yes, your right. It is a workaround, but a reliable working 'workaround'. The package 'SLES_SAP-release' is only available on SLES for SAP systems. On a plain SLES you will have the 'SLES-release' package. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @angelabriel We can merge as it is by now, and open a new ticket to maybe implement a new gatherer to get the version. What do you think? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @arbulu89 Sounds good. Having a gatherer for the os version (based on /etc/os-release or /etc/products.d/baseproduct ) and the os flavor (based on /etc/products.d/baseproduct ) would be really nice. |
||
|
||
expectations: | ||
- name: expectations_sles_sap | ||
expect: facts.os_flavor != () |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
id: "D028B9" | ||
name: OS version SLES_SAP | ||
group: OS and package versions | ||
description: | | ||
Operating system version is supported | ||
remediation: | | ||
## Abstract | ||
You need at least SUSE Linux Enterprise Server for SAP Applications 15 SP1 or newer | ||
|
||
## Remediation | ||
Please install or upgrade to a supported OS version | ||
|
||
## Reference | ||
- https://documentation.suse.com/en-us/sbp/all/single-html/SLES4SAP-hana-sr-guide-PerfOpt-15/ | ||
|
||
facts: | ||
- name: sles_sap_version | ||
gatherer: package_version | ||
argument: SLES_SAP-release,15.1 | ||
|
||
expectations: | ||
- name: expectations_sles_sap_version | ||
expect: facts.sles_sap_version < 1 |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
id: "DC5429" | ||
name: supported corosync version | ||
group: OS and package versions | ||
description: | | ||
Corosync version is supported | ||
remediation: | | ||
## Abstract | ||
Installed Corosync version must be equal or higher than the recommended value | ||
|
||
## Remediation | ||
Install or upgrade to a supported Corosync version | ||
|
||
## Reference | ||
- https://documentation.suse.com/en-us/sbp/all/single-html/SLES4SAP-hana-sr-guide-PerfOpt-15/ | ||
|
||
facts: | ||
- name: package_corosync | ||
gatherer: package_version | ||
argument: corosync,2.4.5 | ||
|
||
expectations: | ||
- name: expectations_corosync_version | ||
expect: facts.package_corosync < 1 |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
id: "F50AF5" | ||
name: supported python3 version | ||
group: OS and package versions | ||
description: | | ||
Python3 version is supported | ||
remediation: | | ||
## Abstract | ||
Installed Python3 version must be equal or higher than the recommended value | ||
|
||
## Remediation | ||
Install or upgrade to a supported Python3 version | ||
|
||
## Reference | ||
- https://documentation.suse.com/en-us/sbp/all/single-html/SLES4SAP-hana-sr-guide-PerfOpt-15/ | ||
|
||
facts: | ||
- name: package_python3 | ||
gatherer: package_version | ||
argument: python3,3.6.5 | ||
|
||
expectations: | ||
- name: expectations_python3_version | ||
expect: facts.package_python3 < 1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This could very well done as before, just letting the version in the values, and comparing with the package version string, as we simply wanted a different value.
But both work