Skip to content

Commit

Permalink
Build: crmd: rename crmd daemon to pacemaker-controld
Browse files Browse the repository at this point in the history
  • Loading branch information
kgaillot committed Apr 30, 2018
1 parent 3da80b9 commit db5536e
Show file tree
Hide file tree
Showing 61 changed files with 351 additions and 409 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Expand Up @@ -111,7 +111,7 @@ cib/cib
cib/cibmon
cib/cibpipe
/daemons/attrd/pacemaker-attrd
/daemons/controld/crmd
/daemons/controld/pacemaker-controld
/daemons/execd/cts-exec-helper
/daemons/execd/pacemaker-execd
/daemons/execd/pacemaker-remoted
Expand Down
51 changes: 26 additions & 25 deletions cts/CM_common.py
Expand Up @@ -312,7 +312,7 @@ def Components(self):
"send_ipc_message: IPC Channel to .* is not connected",
"unconfirmed_actions: Waiting on .* unconfirmed actions",
"cib_native_msgready: Message pending on command channel",
r": Performing A_EXIT_1 - forcefully exiting the CRMd",
r": Performing A_EXIT_1 - forcefully exiting ",
r"Resource .* was active at shutdown. You may ignore this error if it is unmanaged.",
]

Expand All @@ -326,12 +326,12 @@ def Components(self):

ccm = Process(self, "ccm", triggersreboot=self.fastfail, pats = [
"State transition .* S_RECOVERY",
"crmd.*Action A_RECOVER .* not supported",
r"crmd.*: Input I_TERMINATE .*from do_recover",
r"crmd.*: Could not recover from internal error",
"crmd.*I_ERROR.*crmd_cib_connection_destroy",
"pacemaker-controld.*Action A_RECOVER .* not supported",
r"pacemaker-controld.*: Input I_TERMINATE .*from do_recover",
r"pacemaker-controld.*: Could not recover from internal error",
"pacemaker-controld.*I_ERROR.*crmd_cib_connection_destroy",
# these status numbers are likely wrong now
r"crmd.*exited with status 2",
r"pacemaker-controld.*exited with status 2",
r"attrd.*exited with status 1",
r"cib.*exited with status 2",

Expand All @@ -351,26 +351,27 @@ def Components(self):
"State transition .* S_RECOVERY",
"Lost connection to the CIB service",
"Connection to the CIB terminated...",
r"crmd.*: Input I_TERMINATE .*from do_recover",
"crmd.*I_ERROR.*crmd_cib_connection_destroy",
r"crmd.*: Could not recover from internal error",
r"pacemaker-controld.*: Input I_TERMINATE .*from do_recover",
"pacemaker-controld.*I_ERROR.*crmd_cib_connection_destroy",
r"pacemaker-controld.*: Could not recover from internal error",
# these status numbers are likely wrong now
r"crmd.*exited with status 2",
r"pacemaker-controld.*exited with status 2",
r"attrd.*exited with status 1",
], badnews_ignore = common_ignore)

execd = Process(self, "pacemaker-execd", triggersreboot=self.fastfail, pats = [
"State transition .* S_RECOVERY",
"LRM Connection failed",
"crmd.*I_ERROR.*lrm_connection_destroy",
"pacemaker-controld.*I_ERROR.*lrm_connection_destroy",
"State transition S_STARTING -> S_PENDING",
r"crmd.*: Input I_TERMINATE .*from do_recover",
r"crmd.*: Could not recover from internal error",
r"pacemaker-controld.*: Input I_TERMINATE .*from do_recover",
r"pacemaker-controld.*: Could not recover from internal error",
# this status number is likely wrong now
r"crmd.*exited with status 2",
r"pacemaker-controld.*exited with status 2",
], badnews_ignore = common_ignore)

