Skip to content

Commit

Permalink
Support RHEL 7.5 (#426)
Browse files Browse the repository at this point in the history
* Fix a comment

Signed-off-by: Brian J. Murrell <[email protected]>

* Refactor $REBOOT_NODE assignment

So that more consumers can use it without pulling in unneeded
node_lib.sh baggage.

Signed-off-by: Brian J. Murrell <[email protected]>

* Fix install_client wait_for condition

Signed-off-by: Brian J. Murrell <[email protected]>

* Make timestamp match agent in agent.log

Also add a bit more RA debug for mount.

Signed-off-by: Brian J. Murrell <[email protected]>

* Support RHEL 7.5

IML 3.1 only supports up to EL 7.3 so start upgrade testing
from RHEL 7.3, not 7.4.

RHEL 7.5's Python doesn't support SSLv2 so allow attribute
exception in any SSLv2 tests.

Auto-pass upgrade testing on CentOS because RHEL 7.5 won't
upgrade CentOS 7.3 due to distro packaging incompatibilities.

Slight change in crm_mon where it now reports on resources while
they are starting so only report locations of Started resources
and not Starting resources.  Additionally, a target that is
"Stopping" has not completed the transistion from "Started" (i.e.
running) to Stopped, so count it as running until it completes
the transition.

Signed-off-by: Brian J. Murrell <[email protected]>
  • Loading branch information
brianjmurrell committed Mar 28, 2018
1 parent 2d15cab commit a50b3f9
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 4 deletions.
4 changes: 3 additions & 1 deletion Target
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,8 @@ END
}

dbg() {
echo "`date` RA $1" >> /var/log/chroma-agent.log
# shellcheck disable=SC2102
echo "$(date +[%d/%b/%Y:%H:%M:%S]) RA $1" >> /var/log/chroma-agent.log
}

Target_start() {
Expand All @@ -79,6 +80,7 @@ Target_start() {
dbg "Couldn't start target $TARGET"
return $OCF_ERR_GENERIC
fi
dbg "Leaving Target_start() with success"
return $OCF_SUCCESS
}

Expand Down
19 changes: 17 additions & 2 deletions chroma_agent/action_plugins/manage_targets.py
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,22 @@ def get_resource_locations():
if columns[3] == "(disabled)":
columns[3] = None

locations[columns[0]] = columns[3]
# Similar to above, the third column can report one of various
# states such as Starting, Started, Stopping, Stopped so only
# consider targets which are Started
# If we still have 4 columns at this point, the third column
# must be the state
if columns[2] not in ['Starting', 'Started', 'Stopping', 'Stopped']:
console_log.error("Unable to determine state of %s in\n%s'" %
(columns[0], lines_text))

# a target that is "Stopping" has not completed the transistion
# from "Started" (i.e. running) to Stopped, so count it as running
# until it completes the transition
if columns[2] == "Started" or columns[2] == "Stopping":
locations[columns[0]] = columns[3]
else:
locations[columns[0]] = None

return locations

Expand Down Expand Up @@ -603,7 +618,7 @@ def start_target(ha_label):

def stop_target(ha_label):
'''
Start the high availability target
Stop the high availability target
Return: Value using simple return protocol
'''
Expand Down
2 changes: 1 addition & 1 deletion chroma_agent/lib/shell.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ def run(cls, arg_list):

@classmethod
def run_old(cls, arg_list):
""" This method is provided for backwards compatibility only, use run_new() in new code """
""" This method is provided for backwards compatibility only, use run() in new code """
result = AgentShell.run(arg_list)

return result.rc, result.stdout, result.stderr
Expand Down

0 comments on commit a50b3f9

Please sign in to comment.