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
Sle 15 sp4 #12
Sle 15 sp4 #12
Conversation
(bsc#1190774) Add SAPHanaSR via global.ini as proposed in https://documentation.suse.com/sbp/all/html/SLES4SAP-hana-sr-guide-PerfOpt-15/index.html#id-1.10.6.6
SUSE SAP HA Yast wizard for HANA doesn´t configure the HANA hooks.
yast2-sap-ha: S:M:24423:276258: csync2 configuration not enabled
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.
Just a few notes, but nothing blocking the merge.
src/clients/sap_ha.rb
Outdated
@@ -53,6 +54,10 @@ class SAPHAClass < Client | |||
|
|||
def initialize | |||
log.warn "--- called #{self.class}.#{__callee__}: CLI arguments are #{WFM.Args} ---" | |||
#Take care that corosync is enabled and running | |||
corosync = Yast2::Systemd::Service.find('corosync') |
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.
Same as https://github.com/yast/yast-sap-ha/pull/11/files#r942146359. But if we are pretty sure that the corosync service is there, it should not be a problem. Just take it into account if we decide at some point to change the dependency, or the service gets renamed or whatever.
src/lib/sap_ha/semantic_checks.rb
Outdated
@@ -235,8 +239,7 @@ def integer_in_range(value, low, high, message = '', field_name = '') | |||
def sap_sid(value, message = '', field_name = '') | |||
message = "A valid SAP System ID consists of three characters, starts with a letter, and "\ | |||
" must not collide with one of the reserved IDs" if message.nil? || message.empty? | |||
flag = !SAP_SID_REGEXP.match(value).nil? | |||
flag &= !RESERVED_SAP_SIDS.include?(value) | |||
flag = !SAP_SID_REGEXP.match(value).nil? && !RESERVED_SAP_SIDS.include?(value) |
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.
np: same as #9 (comment).
src/lib/sap_ha/system/network.rb
Outdated
@@ -41,15 +41,15 @@ def interfaces | |||
# Get local machine's IPv4 addresses excluding the loopback iface | |||
def ip_addresses | |||
interfaces = Socket.getifaddrs.select do |iface| | |||
iface.addr.ipv4? && !iface.addr.ipv4_loopback? | |||
!iface.addr.nil? && iface.addr.ipv4? && !iface.addr.ipv4_loopback? |
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.
It is enought to say iface.addr && iface.addr.ipv4? && !iface.addr.ipv4_loopback?
.
src/lib/sap_ha/semantic_checks.rb
Outdated
@@ -235,8 +239,7 @@ def integer_in_range(value, low, high, message = '', field_name = '') | |||
def sap_sid(value, message = '', field_name = '') | |||
message = "A valid SAP System ID consists of three characters, starts with a letter, and "\ | |||
" must not collide with one of the reserved IDs" if message.nil? || message.empty? | |||
flag = !SAP_SID_REGEXP.match(value).nil? | |||
flag &= !RESERVED_SAP_SIDS.include?(value) | |||
flag = !SAP_SID_REGEXP.match?(value).nil? && !RESERVED_SAP_SIDS.include?(value) |
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.
If you decide to use match?
, you can drop the !
and the nil?
. See #9 (comment). If you prefer, you can leave it as it was at the beginning.
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.
Now it looks good. Thanks!
❌ Internal Jenkins job #1 failed |
Problem
Short description of the original problem.
varkoly:master