crmd = Process(self, "crmd", triggersreboot=self.fastfail, pats = [
controld = Process(self, "pacemaker-controld", triggersreboot=self.fastfail,
pats = [
# "WARN: determine_online_status: Node .* is unclean",
# "Scheduling Node .* for STONITH",
# "Executing .* fencing operation",
Expand All @@ -381,17 +382,17 @@ def Components(self):

pengine = Process(self, "pengine", triggersreboot=self.fastfail, pats = [
"State transition .* S_RECOVERY",
r"crmd.*: Input I_TERMINATE .*from do_recover",
r"crmd.*: Could not recover from internal error",
r"crmd.*CRIT.*: Connection to the Policy Engine failed",
"crmd.*I_ERROR.*save_cib_contents",
r"pacemaker-controld.*: Input I_TERMINATE .*from do_recover",
r"pacemaker-controld.*: Could not recover from internal error",
r"pacemaker-controld.*CRIT.*: Connection to the Policy Engine failed",
"pacemaker-controld.*I_ERROR.*save_cib_contents",
# this status number is likely wrong now
r"crmd.*exited with status 2",
r"pacemaker-controld.*exited with status 2",
], badnews_ignore = common_ignore, dc_only=1)

if self.Env["DoFencing"] == 1 :
complist.append(Process(self, "stoniths", triggersreboot=self.fastfail, dc_pats = [
r"crmd.*CRIT.*: Fencing daemon connection failed",
r"pacemaker-controld.*CRIT.*: Fencing daemon connection failed",
"Attempting connection to fencing daemon",
], badnews_ignore = stonith_ignore))

Expand All @@ -400,22 +401,22 @@ def Components(self):
# these status numbers are likely wrong now
r"attrd.*exited with status 1",
r"cib.*exited with status 2",
r"crmd.*exited with status 2",
r"pacemaker-controld.*exited with status 2",
])
cib.pats.extend([
# these status numbers are likely wrong now
r"attrd.*exited with status 1",
r"crmd.*exited with status 2",
r"pacemaker-controld.*exited with status 2",
])
execd.pats.extend([
# these status numbers are likely wrong now
r"crmd.*exited with status 2",
r"pacemaker-controld.*exited with status 2",
])

complist.append(ccm)
complist.append(cib)
complist.append(execd)
complist.append(crmd)
complist.append(controld)
complist.append(pengine)

return complist
Expand Down
2 changes: 1 addition & 1 deletion cts/CM_corosync.py
Expand Up @@ -26,7 +26,7 @@ def __init__(self, Environment, randseed=None, name=None):
def Components(self):
complist = []
if not len(list(self.fullcomplist.keys())):
for c in ["cib", "crmd", "pacemaker-attrd", "pacemaker-execd" ]:
for c in ["cib", "pacemaker-controld", "pacemaker-attrd", "pacemaker-execd" ]:
self.fullcomplist[c] = Process(
self, c,
pats = self.templates.get_component(self.name, c),
Expand Down
37 changes: 11 additions & 26 deletions cts/CTSaudits.py
@@ -1,26 +1,11 @@
'''CTS: Cluster Testing System: Audit module
'''
from __future__ import absolute_import

__copyright__ = '''
Copyright (C) 2000, 2001,2005 Alan Robertson <alanr@unix.sh>
Licensed under the GNU GPL.
'''

#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
""" Auditing classes for Pacemaker's Cluster Test Suite (CTS)
"""

# Pacemaker targets compatibility with Python 2.7 and 3.2+
from __future__ import print_function, unicode_literals, absolute_import, division

__copyright__ = "Copyright 2000-2018 Alan Robertson <alanr@unix.sh>"
__license__ = "GNU General Public License version 2 or later (GPLv2+) WITHOUT ANY WARRANTY"

import time, re, uuid
from cts.watcher import LogWatcher
Expand Down Expand Up @@ -534,7 +519,7 @@ def __call__(self):
return rc


class CrmdStateAudit(ClusterAudit):
class ControllerStateAudit(ClusterAudit):
def __init__(self, cm):
self.CM = cm
self.Stats = {"calls":0
Expand Down Expand Up @@ -593,7 +578,7 @@ def __call__(self):
return passed

def name(self):
return "CrmdStateAudit"
return "ControllerStateAudit"

def is_applicable(self):
# @TODO Due to long-ago refactoring, this name test would never match,
Expand Down Expand Up @@ -863,7 +848,7 @@ def is_applicable(self):
AllAuditClasses.append(DiskAudit)
AllAuditClasses.append(FileAudit)
AllAuditClasses.append(LogAudit)
AllAuditClasses.append(CrmdStateAudit)
AllAuditClasses.append(ControllerStateAudit)
AllAuditClasses.append(PartitionAudit)
AllAuditClasses.append(PrimitiveAudit)
AllAuditClasses.append(GroupAudit)
Expand Down
10 changes: 5 additions & 5 deletions cts/CTStests.py
Expand Up @@ -713,7 +713,7 @@ def __call__(self, node):
# FIXME! This should use the CM class to get the pattern
# then it would be applicable in general
watchpats = []
watchpats.append("crmd.*Connecting to cluster infrastructure")
watchpats.append("pacemaker-controld.*Connecting to cluster infrastructure")
watch = self.create_watch(watchpats, self.Env["DeadTime"]+10)
watch.setwatch()

Expand Down Expand Up @@ -1632,7 +1632,7 @@ def errorstoignore(self):
return [
r"Another DC detected:",
r"(ERROR|error).*: .*Application of an update diff failed",
r"crmd.*:.*not in our membership list",
r"pacemaker-controld.*:.*not in our membership list",
r"CRIT:.*node.*returning after partition",
]

Expand Down Expand Up @@ -2234,7 +2234,7 @@ def __call__(self, node):
self.resource_offset = self.resource_offset + 1

r_id = "bsc-rsc-%s-%d" % (node, self.resource_offset)
start_pat = "crmd.*%s_start_0.*confirmed.*ok"
start_pat = "pacemaker-controld.*%s_start_0.*confirmed.*ok"

patterns = []
patterns.append(start_pat % r_id)
Expand Down Expand Up @@ -3046,8 +3046,8 @@ def errorstoignore(self):
ignore_pats = [
r"Lost connection to Pacemaker Remote node",
r"Software caused connection abort",
r"crmd.*:\s+error.*: Operation remote-.*_monitor",
r"crmd.*:\s+error.*: Result of monitor operation for remote-.*",
r"pacemaker-controld.*:\s+error.*: Operation remote-.*_monitor",
r"pacemaker-controld.*:\s+error.*: Result of monitor operation for remote-.*",
r"pengine.*:\s+Recover remote-.*\s*\(.*\)",
r"Calculated [Tt]ransition .*pe-error",
r"error.*: Resource .*ocf::.* is active on 2 nodes attempting recovery",
Expand Down
4 changes: 2 additions & 2 deletions cts/README.md
Expand Up @@ -126,15 +126,15 @@ Valgrind is a program for detecting memory management problems (such as
use-after-free errors). If you have valgrind installed, you can enable it by
setting the following environment variables on all cluster nodes:

PCMK_valgrind_enabled=pacemaker-attrd,pacemaker-execd,cib,crmd,pengine,stonith-ng
PCMK_valgrind_enabled=pacemaker-attrd,pacemaker-controld,pacemaker-execd,cib,pengine,stonith-ng
VALGRIND_OPTS="--leak-check=full --trace-children=no --num-callers=25
--log-file=/var/lib/pacemaker/valgrind-%p
--suppressions=/usr/share/pacemaker/tests/valgrind-pcmk.suppressions
--gen-suppressions=all"

and running CTS with these options:

--valgrind-tests --valgrind-procs="pacemaker-attrd pacemaker-execd cib crmd pengine stonith-ng"
--valgrind-tests --valgrind-procs="pacemaker-attrd pacemaker-controld pacemaker-execd cib pengine stonith-ng"

These options should only be set while specifically testing memory management,
because they may slow down the cluster significantly, and they will disable
Expand Down
2 changes: 1 addition & 1 deletion cts/environment.py
Expand Up @@ -46,7 +46,7 @@ def __init__(self, args):
self["notification-recipient"] = "/var/lib/pacemaker/notify.log"
self["loop-minutes"] = 60
self["valgrind-prefix"] = None
self["valgrind-procs"] = "pacemaker-attrd pacemaker-execd cib crmd pengine stonith-ng"
self["valgrind-procs"] = "pacemaker-attrd pacemaker-controld pacemaker-execd cib pengine stonith-ng"
self["valgrind-opts"] = """--leak-check=full --show-reachable=yes --trace-children=no --num-callers=25 --gen-suppressions=all --suppressions="""+CTSvars.CTS_home+"""/cts.supp"""

self["experimental-tests"] = 0
Expand Down

0 comments on commit db5536e

Please sign in to comment.