From db5536e40c77cdfdf1011b837f18e4ad9df45442 Mon Sep 17 00:00:00 2001 From: Ken Gaillot Date: Tue, 24 Apr 2018 15:39:03 -0500 Subject: [PATCH] Build: crmd: rename crmd daemon to pacemaker-controld --- .gitignore | 2 +- cts/CM_common.py | 51 ++++++------- cts/CM_corosync.py | 2 +- cts/CTSaudits.py | 37 +++------- cts/CTStests.py | 10 +-- cts/README.md | 4 +- cts/environment.py | 2 +- cts/patterns.py | 74 +++++++++---------- daemons/attrd/pacemaker-attrd.c | 8 +- daemons/controld/Makefile.am | 40 +++++----- daemons/controld/callbacks.c | 6 +- daemons/controld/control.c | 10 +-- daemons/controld/crmd_lrm.h | 6 +- daemons/controld/fsa_defines.h | 15 ++-- daemons/controld/join_client.c | 8 +- daemons/controld/join_dc.c | 4 +- daemons/controld/lrm.c | 7 +- daemons/controld/lrm_state.c | 15 ++-- daemons/controld/main.c | 26 ++----- daemons/controld/membership.h | 21 +++++- daemons/controld/messages.c | 6 +- daemons/controld/remote_ra.c | 9 ++- daemons/controld/te_utils.c | 21 ++---- daemons/execd/execd_commands.c | 11 ++- daemons/execd/pacemaker-execd.c | 6 +- daemons/execd/remoted_proxy.c | 21 ++++-- .../pacemakerd/pacemaker.combined.upstart.in | 4 +- daemons/pacemakerd/pacemaker.in | 7 +- daemons/pacemakerd/pacemaker.service.in | 7 +- daemons/pacemakerd/pacemaker.sysconfig | 18 ++--- daemons/pacemakerd/pacemakerd.c | 9 ++- .../en-US/Ch-Verification.txt | 2 +- doc/Pacemaker_Development/en-US/Ch-FAQ.txt | 13 ++-- doc/Pacemaker_Explained/en-US/Ch-Options.txt | 3 +- doc/Pacemaker_Explained/en-US/Ch-Status.txt | 12 +-- doc/Pacemaker_Explained/en-US/Ch-Stonith.txt | 3 +- .../en-US/Ch-Baremetal-Tutorial.txt | 2 +- doc/Pacemaker_Remote/en-US/Ch-Example.txt | 4 +- doc/shared/en-US/pacemaker-intro.txt | 12 +-- .../roles/docker-host/files/pcmk_remote_stop | 3 +- .../docker/roles/docker-host/files/pcmk_stop | 5 +- extra/cluster-clean | 2 +- extra/resources/remote | 34 +++------ fencing/README.md | 4 +- include/crm/cluster/internal.h | 13 ++-- include/crm/msg_xml.h | 29 +++----- lib/cluster/membership.c | 20 ++--- lib/common/ipc.c | 9 ++- lib/common/watchdog.c | 6 +- lib/lrmd/proxy_common.c | 4 +- lib/pengine/unpack.c | 2 +- pacemaker.spec.in | 4 +- pengine/allocate.c | 2 +- pengine/graph.c | 21 ++---- pengine/native.c | 4 +- tools/crm_report.in | 26 ++----- tools/crm_resource.c | 14 ++-- tools/crm_resource_runtime.c | 6 +- tools/crmadmin.c | 30 +++----- tools/report.collector.in | 2 +- tools/report.common.in | 2 +- 61 files changed, 351 insertions(+), 409 deletions(-) diff --git a/.gitignore b/.gitignore index 20bee134ea1..b1fa010dac3 100644 --- a/.gitignore +++ b/.gitignore @@ -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 diff --git a/cts/CM_common.py b/cts/CM_common.py index c86a1a9388f..80b3606ff70 100755 --- a/cts/CM_common.py +++ b/cts/CM_common.py @@ -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.", ] @@ -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", @@ -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", @@ -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)) @@ -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 diff --git a/cts/CM_corosync.py b/cts/CM_corosync.py index b40d915b63c..ca343953096 100644 --- a/cts/CM_corosync.py +++ b/cts/CM_corosync.py @@ -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), diff --git a/cts/CTSaudits.py b/cts/CTSaudits.py index 5880648f8ea..aa18d64813e 100755 --- a/cts/CTSaudits.py +++ b/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 -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 " +__license__ = "GNU General Public License version 2 or later (GPLv2+) WITHOUT ANY WARRANTY" import time, re, uuid from cts.watcher import LogWatcher @@ -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 @@ -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, @@ -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) diff --git a/cts/CTStests.py b/cts/CTStests.py index ffac2b0f093..1b497684d03 100644 --- a/cts/CTStests.py +++ b/cts/CTStests.py @@ -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() @@ -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", ] @@ -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) @@ -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", diff --git a/cts/README.md b/cts/README.md index 29321060395..dd4ac1e3485 100644 --- a/cts/README.md +++ b/cts/README.md @@ -126,7 +126,7 @@ 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 @@ -134,7 +134,7 @@ setting the following environment variables on all cluster nodes: 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 diff --git a/cts/environment.py b/cts/environment.py index 5654d364894..1beb0b3081f 100644 --- a/cts/environment.py +++ b/cts/environment.py @@ -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 diff --git a/cts/patterns.py b/cts/patterns.py index d2fadf382b5..5d00f49f260 100644 --- a/cts/patterns.py +++ b/cts/patterns.py @@ -51,7 +51,7 @@ def __init__(self, name): "StandbyQueryCmd" : "crm_attribute -qG -U %s -n standby -l forever -d off 2>/dev/null", } self.search = { - "Pat:DC_IDLE" : "crmd.*State transition.*-> S_IDLE", + "Pat:DC_IDLE" : "pacemaker-controld.*State transition.*-> S_IDLE", # This won't work if we have multiple partitions "Pat:Local_started" : "%s\W.*The local CRM is operational", @@ -66,9 +66,9 @@ def __init__(self, name): "Pat:Fencing_ok" : r"stonith.*:\s*Operation .* of %s by .* for .*@.*: OK", "Pat:Fencing_recover" : r"pengine.*: Recover %s", - "Pat:RscOpOK" : r"crmd.*:\s+Result of %s operation for %s.*: (0 \()?ok", - "Pat:RscRemoteOpOK" : r"crmd.*:\s+Result of %s operation for %s on %s: (0 \()?ok", - "Pat:NodeFenced" : r"crmd.*:\s* Peer %s was terminated \(.*\) by .* on behalf of .*: OK", + "Pat:RscOpOK" : r"pacemaker-controld.*:\s+Result of %s operation for %s.*: (0 \()?ok", + "Pat:RscRemoteOpOK" : r"pacemaker-controld.*:\s+Result of %s operation for %s on %s: (0 \()?ok", + "Pat:NodeFenced" : r"pacemaker-controld.*:\s* Peer %s was terminated \(.*\) by .* on behalf of .*: OK", "Pat:FenceOpOK" : "Operation .* for host '%s' with device .* returned: 0", } @@ -123,8 +123,8 @@ def __init__(self, name): # Close enough ... "Corosync Cluster Engine exiting normally" isn't # printed reliably. "Pat:We_stopped" : "%s\W.*Unloading all Corosync service engines", - "Pat:They_stopped" : "%s\W.*crmd.*Node %s(\[|\s).*state is now lost", - "Pat:They_dead" : "crmd.*Node %s(\[|\s).*state is now lost", + "Pat:They_stopped" : "%s\W.*pacemaker-controld.*Node %s(\[|\s).*state is now lost", + "Pat:They_dead" : "pacemaker-controld.*Node %s(\[|\s).*state is now lost", "Pat:ChildExit" : r"\[[0-9]+\] exited with status [0-9]+ \(", "Pat:ChildKilled" : r"%s\W.*pacemakerd.*%s\[[0-9]+\] terminated with signal 9", @@ -159,7 +159,7 @@ def __init__(self, name): r"input=I_INTEGRATED cause=C_TIMER_POPPED", r"input=I_FINALIZED cause=C_TIMER_POPPED", r"input=I_ERROR", - r"(pacemakerd|pacemaker-execd|crmd):.*, exiting", + r"(pacemakerd|pacemaker-execd|pacemaker-controld):.*, exiting", r"pengine.*Attempting recovery of resource", r"is taking more than 2x its timeout", r"Confirm not received from", @@ -191,7 +191,7 @@ def __init__(self, name): #r"No need to invoke the TE", #r"ping.*: DEBUG: Updated connected = 0", #r"Digest mis-match:", - r"crmd:.*Transition failed: terminated", + r"pacemaker-controld:.*Transition failed: terminated", r"Local CIB .* differs from .*:", r"warn.*:\s*Continuing but .* will NOT be used", r"warn.*:\s*Cluster configuration file .* is corrupt", @@ -209,10 +209,10 @@ def __init__(self, name): "Connection to the CIB terminated...", "Sending message to CIB service FAILED", "apply_xml_diff:.*Diff application failed!", - r"crmd.*:\s*Action A_RECOVER .* not supported", + r"pacemaker-controld.*:\s*Action A_RECOVER .* not supported", "unconfirmed_actions:.*Waiting on .* unconfirmed actions", "cib_native_msgready:.*Message pending on command channel", - r"crmd.*:\s*Performing A_EXIT_1 - forcefully exiting the CRMd", + r"pacemaker-controld.*:\s*Performing A_EXIT_1 - forcefully exiting ", "verify_stopped:.*Resource .* was active at shutdown. You may ignore this error if it is unmanaged.", "error: attrd_connection_destroy:.*Lost connection to attrd", r".*:\s*Executing .* fencing operation \(.*\) on ", @@ -228,9 +228,9 @@ def __init__(self, name): r"cib.*error:.*Corosync connection lost", r"stonith-ng.*error:.*Corosync connection terminated", r"pacemaker-execd.*error:.*Connection to stonith-ng.* (failed|closed)", - r"crmd.*State transition .* S_RECOVERY", - r"crmd.*error:.*Input (I_ERROR|I_TERMINATE ) .*received in state", - r"crmd.*error:.*Could not recover from internal error", + r"pacemaker-controld.*State transition .* S_RECOVERY", + r"pacemaker-controld.*error:.*Input (I_ERROR|I_TERMINATE ) .*received in state", + r"pacemaker-controld.*error:.*Could not recover from internal error", r"error:.*Connection to cib_(shm|rw).* (failed|closed)", r"error:.*STONITH connection failed", r"error: Connection to stonith-ng.* (failed|closed)", @@ -242,9 +242,9 @@ def __init__(self, name): r"attrd.*:\s*(crit|error):.*Lost connection to (Corosync|CIB) service", r"stonith.*:\s*(Corosync connection terminated|Shutting down)", r"cib.*:\s*Corosync connection lost!\s+Exiting.", - r"crmd.*:\s*(connection terminated|Disconnected from Corosync)", + r"pacemaker-controld.*:\s*(connection terminated|Disconnected from Corosync)", r"pengine.*Scheduling Node .* for STONITH", - r"crmd.*:\s*Peer .* was terminated \(.*\) by .* for .*:\s*OK", + r"pacemaker-controld.*:\s*Peer .* was terminated \(.*\) by .* for .*:\s*OK", ] self.components["cib-ignore"] = [ @@ -256,53 +256,53 @@ def __init__(self, name): self.components["cib"] = [ "State transition .* S_RECOVERY", - r"Respawning failed child process: (pacemaker-attrd|crmd)", + r"Respawning failed child process: (pacemaker-attrd|pacemaker-controld)", "Connection to cib_.* failed", "Connection to cib_.* closed", - r"crmd.*:.*Connection to the CIB terminated...", + r"pacemaker-controld.*:.*Connection to the CIB terminated...", r"attrd.*:.*(Lost connection to CIB service|Connection to the CIB terminated)", - r"crmd\[[0-9]+\] exited with status 1 \(", + r"pacemaker-controld\[[0-9]+\] exited with status 1 \(", r"attrd\[[0-9]+\] exited with status 102 \(", - r"crmd.*: Input I_TERMINATE .*from do_recover", - "crmd.*I_ERROR.*crmd_cib_connection_destroy", - "crmd.*Could not recover from internal error", + r"pacemaker-controld.*: Input I_TERMINATE .*from do_recover", + "pacemaker-controld.*I_ERROR.*crmd_cib_connection_destroy", + "pacemaker-controld.*Could not recover from internal error", ] self.components["pacemaker-execd"] = [ - r"crmd.*Connection to (pacemaker-execd|lrmd|executor) (failed|closed)", - r"crmd.*I_ERROR.*lrm_connection_destroy", - r"crmd.*State transition .* S_RECOVERY", - r"crmd.*: Input I_TERMINATE .*from do_recover", - r"crmd.*Could not recover from internal error", + r"pacemaker-controld.*Connection to (pacemaker-execd|lrmd|executor) (failed|closed)", + r"pacemaker-controld.*I_ERROR.*lrm_connection_destroy", + r"pacemaker-controld.*State transition .* S_RECOVERY", + r"pacemaker-controld.*: Input I_TERMINATE .*from do_recover", + r"pacemaker-controld.*Could not recover from internal error", r"pacemakerd.*pacemaker-execd.* terminated with signal 9", - r"pacemakerd.*crmd\[[0-9]+\] exited with status 1", + r"pacemakerd.*pacemaker-controld\[[0-9]+\] exited with status 1", r"pacemakerd.*Respawning failed child process: pacemaker-execd", - r"pacemakerd.*Respawning failed child process: crmd", + r"pacemakerd.*Respawning failed child process: pacemaker-controld", ] self.components["pacemaker-execd-ignore"] = [] - self.components["crmd"] = [ + self.components["pacemaker-controld"] = [ # "WARN: determine_online_status: Node .* is unclean", # "Scheduling Node .* for STONITH", # "Executing .* fencing operation", # Only if the node wasn't the DC: "State transition S_IDLE", "State transition .* -> S_IDLE", ] - self.components["crmd-ignore"] = [] + self.components["pacemaker-controld-ignore"] = [] self.components["pacemaker-attrd"] = [] self.components["pacemaker-attrd-ignore"] = [] self.components["pengine"] = [ "State transition .* S_RECOVERY", - r"Respawning failed child process: crmd", - r"crmd\[[0-9]+\] exited with status 1 \(", + r"Respawning failed child process: pacemaker-controld", + r"pacemaker-controld\[[0-9]+\] exited with status 1 \(", "Connection to pengine failed", "Connection to pengine.* closed", "Connection to the Policy Engine failed", - "crmd.*I_ERROR.*save_cib_contents", - r"crmd.*: Input I_TERMINATE .*from do_recover", - "crmd.*Could not recover from internal error", + "pacemaker-controld.*I_ERROR.*save_cib_contents", + r"pacemaker-controld.*: Input I_TERMINATE .*from do_recover", + "pacemaker-controld.*Could not recover from internal error", ] self.components["pengine-ignore"] = [] @@ -311,7 +311,7 @@ def __init__(self, name): "LRMD lost STONITH connection", "Connection to stonith-ng.* closed", "Fencing daemon connection failed", - r"crmd.*:\s*warn.*:\s*Callback already present", + r"pacemaker-controld.*:\s*warn.*:\s*Callback already present", ] self.components["stonith-ignore"] = [ r"pengine.*: Recover Fencing", @@ -321,7 +321,7 @@ def __init__(self, name): r"crit:.*Fencing daemon connection failed", r"error:.*Sign-in failed: triggered a retry", "STONITH connection failed, finalizing .* pending operations.", - r"crmd.*:\s+Result of .* operation for Fencing.*Error", + r"pacemaker-controld.*:\s+Result of .* operation for Fencing.*Error", ] self.components["stonith-ignore"].extend(self.components["common-ignore"]) diff --git a/daemons/attrd/pacemaker-attrd.c b/daemons/attrd/pacemaker-attrd.c index fdf96f80aad..89f522f8dd3 100644 --- a/daemons/attrd/pacemaker-attrd.c +++ b/daemons/attrd/pacemaker-attrd.c @@ -127,13 +127,13 @@ attrd_erase_cb(xmlNode *msg, int call_id, int rc, xmlNode *output, * \brief Wipe all transient attributes for this node from the CIB * * Clear any previous transient node attributes from the CIB. This is - * normally done by the DC's crmd when this node leaves the cluster, but + * normally done by the DC's controller when this node leaves the cluster, but * this handles the case where the node restarted so quickly that the * cluster layer didn't notice. * - * \todo If attrd respawns after crashing (see PCMK_respawned), ideally we'd - * skip this and sync our attributes from the writer. However, currently - * we reject any values for us that the writer has, in + * \todo If pacemaker-attrd respawns after crashing (see PCMK_respawned), + * ideally we'd skip this and sync our attributes from the writer. + * However, currently we reject any values for us that the writer has, in * attrd_peer_update(). */ static void diff --git a/daemons/controld/Makefile.am b/daemons/controld/Makefile.am index 3d9b6c7863a..54bfaec7ee8 100644 --- a/daemons/controld/Makefile.am +++ b/daemons/controld/Makefile.am @@ -10,7 +10,7 @@ include $(top_srcdir)/Makefile.common halibdir = $(CRM_DAEMON_DIR) ## binary progs -halib_PROGRAMS = crmd +halib_PROGRAMS = pacemaker-controld ## SOURCES @@ -19,27 +19,27 @@ noinst_HEADERS = crmd_alerts.h crmd_callbacks.h crmd_fsa.h crmd.h \ fsa_matrix.h fsa_proto.h membership.h te_callbacks.h \ tengine.h throttle.h crmd_metadata.h -crmd_CFLAGS = $(CFLAGS_HARDENED_EXE) -crmd_LDFLAGS = $(LDFLAGS_HARDENED_EXE) - -crmd_LDADD = $(top_builddir)/lib/fencing/libstonithd.la \ - $(top_builddir)/lib/transition/libtransitioner.la \ - $(top_builddir)/lib/pengine/libpe_rules.la \ - $(top_builddir)/lib/cib/libcib.la \ - $(top_builddir)/lib/cluster/libcrmcluster.la \ - $(top_builddir)/lib/common/libcrmcommon.la \ - $(top_builddir)/lib/services/libcrmservice.la \ - $(top_builddir)/lib/lrmd/liblrmd.la \ - $(CLUSTERLIBS) - -crmd_SOURCES = main.c corosync.c crmd_metadata.c \ - fsa.c control.c messages.c membership.c callbacks.c attrd.c \ - election.c join_client.c join_dc.c throttle.c \ - cib.c pengine.c tengine.c lrm.c lrm_state.c remote_ra.c \ - utils.c misc.c te_events.c te_actions.c te_utils.c te_callbacks.c +pacemaker_controld_CFLAGS = $(CFLAGS_HARDENED_EXE) +pacemaker_controld_LDFLAGS = $(LDFLAGS_HARDENED_EXE) + +pacemaker_controld_LDADD = $(top_builddir)/lib/fencing/libstonithd.la \ + $(top_builddir)/lib/transition/libtransitioner.la \ + $(top_builddir)/lib/pengine/libpe_rules.la \ + $(top_builddir)/lib/cib/libcib.la \ + $(top_builddir)/lib/cluster/libcrmcluster.la \ + $(top_builddir)/lib/common/libcrmcommon.la \ + $(top_builddir)/lib/services/libcrmservice.la \ + $(top_builddir)/lib/lrmd/liblrmd.la \ + $(CLUSTERLIBS) + +pacemaker_controld_SOURCES = main.c corosync.c crmd_metadata.c \ + fsa.c control.c messages.c membership.c callbacks.c attrd.c \ + election.c join_client.c join_dc.c throttle.c \ + cib.c pengine.c tengine.c lrm.c lrm_state.c remote_ra.c \ + utils.c misc.c te_events.c te_actions.c te_utils.c te_callbacks.c if BUILD_XML_HELP -man7_MANS = crmd.7 +man7_MANS = pacemaker-controld.7 endif CLEANFILES = $(man7_MANS) diff --git a/daemons/controld/callbacks.c b/daemons/controld/callbacks.c index 01db3c8e4b1..41c45c15412 100644 --- a/daemons/controld/callbacks.c +++ b/daemons/controld/callbacks.c @@ -82,9 +82,9 @@ peer_update_callback(enum crm_status_type type, crm_node_t * node, const void *d bool is_remote = is_set(node->flags, crm_remote_node); const char *status = NULL; - /* Crmd waits to receive some information from the membership layer before - * declaring itself operational. If this is being called for a cluster node, - * indicate that we have it. + /* The controller waits to receive some information from the membership + * layer before declaring itself operational. If this is being called for a + * cluster node, indicate that we have it. */ if (!is_remote) { set_bit(fsa_input_register, R_PEER_DATA); diff --git a/daemons/controld/control.c b/daemons/controld/control.c index b19aba31d9d..2abc4211528 100644 --- a/daemons/controld/control.c +++ b/daemons/controld/control.c @@ -375,7 +375,7 @@ do_exit(long long action, } verify_stopped(cur_state, LOG_ERR); - do_crm_log(log_level, "Performing %s - %s exiting the CRMd", + do_crm_log(log_level, "Performing %s - %s exiting the controller", fsa_action2string(action), exit_type); crm_info("[%s] stopped (%d)", crm_system_name, exit_code); @@ -541,7 +541,7 @@ crmd_ipc_dispatch(qb_ipcs_connection_t * c, void *data, size_t size) #endif crm_trace("Processing msg from %s", crm_client_name(client)); - crm_log_xml_trace(msg, "CRMd[inbound]"); + crm_log_xml_trace(msg, "controller[inbound]"); crm_xml_add(msg, F_CRM_SYS_FROM, client->id); if (crmd_authorize_message(msg, client, NULL)) { @@ -728,9 +728,9 @@ static pe_cluster_option crmd_opts[] = { void crmd_metadata(void) { - config_metadata("CRM Daemon", "1.0", - "CRM Daemon Options", - "This is a fake resource that details the options that can be configured for the CRM Daemon.", + config_metadata("pacemaker-controld", "1.0", + "controller properties", + "Cluster properties used by Pacemaker's controller", crmd_opts, DIMOF(crmd_opts)); } diff --git a/daemons/controld/crmd_lrm.h b/daemons/controld/crmd_lrm.h index 506780d0f8c..e3e3c27a36c 100644 --- a/daemons/controld/crmd_lrm.h +++ b/daemons/controld/crmd_lrm.h @@ -111,11 +111,11 @@ lrm_state_t *lrm_state_find(const char *node_name); lrm_state_t *lrm_state_find_or_create(const char *node_name); /*! - * The functions below are wrappers for the executor API calls the crmd - * uses. These wrapper functions allow us to treat the crmd's remote + * The functions below are wrappers for the executor API the the controller + * uses. These wrapper functions allow us to treat the controller's remote * executor connection resources the same as regular resources. Internally, * regular resources go to the executor, and remote connection resources are - * handled locally in the crmd. + * handled locally in the controller. */ void lrm_state_disconnect_only(lrm_state_t * lrm_state); void lrm_state_disconnect(lrm_state_t * lrm_state); diff --git a/daemons/controld/fsa_defines.h b/daemons/controld/fsa_defines.h index e16437068a4..79c1da4f3a0 100644 --- a/daemons/controld/fsa_defines.h +++ b/daemons/controld/fsa_defines.h @@ -9,7 +9,7 @@ # define FSA_DEFINES__H /*====================================== - * States the DC/CRMd can be in + * States the controller can be in *======================================*/ enum crmd_fsa_state { S_IDLE = 0, /* Nothing happening */ @@ -27,7 +27,7 @@ enum crmd_fsa_state { * to form a complete and up-to-date picture of * the CIB */ - S_NOT_DC, /* we are in crmd/slave mode */ + S_NOT_DC, /* we are in non-DC mode */ S_POLICY_ENGINE, /* Determine next stable state of the cluster */ S_RECOVERY, /* Something bad happened, check everything is ok * before continuing and attempt to recover if @@ -128,11 +128,10 @@ enum crmd_fsa_state { S_SHUTDOWN. Similarly if any other point in the shutdown fails or stalls, this is escalated and we end up in S_TERMINATE. - At any point, the CRMd/DC can relay messages for its sub-systems, - but outbound messages (from sub-systems) should probably be blocked - until S_INTEGRATION (for the DC case) or the join protocol has - completed (for the CRMd case) - + At any point, the controller can relay messages for its subsystems, + but outbound messages (from subsystems) should probably be blocked + until S_INTEGRATION (for the DC) or the join protocol has + completed (for non-DC controllers). */ /*====================================== @@ -448,7 +447,7 @@ enum crmd_fsa_input { # define R_IN_RECOVERY 0x80000000ULL /* - * Magic RC used within CRMd to indicate direct nacks + * Magic RC used within the controller to indicate direct nacks * (operation is invalid in current state) */ #define CRM_DIRECT_NACK_RC (99) diff --git a/daemons/controld/join_client.c b/daemons/controld/join_client.c index 8e07a3f7b21..12bcd69c8be 100644 --- a/daemons/controld/join_client.c +++ b/daemons/controld/join_client.c @@ -274,15 +274,15 @@ do_cl_join_finalize_respond(long long action, join_id, fsa_our_dc); /* - * If this is the node's first join since the crmd started on it, + * If this is the node's first join since the controller started on it, * set its initial state (standby or member) according to the user's * preference. * * We do not clear the LRM history here. Even if the DC failed to do it * when we last left, removing them here creates a race condition if the - * crmd is being recovered. Instead of a list of active resources from - * the executor, we may end up with a blank status section. If we are - * _NOT_ lucky, we will probe for the "wrong" instance of anonymous + * controller is being recovered. Instead of a list of active resources + * from the executor, we may end up with a blank status section. If we + * are _NOT_ lucky, we will probe for the "wrong" instance of anonymous * clones and end up with multiple active instances on the machine. */ if (first_join && is_not_set(fsa_input_register, R_SHUTDOWN)) { diff --git a/daemons/controld/join_dc.c b/daemons/controld/join_dc.c index e52139b23c0..d6766ed8012 100644 --- a/daemons/controld/join_dc.c +++ b/daemons/controld/join_dc.c @@ -482,8 +482,8 @@ finalize_sync_callback(xmlNode * msg, int call_id, int rc, xmlNode * output, voi } } else { - crm_debug("No longer the DC in S_FINALIZE_JOIN: %s/%s", - AM_I_DC ? "DC" : "CRMd", fsa_state2string(fsa_state)); + crm_debug("No longer the DC in S_FINALIZE_JOIN: %s in %s", + AM_I_DC ? "DC" : "controller", fsa_state2string(fsa_state)); } } diff --git a/daemons/controld/lrm.c b/daemons/controld/lrm.c index 4087fc6a638..524c9b7b987 100644 --- a/daemons/controld/lrm.c +++ b/daemons/controld/lrm.c @@ -298,8 +298,9 @@ lrm_op_callback(lrmd_event_data_t * op) nodename = op->remote_nodename ? op->remote_nodename : fsa_our_uname; if (op->type == lrmd_event_disconnect && (safe_str_eq(nodename, fsa_our_uname))) { - /* if this is the local lrmd ipc connection, set the right bits in the - * crmd when the connection goes down */ + /* If this is the local executor IPC connection, set the right bits in the + * controller when the connection goes down. + */ lrm_connection_destroy(); return; } else if (op->type != lrmd_event_exec_complete) { @@ -695,7 +696,7 @@ build_operation_update(xmlNode * parent, lrmd_rsc_info_t * rsc, lrmd_event_data_ if (metadata == NULL) { /* For now, we always collect resource agent meta-data via a local, * synchronous, direct execution of the agent. This has multiple issues: - * the executor should execute agents, not the crmd; meta-data for + * the executor should execute agents, not the controller; meta-data for * Pacemaker Remote nodes should be collected on those nodes, not * locally; and the meta-data call shouldn't eat into the timeout of the * real action being performed. diff --git a/daemons/controld/lrm_state.c b/daemons/controld/lrm_state.c index 6c75f0dd407..4eb9ee9d8de 100644 --- a/daemons/controld/lrm_state.c +++ b/daemons/controld/lrm_state.c @@ -439,7 +439,7 @@ static void crmd_proxy_dispatch(const char *session, xmlNode *msg) { - crm_log_xml_trace(msg, "CRMd-PROXY[inbound]"); + crm_log_xml_trace(msg, "controller-proxy[inbound]"); crm_xml_add(msg, F_CRM_SYS_FROM, session); if (crmd_authorize_message(msg, NULL, session)) { @@ -521,9 +521,8 @@ crmd_remote_proxy_cb(lrmd_t *lrmd, void *userdata, xmlNode *msg) return; } else if (safe_str_eq(op, LRMD_IPC_OP_REQUEST) && proxy && proxy->is_local) { - /* this is for the crmd, which we are, so don't try - * and connect/send to ourselves over ipc. instead - * do it directly. + /* This is for the controller, which we are, so don't try + * to send to ourselves over IPC -- do it directly. */ int flags = 0; xmlNode *request = get_message_xml(msg, F_LRMD_IPC_MSG); @@ -701,9 +700,6 @@ lrm_state_unregister_rsc(lrm_state_t * lrm_state, return -ENOTCONN; } - /* optimize this... this function is a synced round trip from client to daemon. - * The crmd/lrm.c code path that uses this function should always treat it as an - * async operation. The lrmd client api needs to make an async version unreg available. */ if (is_remote_lrmd_ra(NULL, NULL, rsc_id)) { lrm_state_destroy(rsc_id); return pcmk_ok; @@ -711,6 +707,11 @@ lrm_state_unregister_rsc(lrm_state_t * lrm_state, g_hash_table_remove(lrm_state->rsc_info_cache, rsc_id); + /* @TODO Optimize this ... this function is a blocking round trip from + * client to daemon. The pacemaker-controld/lrm.c code path that uses this + * function should always treat it as an async operation. The executor API + * should make an async version available. + */ return ((lrmd_t *) lrm_state->conn)->cmds->unregister_rsc(lrm_state->conn, rsc_id, options); } diff --git a/daemons/controld/main.c b/daemons/controld/main.c index 174e9fbb3df..346e3e2c37a 100644 --- a/daemons/controld/main.c +++ b/daemons/controld/main.c @@ -1,19 +1,8 @@ -/* - * Copyright (C) 2004 Andrew Beekhof - * - * 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 software 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 library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +/* + * Copyright 2004-2018 Andrew Beekhof + * + * This source code is licensed under the GNU General Public License version 2 + * or later (GPLv2+) WITHOUT ANY WARRANTY. */ #include @@ -171,7 +160,8 @@ crmd_init(void) exit_code = CRM_EX_ERROR; } - crm_info("crmd[%lu] exiting with status %d (%s)", - (unsigned long) getpid(), exit_code, crm_exit_str(exit_code)); + crm_info("%s[%lu] exiting with status %d (%s)", + crm_system_name, (unsigned long) getpid(), exit_code, + crm_exit_str(exit_code)); return crmd_fast_exit(exit_code); } diff --git a/daemons/controld/membership.h b/daemons/controld/membership.h index dabc0819d11..4798f6527db 100644 --- a/daemons/controld/membership.h +++ b/daemons/controld/membership.h @@ -1,7 +1,26 @@ +/* + * Copyright 2012-2018 Andrew Beekhof + * + * This source code is licensed under the GNU Lesser General Public License + * version 2.1 or later (LGPLv2.1+) WITHOUT ANY WARRANTY. + */ +#ifndef MEMBERSHIP__H +# define MEMBERSHIP__H + +#ifdef __cplusplus +extern "C" { +#endif + #include void post_cache_update(int instance); extern gboolean check_join_state(enum crmd_fsa_state cur_state, const char *source); -#define proc_flags (crm_proc_crmd | crm_get_cluster_proc()) +#define proc_flags (crm_proc_controld | crm_get_cluster_proc()) + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/daemons/controld/messages.c b/daemons/controld/messages.c index 12842c0bfe9..708c24a9e3a 100644 --- a/daemons/controld/messages.c +++ b/daemons/controld/messages.c @@ -413,7 +413,7 @@ relay_message(xmlNode * msg, gboolean originated_locally) send_msg_via_ipc(msg, sys_to); } else if (AM_I_DC) { - ROUTER_RESULT("Message result: DC/CRMd process"); + ROUTER_RESULT("Message result: DC/controller process"); processing_complete = FALSE; /* more to be done by caller */ } else if (originated_locally && safe_str_neq(sys_from, CRM_SYSTEM_PENGINE) && safe_str_neq(sys_from, CRM_SYSTEM_TENGINE)) { @@ -439,7 +439,7 @@ relay_message(xmlNode * msg, gboolean originated_locally) } } else if (is_local && (is_for_crm || is_for_cib)) { - ROUTER_RESULT("Message result: CRMd process"); + ROUTER_RESULT("Message result: controller process"); processing_complete = FALSE; /* more to be done by caller */ } else if (is_local) { @@ -942,7 +942,7 @@ handle_response(xmlNode * stored_msg) const char *host_from = crm_element_value(stored_msg, F_CRM_HOST_FROM); crm_err("Unexpected response (op=%s, src=%s) sent to the %s", - op, host_from, AM_I_DC ? "DC" : "CRMd"); + op, host_from, AM_I_DC ? "DC" : "controller"); } } diff --git a/daemons/controld/remote_ra.c b/daemons/controld/remote_ra.c index 027136c192b..7fbb19f53c5 100644 --- a/daemons/controld/remote_ra.c +++ b/daemons/controld/remote_ra.c @@ -70,10 +70,11 @@ typedef struct remote_ra_data_s { enum remote_migration_status migrate_status; gboolean active; - gboolean is_maintenance; /* kind of complex to determine from crmd-context - * so we have it signalled back with the - * transition from pengine - */ + + /* Maintenance mode is difficult to determine from the controller's context, + * so we have it signalled back with the transition from pengine. + */ + gboolean is_maintenance; } remote_ra_data_t; static int handle_remote_ra_start(lrm_state_t * lrm_state, remote_ra_cmd_t * cmd, int timeout_ms); diff --git a/daemons/controld/te_utils.c b/daemons/controld/te_utils.c index 319cb17154a..3d85e586c95 100644 --- a/daemons/controld/te_utils.c +++ b/daemons/controld/te_utils.c @@ -1,19 +1,8 @@ /* - * Copyright (C) 2004 Andrew Beekhof + * Copyright 2004-2018 Andrew Beekhof * - * 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 software 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 library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + * This source code is licensed under the GNU General Public License version 2 + * or later (GPLv2+) WITHOUT ANY WARRANTY. */ #include @@ -295,8 +284,8 @@ tengine_stonith_notify(stonith_t * st, stonith_event_t * st_event) /* @TODO Ideally, at this point, we'd check whether the fenced node * hosted any guest nodes, and call remote_node_down() for them. - * Unfortunately, the crmd doesn't have a simple, reliable way to - * map hosts to guests. It might be possible to track this in the + * Unfortunately, the controller doesn't have a simple, reliable way + * to map hosts to guests. It might be possible to track this in the * peer cache via crm_remote_peer_cache_refresh(). For now, we rely * on the PE creating fence pseudo-events for the guests. */ diff --git a/daemons/execd/execd_commands.c b/daemons/execd/execd_commands.c index 587b8fb5dcb..195fad285f2 100644 --- a/daemons/execd/execd_commands.c +++ b/daemons/execd/execd_commands.c @@ -284,8 +284,9 @@ merge_recurring_duplicate(lrmd_rsc_t * rsc, lrmd_cmd_t * cmd) merge_dup: - /* This should not occur, if it does we need to investigate in the crmd - * how something like this is possible */ + /* This should not occur. If it does, we need to investigate how something + * like this is possible in the controller. + */ crm_warn("Duplicate recurring op entry detected (" CRM_OP_FMT "), merging with previous op entry", rsc->rsc_id, normalize_action_name(rsc, dup->action), @@ -332,7 +333,9 @@ schedule_lrmd_cmd(lrmd_rsc_t * rsc, lrmd_cmd_t * cmd) return; } - /* crmd expects lrmd to automatically cancel recurring ops before rsc stops. */ + /* The controller expects the executor to automatically cancel + * recurring operations before a resource stops. + */ if (safe_str_eq(cmd->action, "stop")) { cancel_all_recurring(rsc, NULL); } @@ -1286,7 +1289,7 @@ process_lrmd_signon(crm_client_t *client, xmlNode *request, int call_id) crm_xml_add(reply, F_LRMD_PROTOCOL_VERSION, LRMD_PROTOCOL_VERSION); if (crm_is_true(is_ipc_provider)) { - /* this is a remote connection from a cluster nodes crmd */ + // This is a remote connection from a cluster node's controller #ifdef SUPPORT_REMOTE ipc_proxy_add_provider(client); #endif diff --git a/daemons/execd/pacemaker-execd.c b/daemons/execd/pacemaker-execd.c index 4905fb19afe..532bb2b8409 100644 --- a/daemons/execd/pacemaker-execd.c +++ b/daemons/execd/pacemaker-execd.c @@ -327,9 +327,9 @@ lrmd_shutdown(int nsig) /* Stop accepting new proxy connections */ lrmd_tls_server_destroy(); - /* Older crmd versions will never acknowledge our request, so set a - * fairly short timeout to exit quickly in that case. If we get the - * ack, we'll defuse this timer. + /* Older controller versions will never acknowledge our request, so + * set a fairly short timeout to exit quickly in that case. If we + * get the ack, we'll defuse this timer. */ shutdown_ack_timer = g_timeout_add_seconds(20, lrmd_exit, NULL); diff --git a/daemons/execd/remoted_proxy.c b/daemons/execd/remoted_proxy.c index 53577491772..d430cd396f3 100644 --- a/daemons/execd/remoted_proxy.c +++ b/daemons/execd/remoted_proxy.c @@ -28,7 +28,7 @@ static qb_ipcs_service_t *attrd_ipcs = NULL; static qb_ipcs_service_t *crmd_ipcs = NULL; static qb_ipcs_service_t *stonith_ipcs = NULL; -/* ipc providers == crmd clients connecting from cluster nodes */ +// An IPC provider is a cluster node controller connecting as a client static GList *ipc_providers = NULL; /* ipc clients == things like cibadmin, crm_resource, connecting locally */ static GHashTable *ipc_clients = NULL; @@ -162,7 +162,9 @@ ipc_proxy_forward_client(crm_client_t *ipc_proxy, xmlNode *xml) * Looking at the chain of events. * * -----remote node----------------|---- cluster node ------ - * ipc_client <--1--> this code <--2--> crmd:remote_proxy_cb/remote_proxy_relay_event() <----3----> ipc server + * ipc_client <--1--> this code + * <--2--> pacemaker-controld:remote_proxy_cb/remote_proxy_relay_event() + * <--3--> ipc server * * This function is receiving a msg from connection 2 * and forwarding it to connection 1. @@ -215,7 +217,9 @@ ipc_proxy_dispatch(qb_ipcs_connection_t * c, void *data, size_t size) * Looking at the chain of events. * * -----remote node----------------|---- cluster node ------ - * ipc_client <--1--> this code <--2--> crmd:remote_proxy_dispatch_internal() <----3----> ipc server + * ipc_client <--1--> this code + * <--2--> pacemaker-controld:remote_proxy_dispatch_internal() + * <--3--> ipc server * * This function is receiving a request from connection * 1 and forwarding it to connection 2. @@ -231,8 +235,9 @@ ipc_proxy_dispatch(qb_ipcs_connection_t * c, void *data, size_t size) CRM_CHECK(client->id != NULL, crm_err("Invalid client: %p", client); free_xml(request); return FALSE); - /* this ensures that synced request/responses happen over the event channel - * in the crmd, allowing the crmd to process the messages async */ + /* This ensures that synced request/responses happen over the event channel + * in the controller, allowing the controller to process the messages async. + */ set_bit(flags, crm_ipc_proxied); client->request_id = id; @@ -265,7 +270,7 @@ ipc_proxy_shutdown_req(crm_client_t *ipc_proxy) crm_xml_add(msg, F_LRMD_IPC_OP, LRMD_IPC_OP_SHUTDOWN_REQ); - /* We don't really have a session, but crmd needs this attribute + /* We don't really have a session, but the controller needs this attribute * to recognize this as proxy communication. */ crm_xml_add(msg, F_LRMD_IPC_SESSION, "0"); @@ -408,8 +413,8 @@ ipc_proxy_init(void) stonith_ipc_server_init(&stonith_ipcs, &stonith_proxy_callbacks); crmd_ipcs = crmd_ipc_server_init(&crmd_proxy_callbacks); if (crmd_ipcs == NULL) { - crm_err("Failed to create crmd server: exiting and inhibiting respawn."); - crm_warn("Verify pacemaker and pacemaker_remote are not both enabled."); + crm_err("Failed to create controller: exiting and inhibiting respawn"); + crm_warn("Verify pacemaker and pacemaker_remote are not both enabled"); crm_exit(CRM_EX_FATAL); } } diff --git a/daemons/pacemakerd/pacemaker.combined.upstart.in b/daemons/pacemakerd/pacemaker.combined.upstart.in index b13993dc2e5..af59ff05d14 100644 --- a/daemons/pacemakerd/pacemaker.combined.upstart.in +++ b/daemons/pacemakerd/pacemaker.combined.upstart.in @@ -54,12 +54,12 @@ post-stop script # if you use watchdog of corosync, uncomment the line below. #pidof corosync || false - pidof crmd || stop corosync + pidof pacemaker-controld || stop corosync # if you want to reboot a machine by watchdog of corosync when # pacemakerd disappeared unexpectedly, uncomment the line below # and invalidate above "respawn" stanza. - #pidof crmd && killall -q -9 corosync + #pidof pacemaker-controld && killall -q -9 corosync # if you use crm_mon, uncomment the line below. #stop crm_mon diff --git a/daemons/pacemakerd/pacemaker.in b/daemons/pacemakerd/pacemaker.in index 273de9aa90e..ba677be5efc 100644 --- a/daemons/pacemakerd/pacemaker.in +++ b/daemons/pacemakerd/pacemaker.in @@ -131,7 +131,7 @@ stop() { shutdown_prog=$prog if ! status $prog > /dev/null 2>&1; then - shutdown_prog="crmd" + shutdown_prog="pacemaker-controld" fi if status $shutdown_prog > /dev/null 2>&1; then @@ -151,8 +151,9 @@ stop() rm -f "$LOCK_FILE" rm -f "@localstatedir@/run/$prog.pid" - killall -q -9 pacemakerd pacemaker-attrd pacemaker-execd \ - crmd stonithd cib + killall -q -9 pacemakerd pacemaker-attrd pacemaker-controld \ + pacemaker-execd \ + stonithd cib success echo } diff --git a/daemons/pacemakerd/pacemaker.service.in b/daemons/pacemakerd/pacemaker.service.in index 9bf6e0682a4..1a70bf896ea 100644 --- a/daemons/pacemakerd/pacemaker.service.in +++ b/daemons/pacemakerd/pacemaker.service.in @@ -64,13 +64,14 @@ SendSIGKILL=no # However, the node will likely end up being fenced as a result, so it's # not enabled by default. # -# ExecStopPost=/usr/bin/killall -TERM pacemaker-attrd pacemaker-execd \ -# crmd stonithd cib pengine +# ExecStopPost=/usr/bin/killall -TERM pacemaker-attrd pacemaker-controld \ +# pacemaker-execd \ +# stonithd cib pengine # If you want Corosync to stop whenever Pacemaker is stopped, # uncomment the next line too: # -# ExecStopPost=/bin/sh -c 'pidof crmd || killall -TERM corosync' +# ExecStopPost=/bin/sh -c 'pidof pacemaker-controld || killall -TERM corosync' # Uncomment this for older versions of systemd that didn't support # TimeoutStopSec diff --git a/daemons/pacemakerd/pacemaker.sysconfig b/daemons/pacemakerd/pacemaker.sysconfig index 2a85d123597..75103f9007f 100644 --- a/daemons/pacemakerd/pacemaker.sysconfig +++ b/daemons/pacemakerd/pacemaker.sysconfig @@ -5,9 +5,9 @@ # Subsystems are: # pacemakerd # pacemaker-attrd +# pacemaker-controld # pacemaker-execd # cib -# crmd # pengine # stonith-ng # PCMK_debug=no @@ -52,9 +52,9 @@ # rolling buffer of all logs (including info, debug, and trace) and is written # after a crash or assertion failure, and/or when SIGTRAP is received. The # blackbox recorder can also be enabled for Pacemaker daemons at runtime by -# sending SIGUSR1 (or SIGTRAP), and disabled by sending SIGUSR2. Multiple -# subsystems may be listed separated by commas, e.g. PCMK_blackbox=crmd,pengine -# PCMK_blackbox=yes|no|crmd|pengine|cib|stonith-ng|pacemaker-attrd|pacemakerd +# sending SIGUSR1 (or SIGTRAP), and disabled by sending SIGUSR2. Specify value +# as for PCMK_debug above. +# PCMK_blackbox=no #==#==# Advanced use only @@ -118,14 +118,12 @@ # for some (inexpensive) memory checks. # MALLOC_CHECK_=3 -# Set to yes/no or cib,crmd etc. to run some or all daemons under valgrind. -# PCMK_valgrind_enabled=yes -# PCMK_valgrind_enabled=cib,crmd +# Set as for PCMK_debug above to run some or all daemons under valgrind. +# PCMK_valgrind_enabled=no -# Set to yes/no or cib,crmd etc. to run some or all daemons under valgrind with +# Set as for PCMK_debug above to run some or all daemons under valgrind with # the callgrind tool enabled. -# PCMK_callgrind_enabled=yes -# PCMK_callgrind_enabled=cib,crmd +# PCMK_callgrind_enabled=no # Set the options to pass to valgrind, when valgrind is enabled. See # valgrind(1) man page for details. "--vgdb=no" is specified because diff --git a/daemons/pacemakerd/pacemakerd.c b/daemons/pacemakerd/pacemakerd.c index bff4a9d7174..60038714543 100644 --- a/daemons/pacemakerd/pacemakerd.c +++ b/daemons/pacemakerd/pacemakerd.c @@ -50,7 +50,7 @@ typedef struct pcmk_child_s { } pcmk_child_t; /* Index into the array below */ -#define pcmk_child_crmd 3 +#define pcmk_child_controld 3 /* *INDENT-OFF* */ static pcmk_child_t pcmk_children[] = { { 0, crm_proc_none, 0, 0, FALSE, "none", NULL, NULL }, @@ -59,7 +59,10 @@ static pcmk_child_t pcmk_children[] = { NULL, CRM_DAEMON_DIR "/pacemaker-execd" }, { 0, crm_proc_cib, 1, 0, TRUE, "cib", CRM_DAEMON_USER, CRM_DAEMON_DIR"/cib" }, - { 0, crm_proc_crmd, 6, 0, TRUE, "crmd", CRM_DAEMON_USER, CRM_DAEMON_DIR"/crmd" }, + { + 0, crm_proc_controld, 6, 0, TRUE, "pacemaker-controld", + CRM_DAEMON_USER, CRM_DAEMON_DIR "/pacemaker-controld" + }, { 0, crm_proc_attrd, 4, 0, TRUE, "pacemaker-attrd", CRM_DAEMON_USER, CRM_DAEMON_DIR "/pacemaker-attrd" @@ -383,7 +386,7 @@ pcmk_shutdown_worker(gpointer user_data) next_log = now + 30; child->respawn = FALSE; stop_child(child, SIGTERM); - if (phase < pcmk_children[pcmk_child_crmd].start_seq) { + if (phase < pcmk_children[pcmk_child_controld].start_seq) { g_timeout_add(180000 /* 3m */ , escalate_shutdown, child); } diff --git a/doc/Clusters_from_Scratch/en-US/Ch-Verification.txt b/doc/Clusters_from_Scratch/en-US/Ch-Verification.txt index 1b6baf79c34..e94a83f11fc 100644 --- a/doc/Clusters_from_Scratch/en-US/Ch-Verification.txt +++ b/doc/Clusters_from_Scratch/en-US/Ch-Verification.txt @@ -105,7 +105,7 @@ the necessary processes are running: 1382 ? Ss 0:00 \_ /usr/libexec/pacemaker/pacemaker-execd 1383 ? Ss 0:00 \_ /usr/libexec/pacemaker/pacemaker-attrd 1384 ? Ss 0:00 \_ /usr/libexec/pacemaker/pengine - 1385 ? Ss 0:00 \_ /usr/libexec/pacemaker/crmd + 1385 ? Ss 0:00 \_ /usr/libexec/pacemaker/pacemaker-controld ---- If that looks OK, check the `pcs status` output: diff --git a/doc/Pacemaker_Development/en-US/Ch-FAQ.txt b/doc/Pacemaker_Development/en-US/Ch-FAQ.txt index 10be0e0fe32..065ba04d943 100644 --- a/doc/Pacemaker_Development/en-US/Ch-FAQ.txt +++ b/doc/Pacemaker_Development/en-US/Ch-FAQ.txt @@ -59,12 +59,13 @@ How should I format my Git commit messages?:: to indicate the severity. The important thing is that only commits with +Feature+, +Fix+, +Bug+, or +High+ will automatically be included in the change log for the next release. The +affected-code+ is the name of the - component(s) being changed, for example, +crmd+ or +libcrmcommon+ (it's more - free-form, so don't sweat getting it exact). The +explanation+ briefly - describes the change. The git project recommends the entire summary line stay - under 50 characters, but more is fine if needed for clarity. Except for the - most simple and obvious of changes, the summary should be followed by a blank - line and then a longer explanation of 'why' the change was made. + component(s) being changed, for example, +pacemaker-controld+ or + +libcrmcommon+ (it's more free-form, so don't sweat getting it exact). The + +explanation+ briefly describes the change. The git project recommends the + entire summary line stay under 50 characters, but more is fine if needed for + clarity. Except for the most simple and obvious of changes, the summary should + be followed by a blank line and then a longer explanation of 'why' the change + was made. How can I test my changes?:: Most importantly, Pacemaker has regression tests for most major components; diff --git a/doc/Pacemaker_Explained/en-US/Ch-Options.txt b/doc/Pacemaker_Explained/en-US/Ch-Options.txt index ef946a74e81..a919927b120 100644 --- a/doc/Pacemaker_Explained/en-US/Ch-Options.txt +++ b/doc/Pacemaker_Explained/en-US/Ch-Options.txt @@ -137,7 +137,8 @@ different sets of options during working hours than during weekends.) For now, we will describe the simple case where each option is present at most once. You can obtain an up-to-date list of cluster options, including -their default values, by running the `man pengine` and `man crmd` commands. +their default values, by running the `man pengine` and `man pacemaker-controld` +commands. .Cluster Options [width="95%",cols="5m,2,11 /dev/null 2>&1; then - shutdown_prog="crmd" + shutdown_prog="pacemaker-controld" fi cname=$(crm_node --name) @@ -36,7 +36,8 @@ stop() rm -f /var/lock/subsystem/pacemaker rm -f /var/run/${prog}.pid - killall -q -9 pacemakerd pacemaker-attrd pacemaker-execd crmd \ + killall -q -9 pacemakerd pacemaker-attrd pacemaker-controld \ + pacemaker-execd \ stonithd cib pacemaker-remoted } diff --git a/extra/cluster-clean b/extra/cluster-clean index 228881b5288..72129faebb7 100755 --- a/extra/cluster-clean +++ b/extra/cluster-clean @@ -47,7 +47,7 @@ if [ $kill != 0 ]; then cluster-helper $target -- "service corosync stop" &> /dev/null & cluster-helper $target -- "service pacemaker stop" &> /dev/null & - cluster-helper $target -- "killall -q -9 corosync pacemakerd pacemaker-attrd pacemaker-execd pacemaker-remoted stonithd crmd pengine cib dlm_controld gfs_controld" &> /dev/null + cluster-helper $target -- "killall -q -9 corosync pacemakerd pacemaker-attrd pacemaker-controld pacemaker-execd pacemaker-remoted stonithd pengine cib dlm_controld gfs_controld" &> /dev/null cluster-helper $target -- 'kill -9 `pidof valgrind`' &> /dev/null if [ $kill == 2 ]; then diff --git a/extra/resources/remote b/extra/resources/remote index afd8c79973b..ce10f89f896 100755 --- a/extra/resources/remote +++ b/extra/resources/remote @@ -1,33 +1,17 @@ #!/bin/sh # +# ocf:pacmaker:remote OCF resource agent # -# remote OCF RA. This script provides metadata for the internal -# pacemaker remote lrmd connection agent. Outside of acting -# as a place holder so the remote ra script can be indexed and -# providing metadata, this script should never be invoked. The -# actual functionality behind the remote lrmd connection lives -# within pacemaker's crmd component. +# This script provides metadata for Pacemaker's internal remote agent. +# Outside of acting as a placeholder so the agent can be indexed, and +# providing metadata, this script should never be invoked. The actual +# functionality behind the remote connection lives within Pacemaker's +# controller daemon. # -# Copyright (c) 2013 David Vossel +# Copyright 2013-2018 David Vossel # -# This program is free software; you can redistribute it and/or modify -# it under the terms of version 2 of the GNU General Public License as -# published by the Free Software Foundation. -# -# This program is distributed in the hope that it would be useful, but -# WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. -# -# Further, this software is distributed without any warranty that it is -# free of the rightful claim of any third person regarding infringement -# or the like. Any license provided herein, whether implied or -# otherwise, applies only to this software file. Patent licenses, if -# any, provided herein do not apply to combinations of this program with -# other software, or any other product whatsoever. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write the Free Software Foundation, -# Inc., 59 Temple Place - Suite 330, Boston MA 02111-1307, USA. +# This source code is licensed under the GNU General Public License version 2 +# (GPLv2) WITHOUT ANY WARRANTY. # ####################################################################### diff --git a/fencing/README.md b/fencing/README.md index b5fd4b2bba3..563b350e2a5 100644 --- a/fencing/README.md +++ b/fencing/README.md @@ -15,7 +15,7 @@ In the broadest terms, stonith works like this: 1. The initiator (an external program such as `stonith_admin`, or the cluster - itself via the `crmd`) asks the local `stonithd`, "Hey, can you fence this + itself via the controller) asks the local `stonithd`, "Hey, can you fence this node?" 1. The local `stonithd` asks all the `stonithd's` in the cluster (including itself), "Hey, what fencing devices do you have access to that can fence @@ -39,7 +39,7 @@ In the broadest terms, stonith works like this: A fencing request can be initiated by the cluster or externally, using the libfencing API. -* The cluster always initiates fencing via `crmd/te_actions.c:te_fence_node()` +* The cluster always initiates fencing via `pacemaker-controld/te_actions.c:te_fence_node()` (which calls the `fence()` API). This occurs when a graph synapse contains a `CRM_OP_FENCE` XML operation. * The main external clients are `stonith_admin` and `stonith-test`. diff --git a/include/crm/cluster/internal.h b/include/crm/cluster/internal.h index 1dfe8df480a..5e3bf5c59dd 100644 --- a/include/crm/cluster/internal.h +++ b/include/crm/cluster/internal.h @@ -47,7 +47,7 @@ enum crm_proc_flag { crm_proc_execd = 0x00000010, crm_proc_cib = 0x00000100, - crm_proc_crmd = 0x00000200, + crm_proc_controld = 0x00000200, crm_proc_attrd = 0x00001000, crm_proc_stonithd = 0x00002000, @@ -82,7 +82,7 @@ peer2text(enum crm_proc_flag proc) { const char *text = "unknown"; - if (proc == (crm_proc_crmd | crm_get_cluster_proc())) { + if (proc == (crm_proc_controld | crm_get_cluster_proc())) { return "peer"; } @@ -93,8 +93,8 @@ peer2text(enum crm_proc_flag proc) case crm_proc_cib: text = "cib"; break; - case crm_proc_crmd: - text = "crmd"; + case crm_proc_controld: + text = "pacemaker-controld"; break; case crm_proc_pe: text = "pengine"; @@ -128,8 +128,9 @@ text2proc(const char *proc) if (proc && strcmp(proc, "cib") == 0) { return crm_proc_cib; - } else if (proc && strcmp(proc, "crmd") == 0) { - return crm_proc_crmd; + + } else if (proc && strcmp(proc, "pacemaker-controld") == 0) { + return crm_proc_controld; } return crm_proc_none; diff --git a/include/crm/msg_xml.h b/include/crm/msg_xml.h index aec4ae661c7..af40e4cc971 100644 --- a/include/crm/msg_xml.h +++ b/include/crm/msg_xml.h @@ -1,20 +1,10 @@ /* - * Copyright (C) 2004 Andrew Beekhof + * Copyright 2004-2018 Andrew Beekhof * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This software 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 Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + * This source code is licensed under the GNU Lesser General Public License + * version 2.1 or later (LGPLv2.1+) WITHOUT ANY WARRANTY. */ + #ifndef XML_TAGS__H # define XML_TAGS__H @@ -249,8 +239,9 @@ extern "C" { # define XML_CIB_ATTR_SHUTDOWN "shutdown" -/* LRM is a bit of a misnomer here; the crmd and pengine use these to track - * actions, which usually but not always are LRM operations +/* Aside from being an old name for the executor, LRM is a misnomer here because + * the controller and pengine use these to track actions, which are not always + * executor operations. */ // XML attribute that takes interval specification (user-facing configuration) @@ -264,9 +255,9 @@ extern "C" { # define XML_LRM_ATTR_TASK_KEY "operation_key" # define XML_LRM_ATTR_TARGET "on_node" # define XML_LRM_ATTR_TARGET_UUID "on_node_uuid" -/*! Actions to be executed on Pacemaker Remote nodes are routed through - * crmd on the cluster node hosting the remote connection. That cluster node - * is considered the router node for the action. +/*! Actions to be executed on Pacemaker Remote nodes are routed through the + * controller on the cluster node hosting the remote connection. That cluster + * node is considered the router node for the action. */ # define XML_LRM_ATTR_ROUTER_NODE "router_node" # define XML_LRM_ATTR_RSCID "rsc-id" diff --git a/lib/cluster/membership.c b/lib/cluster/membership.c index 83542e159b9..c3b7d894bd6 100644 --- a/lib/cluster/membership.c +++ b/lib/cluster/membership.c @@ -1,20 +1,10 @@ /* - * Copyright (C) 2004 Andrew Beekhof + * Copyright 2004-2018 Andrew Beekhof * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library 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 - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + * This source code is licensed under the GNU Lesser General Public License + * version 2.1 or later (LGPLv2.1+) WITHOUT ANY WARRANTY. */ + #include #ifndef _GNU_SOURCE @@ -141,7 +131,7 @@ crm_remote_peer_cache_remove(const char *node_name) * \return CRM_NODE_LOST if XML_NODE_IN_CLUSTER is false in node_state, * CRM_NODE_MEMBER otherwise * \note Unlike most boolean XML attributes, this one defaults to true, for - * backward compatibility with older crmd versions that don't set it. + * backward compatibility with older controllers that don't set it. */ static const char * remote_state_from_cib(xmlNode *node_state) diff --git a/lib/common/ipc.c b/lib/common/ipc.c index e911fcf8218..d9a044c95ed 100644 --- a/lib/common/ipc.c +++ b/lib/common/ipc.c @@ -86,7 +86,7 @@ create_request_adv(const char *task, xmlNode * msg_data, crm_err("No sys from specified"); } - /* host_from will get set for us if necessary by CRMd when routed */ + // host_from will get set for us if necessary by the controller when routed request = create_xml_node(NULL, __FUNCTION__); crm_xml_add(request, F_CRM_ORIGIN, origin); crm_xml_add(request, F_TYPE, T_CRM); @@ -456,9 +456,10 @@ crm_ipcs_recv(crm_client_t * c, void *data, size_t size, uint32_t * id, uint32_t } if (is_set(header->flags, crm_ipc_proxied)) { - /* mark this client as being the endpoint of a proxy connection. - * Proxy connections responses are sent on the event channel to avoid - * blocking the proxy daemon (crmd) */ + /* Mark this client as being the endpoint of a proxy connection. + * Proxy connections responses are sent on the event channel, to avoid + * blocking the controller serving as proxy. + */ c->flags |= crm_client_flag_ipc_proxied; } diff --git a/lib/common/watchdog.c b/lib/common/watchdog.c index 2aa4bb527c5..b9d691b53ea 100644 --- a/lib/common/watchdog.c +++ b/lib/common/watchdog.c @@ -104,10 +104,10 @@ pcmk_panic_local(void) pid_t ppid = getppid(); if(uid != 0 && ppid > 1) { - /* We're a non-root pacemaker daemon (cib, crmd, pengine, - * attrd, etc) with the original pacemakerd parent + /* We're a non-root pacemaker daemon (cib, pacemaker-controld, pengine, + * pacemaker-attrd, etc.) with the original pacemakerd parent. * - * Of these, only crmd is likely to be initiating resets + * Of these, only the controller is likely to be initiating resets. */ do_crm_log_always(LOG_EMERG, "Signaling parent %d to panic", ppid); crm_exit(CRM_EX_PANIC); diff --git a/lib/lrmd/proxy_common.c b/lib/lrmd/proxy_common.c index 7323f0d1cca..41c0cce9fdb 100644 --- a/lib/lrmd/proxy_common.c +++ b/lib/lrmd/proxy_common.c @@ -179,7 +179,7 @@ remote_proxy_new(lrmd_t *lrmd, struct ipc_client_callbacks *proxy_callbacks, if (safe_str_eq(crm_system_name, CRM_SYSTEM_CRMD) && safe_str_eq(channel, CRM_SYSTEM_CRMD)) { - /* The crmd doesn't need to connect to itself */ + // The controller doesn't need to connect to itself proxy->is_local = TRUE; } else { @@ -233,7 +233,7 @@ remote_proxy_cb(lrmd_t *lrmd, const char *node_name, xmlNode *msg) return; } - /* crmd requests MUST be handled by the crmd, not us */ + // Controller requests MUST be handled by the controller, not us CRM_CHECK(proxy->is_local == FALSE, remote_proxy_end_session(proxy); return); diff --git a/lib/pengine/unpack.c b/lib/pengine/unpack.c index 4a837373733..354b24b39c5 100644 --- a/lib/pengine/unpack.c +++ b/lib/pengine/unpack.c @@ -1176,7 +1176,7 @@ determine_online_status_no_fencing(pe_working_set_t * data_set, xmlNode * node_s } } else if (this_node->details->expected_up == FALSE) { - crm_trace("CRMd is down: in_cluster=%s", crm_str(in_cluster)); + crm_trace("Controller is down: in_cluster=%s", crm_str(in_cluster)); crm_trace("\tis_peer=%s, join=%s, expected=%s", crm_str(is_peer), crm_str(join), crm_str(exp_state)); diff --git a/pacemaker.spec.in b/pacemaker.spec.in index 778628063cf..ab7b444bc7e 100644 --- a/pacemaker.spec.in +++ b/pacemaker.spec.in @@ -604,7 +604,7 @@ exit 0 %{_sbindir}/fence_legacy %{_sbindir}/stonith_admin -%doc %{_mandir}/man7/crmd.* +%doc %{_mandir}/man7/pacemaker-controld.* %doc %{_mandir}/man7/pengine.* %doc %{_mandir}/man7/stonithd.* %doc %{_mandir}/man7/ocf_pacemaker_controld.* @@ -677,7 +677,7 @@ exit 0 /usr/lib/ocf/resource.d/pacemaker %doc %{_mandir}/man7/* -%exclude %{_mandir}/man7/crmd.* +%exclude %{_mandir}/man7/pacemaker-controld.* %exclude %{_mandir}/man7/pengine.* %exclude %{_mandir}/man7/stonithd.* %exclude %{_mandir}/man7/ocf_pacemaker_controld.* diff --git a/pengine/allocate.c b/pengine/allocate.c index e007fdaa4e3..fd45511688a 100644 --- a/pengine/allocate.c +++ b/pengine/allocate.c @@ -2369,7 +2369,7 @@ stage7(pe_working_set_t * data_set) int transition_id = -1; /* - * Create a dependency graph to send to the transitioner (via the CRMd) + * Create a dependency graph to send to the transitioner (via the controller) */ gboolean stage8(pe_working_set_t * data_set) diff --git a/pengine/graph.c b/pengine/graph.c index 0802bf38d9b..6002913cc85 100644 --- a/pengine/graph.c +++ b/pengine/graph.c @@ -1,19 +1,8 @@ /* - * Copyright (C) 2004 Andrew Beekhof + * Copyright 2004-2018 Andrew Beekhof * - * 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 software 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 library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + * This source code is licensed under the GNU General Public License version 2 + * or later (GPLv2+) WITHOUT ANY WARRANTY. */ #include @@ -930,8 +919,8 @@ add_maintenance_update(pe_working_set_t *data_set) * \brief Add XML with nodes that an action is expected to bring down * * If a specified action is expected to bring any nodes down, add an XML block - * with their UUIDs. When a node is lost, this allows the crmd to determine - * whether it was expected. + * with their UUIDs. When a node is lost, this allows the controller to + * determine whether it was expected. * * \param[in,out] xml Parent XML tag to add to * \param[in] action Action to check for downed nodes diff --git a/pengine/native.c b/pengine/native.c index bbb48eac15b..a426025b60b 100644 --- a/pengine/native.c +++ b/pengine/native.c @@ -15,7 +15,9 @@ #include #include -/* #define DELETE_THEN_REFRESH 1 // The crmd will remove the resource from the CIB itself, making this redundant */ +// The controller removes the resource from the CIB, making this redundant +// #define DELETE_THEN_REFRESH 1 + #define INFINITY_HACK (INFINITY * -100) #define VARIANT_NATIVE 1 diff --git a/tools/crm_report.in b/tools/crm_report.in index 3a3e91b2ded..ffd8137ee6c 100644 --- a/tools/crm_report.in +++ b/tools/crm_report.in @@ -1,22 +1,10 @@ #!/bin/sh - - # Copyright (C) 2010 Andrew Beekhof - # - # 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.1 of the License, or (at your option) any later version. - # - # This software 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 library; if not, write to the Free Software - # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - # - +# +# Copyright 2010-2018 Andrew Beekhof +# +# This source code is licensed under the GNU General Public License version 2 +# or later (GPLv2+) WITHOUT ANY WARRANTY. +# TEMP=`@GETOPT_PATH@ \ -o hv?xl:f:t:n:T:L:p:c:dSCu:D:MVse: \ @@ -460,7 +448,7 @@ elif [ "x$start_time" != "x" ]; then debug "We are a cluster node" else debug "We are a log master" - masterlog=`findmsg 1 "crmd\\|CTS"` + masterlog=`findmsg 1 "pacemaker-controld\\|CTS"` fi diff --git a/tools/crm_resource.c b/tools/crm_resource.c index 1feb4078fdc..cef9162b122 100644 --- a/tools/crm_resource.c +++ b/tools/crm_resource.c @@ -41,7 +41,7 @@ resource_ipc_timeout(gpointer data) static void resource_ipc_connection_destroy(gpointer user_data) { - crm_info("Connection to CRMd was terminated"); + crm_info("Connection to controller was terminated"); crm_exit(CRM_EX_DISCONNECT); } @@ -53,8 +53,10 @@ start_mainloop(void) } mainloop = g_main_loop_new(NULL, FALSE); - fprintf(stderr, "Waiting for %d replies from the CRMd", crmd_replies_needed); - crm_debug("Waiting for %d replies from the CRMd", crmd_replies_needed); + fprintf(stderr, "Waiting for %d replies from the controller", + crmd_replies_needed); + crm_debug("Waiting for %d replies from the controller", + crmd_replies_needed); g_timeout_add(message_timeout_ms, resource_ipc_timeout, NULL); g_main_loop_run(mainloop); @@ -417,7 +419,7 @@ main(int argc, char **argv) bool require_resource = TRUE; /* whether command requires that resource be specified */ bool require_dataset = TRUE; /* whether command requires populated dataset instance */ - bool require_crmd = FALSE; /* whether command requires connection to CRMd */ + bool require_crmd = FALSE; // whether command requires controller connection int rc = pcmk_ok; int is_ocf_rc = 0; @@ -815,7 +817,7 @@ main(int argc, char **argv) } } - /* Establish a connection to the CRMd if needed */ + // Establish a connection to the controller if needed if (require_crmd) { xmlNode *xml = NULL; mainloop_io_t *source = @@ -823,7 +825,7 @@ main(int argc, char **argv) crmd_channel = mainloop_get_ipc_client(source); if (crmd_channel == NULL) { - CMD_ERR("Error signing on to the CRMd service"); + CMD_ERR("Error connecting to the controller"); rc = -ENOTCONN; goto bail; } diff --git a/tools/crm_resource_runtime.c b/tools/crm_resource_runtime.c index eb83222bad6..81c72263d02 100644 --- a/tools/crm_resource_runtime.c +++ b/tools/crm_resource_runtime.c @@ -495,7 +495,7 @@ send_lrm_rsc_op(crm_ipc_t * crmd_channel, const char *op, rc = 0; } else { - crm_debug("Could not send %s op to the crmd", op); + crm_debug("Could not send %s op to the controller", op); rc = -ENOTCONN; } @@ -1605,8 +1605,8 @@ wait_till_stable(int timeout_ms, cib_t * cib) * done. Warn the user in this case. * * @TODO A possible long-term solution would be to reimplement the - * wait as a new crmd operation that would be forwarded to the DC. - * However, that would have potential problems of its own. + * wait as a new controller operation that would be forwarded to the + * DC. However, that would have potential problems of its own. */ const char *dc_version = g_hash_table_lookup(data_set.config_hash, "dc-version"); diff --git a/tools/crmadmin.c b/tools/crmadmin.c index 4b12e83ee1d..191a1a25cf4 100644 --- a/tools/crmadmin.c +++ b/tools/crmadmin.c @@ -1,19 +1,8 @@ -/* - * Copyright (C) 2004 Andrew Beekhof - * - * 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 software 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 library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +/* + * Copyright 2004-2018 Andrew Beekhof + * + * This source code is licensed under the GNU General Public License version 2 + * or later (GPLv2+) WITHOUT ANY WARRANTY. */ #include @@ -83,7 +72,10 @@ static struct crm_option long_options[] = { {"-spacer-", 1, 0, '-', "\n\tThis is an internal detail and is rarely useful to administrators except when deciding on which node to examine the logs.\n"}, {"nodes", 0, 0, 'N', "\tDisplay the uname of all member nodes"}, {"election", 0, 0, 'E', "(Advanced) Start an election for the cluster co-ordinator"}, - {"kill", 1, 0, 'K', "(Advanced) Shut down the crmd (not the rest of the clusterstack ) on the specified node"}, + { + "kill", 1, 0, 'K', + "(Advanced) Stop the controller (not the rest of the cluster stack) on specified node" + }, {"health", 0, 0, 'H', NULL, 1}, {"-spacer-", 1, 0, '-', "\nAdditional Options:"}, @@ -106,7 +98,7 @@ main(int argc, char **argv) crm_log_cli_init("crmadmin"); crm_set_options(NULL, "command [options]", long_options, - "Development tool for performing some crmd-specific commands." + "Development tool for performing some controller-specific commands." "\n Likely to be replaced by crm_node in the future"); if (argc < 2) { crm_help('?', CRM_EX_USAGE); @@ -319,7 +311,7 @@ do_work(void) void crmadmin_ipc_connection_destroy(gpointer user_data) { - crm_err("Connection to CRMd was terminated"); + crm_err("Connection to controller was terminated"); if (mainloop) { g_main_loop_quit(mainloop); } else { diff --git a/tools/report.collector.in b/tools/report.collector.in index db4cbf483fe..2d5b97df459 100644 --- a/tools/report.collector.in +++ b/tools/report.collector.in @@ -201,7 +201,7 @@ getconfig() { fi done - if is_running crmd; then + if is_running pacemaker-controld; then dump_status_and_config case $cluster in corosync) crm_node -p --corosync > $target/$MEMBERSHIP_F 2>&1;; diff --git a/tools/report.common.in b/tools/report.common.in index c4c72894678..772564a8f8c 100644 --- a/tools/report.common.in +++ b/tools/report.common.in @@ -33,7 +33,7 @@ DRBD_INFO_F=drbd_info.txt EVENT_PATTERNS=" state do_state_transition membership pcmk_peer_update.*(lost|memb): -quorum crmd.*crm_update_quorum +quorum (crmd|pacemaker-controld).*crm_update_quorum pause Process.pause.detected resources (lrmd|pacemaker-execd).*rsc:(start|stop) stonith te_fence_node|stonith-ng.*log_oper.*report|stonithd.*(requests|(Succeeded|Failed).to.STONITH|result=)