Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
202 commits
Select commit Hold shift + click to select a range
a2fa32d
Refactor: libcib: New cib__get_calldata()
nrwahl2 Jan 3, 2026
57ce626
Refactor: libcib: New cib__set_calldata()
nrwahl2 Jan 3, 2026
8684138
Refactor: libcib: Call xml_apply_patchset() in cib_apply_patch_event()
nrwahl2 Jan 3, 2026
84c9330
Refactor: libcib: Drop input arg from cib__op_fn_t
nrwahl2 Jan 3, 2026
69f3c86
Refactor: libcib: Drop input argument from cib_perform_op helpers
nrwahl2 Jan 3, 2026
397dcd2
Refactor: libcib: Reduce number of arguments in cib_ops.c
nrwahl2 Jan 3, 2026
53b1cec
Log: based: Drop redundant log from cib_process_command()
nrwahl2 Jan 3, 2026
cdf9a9a
Refactor: based: Drop redundant cib_process_command() config_changed set
nrwahl2 Jan 3, 2026
e352a9e
Refactor: based: Unindent block of cib_process_command()
nrwahl2 Jan 3, 2026
92f7f0c
Refactor: based: Unindent some of process_ping_reply()
nrwahl2 Jan 3, 2026
3b6d9f4
Refactor: based: Unindent rest of process_ping_reply()
nrwahl2 Jan 3, 2026
b1abe74
Refactor: based: Convert ping_seq to long long
nrwahl2 Jan 3, 2026
af649da
Low: based: Ignore ping reply if we're no longer DC
nrwahl2 Jan 3, 2026
784ee35
Refactor: based: Unindent outermost else block in based_process_upgrade
nrwahl2 Jan 4, 2026
196c124
Refactor: based: Unindent pcmk_rc_ok section of based_process_upgrade()
nrwahl2 Jan 4, 2026
fb753cf
Refactor: based: Don't set answer to NULL in cib__op_fn_t functions
nrwahl2 Jan 4, 2026
da5d64c
Refactor: libcib: Rename cib__perform_query() to cib__perform_op_ro()
nrwahl2 Jan 4, 2026
2fcdad2
Refactor: libcib: Rename cib_perform_op() to cib__perform_op_rw()
nrwahl2 Jan 4, 2026
f9b47f8
Refactor: based: Don't free remote_versions in process_ping_reply()
nrwahl2 Jan 4, 2026
b09aa85
Refactor: based: Assume the_cib is not NULL
nrwahl2 Jan 4, 2026
58dcd11
Doc: based, libcib: Clarify cib__op_attr_modifies
nrwahl2 Jan 4, 2026
c48484a
Refactor: based: Set ping_modified_since to true only if the CIB changed
nrwahl2 Jan 12, 2026
b768abc
Doc: based: Add Doxygen for process_ping_reply()
nrwahl2 Jan 4, 2026
9f10a47
Refactor: based: sync_our_cib() takes const argument
nrwahl2 Jan 4, 2026
3a405e4
Low: based: Free ping_digest on exit
nrwahl2 Jan 4, 2026
aeb42c1
Refactor: based: Minor reorganization of cib_process_command()
nrwahl2 Jan 4, 2026
8fc7dbb
Feature: libcrmcommon: Assert on memory error in mainloop_add_fd()
nrwahl2 Jan 6, 2026
0835f46
Refactor: libcrmcommon: Unindent mainloop_add_fd()
nrwahl2 Jan 6, 2026
b59c7b7
Low: based: Free remote client if TLS session creation fails
nrwahl2 Jan 6, 2026
b47ff93
Refactor: based: Drop qb_ipcs_stats_get() call
nrwahl2 Jan 6, 2026
af3ef9d
Doc: libcrmcommon: Add detail to mainloop_del_fd() Doxygen
nrwahl2 Jan 8, 2026
45b09fe
Low: based: Drop remote clients during shutdown
nrwahl2 Jan 6, 2026
b458d51
Refactor: based: Use pcmk__drop_all_clients() in based_shutdown()
nrwahl2 Jan 4, 2026
9500ef6
Refactor: based: Call based_shutdown() only once
nrwahl2 Jan 6, 2026
c361517
Refactor: based: Inline initiate_exit()
nrwahl2 Jan 6, 2026
7585473
Refactor: based: create_cib_reply/based_diff_notify take standard rc
nrwahl2 Jan 4, 2026
d003350
Refactor: based: based_diff_notify() takes request argument
nrwahl2 Jan 4, 2026
67a88c9
Refactor: based: create_cib_reply() takes request argument
nrwahl2 Jan 4, 2026
ab0051d
Doc: based: Drop irrelevant comment about legacy mode
nrwahl2 Jan 4, 2026
3f1fe4a
Refactor: based: Unindent do_local_notify() call
nrwahl2 Jan 4, 2026
02c253e
Refactor: based: Guard create_cib_reply() call with !cib_discard_reply
nrwahl2 Jan 4, 2026
5979c10
Refactor: based: Move privilege check to based_process_request()
nrwahl2 Jan 4, 2026
e100c08
Refactor: based: Drop NULL-check of reply from cib_process_command()
nrwahl2 Jan 4, 2026
9ac39e5
Refactor: based: Drop based_process_request last cib_discard_reply check
nrwahl2 Jan 4, 2026
8239863
Refactor: libcib: Use done label in cib__perform_op_ro()
nrwahl2 Jan 4, 2026
a4348e0
Low: libcib: Avoid memory leak in processing CIB file commit transaction
nrwahl2 Jan 4, 2026
58f720b
Refactor: libcib: Assert to satisfy Coverity
nrwahl2 May 2, 2026
1bafbe2
Refactor: based: Drop redundant NULL checks
nrwahl2 May 29, 2026
1107f40
Refactor: libcib: Avoid unnecessary copy in process_request()
nrwahl2 Jan 5, 2026
b6f0db0
Refactor: libcib: Don't copy output that's part of the current CIB's doc
nrwahl2 Jan 5, 2026
a2c9bb3
Refactor: libcib: Minor cib__perform_op_ro() cleanup
nrwahl2 Jan 5, 2026
96fe87d
Refactor: based: based_process_request gets last create_cib_reply check
nrwahl2 Jan 5, 2026
160707f
Refactor: based: Pull read-only ops out of cib_process_command()
nrwahl2 Jan 5, 2026
af85ada
Low: based: Free digest_timer on exit
nrwahl2 Jan 5, 2026
4d987cd
Refactor: based: Move notify to done section in based_perform_op_rw()
nrwahl2 Jan 5, 2026
484bf04
Refactor: based: Unindent successful common case in based_perform_op_rw
nrwahl2 Jan 5, 2026
9ef8a16
Refactor: based: Drop dead output log msg for pcmk_rc_schema_validation
nrwahl2 Jan 5, 2026
91fd2f0
Fix: based: Fix handling of intermediate transaction results
nrwahl2 Jan 5, 2026
cd61fb8
Log: based: Drop redundant log in based_process_request()
nrwahl2 Jan 5, 2026
78aefd1
Refactor: based: Unindent "if (process)" block of based_process_request
nrwahl2 Jan 5, 2026
0a3aa78
Refactor: based: Don't call option parser when cib_transaction is set
nrwahl2 Jan 5, 2026
538d0a8
Refactor: based: Drop needs_forward variable
nrwahl2 Jan 5, 2026
8acf708
Log: based: Drop log message from forward_request()
nrwahl2 Jan 12, 2026
4eab9a9
Doc: based: Drop comment in parse_peer_options()
nrwahl2 Jan 12, 2026
274500d
API: libcib: Deprecate cib_api_operations_t:sync
nrwahl2 Jan 5, 2026
e9725b2
Refactor: based: Minor easy changes to parse_peer_options()
nrwahl2 Jan 5, 2026
193815e
Refactor: based: Move two parse_peer_options() early returns upward
nrwahl2 Jan 5, 2026
c71e0c7
Refactor: based: Drop legacy code from parse_peer_options()
nrwahl2 Jan 5, 2026
c8dba8a
Refactor: based: Move is_reply block to where it's used
nrwahl2 Jan 5, 2026
5fbf386
Refactor: based: Drop redundant check for upgrade RC
nrwahl2 Jan 5, 2026
42e765a
Refactor: based: Move early return to beginning of upgrade block
nrwahl2 Jan 5, 2026
af43979
Refactor: based: Drop skip_is_reply label
nrwahl2 Jan 5, 2026
83c922a
Refactor: based: parse_local_options() -> log_local_options()
nrwahl2 Jan 5, 2026
01d1673
Refactor: based: Set control variables only if they override defaults
nrwahl2 Jan 5, 2026
ff6af0c
Refactor: based: Rename crm_cluster to based_cluster
nrwahl2 Jan 6, 2026
eb2ca40
Refactor: based: Don't create based_cluster if in stand-alone mode
nrwahl2 Jan 6, 2026
39da46c
Refactor: based: New based_ipc_init() and based_ipc.h
nrwahl2 Jan 6, 2026
805b877
Refactor: based: Unindent cib_init()
nrwahl2 Jan 7, 2026
18cfdd2
Refactor: based: New based_ipc_cleanup()
nrwahl2 Jan 6, 2026
fca74d5
Low: based: Move based_ipc_cleanup() call to based_terminate()
nrwahl2 Jan 6, 2026
bd35bbc
Refactor: based: Functionize remote fd closure in based_remote.c
nrwahl2 Jan 6, 2026
bb0b86f
Refactor: based: New based_cluster_connect()
nrwahl2 Jan 7, 2026
6f72f58
Refactor: based: Pull cib_init() body into main()
nrwahl2 Jan 7, 2026
47dc051
Refactor: based: Move based_io_init() call just before based_read_cib()
nrwahl2 Jan 7, 2026
9931e41
Refactor: based: Set based_is_primary in setup_stand_alone()
nrwahl2 Jan 7, 2026
102bded
Refactor: based: New based_corosync.c for cluster-related functions
nrwahl2 Jan 7, 2026
608638b
Refactor: libcrmcluster: Don't init caches in pcmk__corosync_connect()
nrwahl2 Jan 7, 2026
1ae5799
Refactor: libcrmcluster: Clean up includes in corosync.c
nrwahl2 Jan 7, 2026
bb452e8
Refactor: libcrmcluster: Destroy caches unconditionally on disconnect
nrwahl2 Jan 7, 2026
cfba350
Refactor: based: New based_cluster_disconnect()
nrwahl2 Jan 7, 2026
33becc0
Refactor: attrd, fencer: Set cluster pointer to NULL after freeing
nrwahl2 Jan 7, 2026
c6c14a3
Fix: libcrmcluster: NULL to pcmk_cluster_disconnect() returns EINVAL
nrwahl2 Jan 7, 2026
46085fd
Refactor: various: Use g_clear_pointer() with mainloop_del_*() functions
nrwahl2 May 2, 2026
ea05a31
Refactor: based: Rename corosync callback functions
nrwahl2 Jan 7, 2026
0d5328d
Refactor: based: Don't send shutdown request
nrwahl2 Jan 10, 2026
9afa440
Refactor: based: Move based_shutdown() to pacemaker-based.c
nrwahl2 Jan 7, 2026
9b14ebb
Refactor: based: New based_cluster_node_name()
nrwahl2 Jan 7, 2026
ded7858
Refactor: based: Make based_cluster static
nrwahl2 Jan 7, 2026
9510f3c
Refactor: based: New based_shutting_down()
nrwahl2 Jan 7, 2026
7240e1e
Refactor: based: New based_stand_alone()
nrwahl2 Jan 7, 2026
e6ec00a
Refactor: based: New based_{get,set}_local_node_dc()
nrwahl2 Jan 7, 2026
8097bdb
Refactor: based: Rename the_cib to based_cib
nrwahl2 Jan 7, 2026
47ac3cb
Feature: libcrmcommon: Drop support for PCMK_ipc_type env variable
nrwahl2 Jan 7, 2026
a7e264c
Refactor: libcrmcommon: Use QB_IPC_SHM in pcmk__serve_DAEMON_ipc()
nrwahl2 Jan 8, 2026
f8dca59
Feature: libcrmcommon: mainloop_add_ipc_server{,_with_prio} ignore type
nrwahl2 Jan 8, 2026
0531474
API: libcib: Deprecate cib_command_nonblocking
nrwahl2 Jan 11, 2026
92119fc
Refactor: various: Drop PCMK__SERVER_BASED_SHM
nrwahl2 Jan 11, 2026
de2f548
Refactor: libcrmcommon: Drop pcmk__stop_based_ipc()
nrwahl2 Jan 11, 2026
f3cd40d
Refactor: libcrmcommon: Assert for arguments in pcmk__serve_DAEMON_ipc()
nrwahl2 Jan 11, 2026
d41ae02
Refactor: based: New based_{callbacks,io}_cleanup()
nrwahl2 Jan 8, 2026
1ebc4ca
Refactor: based: Move based_terminate() to pacemaker-based.c
nrwahl2 Jan 8, 2026
067ad76
Refactor: based: New based_cleanup()
nrwahl2 Jan 8, 2026
3f23a0c
Refactor: based: Assume main loop is running in based_terminate()
nrwahl2 Jan 8, 2026
72a7b4e
Doc: based: Add notes to based_terminate()
nrwahl2 Jan 8, 2026
b657983
Refactor: based: Set shutting_down to true in based_terminate()
nrwahl2 Jan 8, 2026
7008b20
Low: based: Fix memory leak in remote listeners
nrwahl2 Jan 9, 2026
2d328ef
Refactor: libcrmcommon: Expose struct mainloop_io_s internally
nrwahl2 Jan 9, 2026
ff0002f
Low: based: Destroy remote listeners in based_remote_cleanup()
nrwahl2 Jan 9, 2026
152c954
Refactor: libcrmcommon: Free mainloop child list at exit
nrwahl2 Jan 10, 2026
cc7a526
Refactor: libcrmcommon: Drop callback_needed variable
nrwahl2 Jan 10, 2026
61d19e1
Refactor: libcrmcommon: child_kill_helper() returns standard code
nrwahl2 Jan 10, 2026
3cf479f
Refactor: libcrmcommon: Track mainloop children in a hash table
nrwahl2 Jan 10, 2026
720faba
Refactor: based: Add missing include to pacemaker-based.c
nrwahl2 Jan 11, 2026
05b66a4
Refactor: based: Clean up shutdown logic
nrwahl2 Jan 11, 2026
0fcd99b
Refactor: based: based_cib should always be non-NULL after init now
nrwahl2 Jan 14, 2026
0c87705
Refactor: various: Unref main loop consistently
nrwahl2 Jan 11, 2026
ca1fd73
Refactor: attrd: Drop mainloop_destroy_signal() from attrd_shutdown()
nrwahl2 Jan 11, 2026
28e6d41
Refactor: attrd: Assume main loop is running in attrd_shutdown()
nrwahl2 Jan 11, 2026
38dadf0
Refactor: based: Don't init node caches explicitly
nrwahl2 Jan 11, 2026
dba9813
Refactor: based: Drop based_peer_callback()
nrwahl2 Jan 11, 2026
1ecae19
API: libcib: Deprecate cib_query and cib_connected_query
nrwahl2 Jan 11, 2026
72df8c2
Refactor: remoted: Drop cib_proxy_accept_ro()
nrwahl2 Jan 11, 2026
cb69129
Refactor: based: Check for old PCMK__SERVER_BASED_RW instance
nrwahl2 Jan 11, 2026
2bcc43c
Refactor: based: Make PCMK__SERVER_BASED_RO behave like _RW
nrwahl2 Jan 11, 2026
e2ae6bb
Refactor: based: Drop privileged argument of based_process_request()
nrwahl2 Jan 11, 2026
d2d8070
Refactor: libcib: Drop cib__op_attr_privileged
nrwahl2 Jan 11, 2026
9e30b69
Refactor: liblrmd: Map proxied PCMK__SERVER_BASED_RO clients to _RW
nrwahl2 Jan 11, 2026
7520319
Refactor: libcrmcommon: pcmk__serve_based_ipc() starts only one server
nrwahl2 Jan 12, 2026
8d6a97f
Refactor: based: Standardize based_cpg_dispatch()
nrwahl2 Jan 12, 2026
d340d06
Refactor: based: Standardize based_ipc_dispatch()
nrwahl2 Jan 12, 2026
694022d
Refactor: remoted: Minor improvements to remoted__read_handshake_data()
nrwahl2 Jan 12, 2026
7829d4c
Refactor: based: New based_read_handshake_data()
nrwahl2 Jan 12, 2026
81f9f1d
Refactor: based: pcmk__remote_ready() in cib_remote_msg()
nrwahl2 Jan 12, 2026
c09a459
Refactor: based: Some cleanup/standardization of cib_remote_msg()
nrwahl2 Jan 12, 2026
cf1a4fb
Refactor: libcrmcommon: Reorganize pcmk__is_user_in_group() unit test
nrwahl2 Jan 12, 2026
dff94ed
Refactor: libcrmcommon: Use getgrnam() in pcmk__is_user_in_group()
nrwahl2 Jan 12, 2026
db73d53
Refactor: based: Drop is_daemon_group_member()
nrwahl2 May 3, 2026
cfc4a7d
Refactor: based: authenticate_user() takes client_name argument
nrwahl2 May 3, 2026
10a6714
Refactor: based: Rename login argument to msg
nrwahl2 May 3, 2026
397a80e
Refactor: based: Rename cib_remote_auth() variables
nrwahl2 May 3, 2026
2c62dd1
Log: based: Improve cib_remote_auth() log messages
nrwahl2 May 3, 2026
b337acd
Refactor: based: New based_remote_client_auth()
nrwahl2 Jan 12, 2026
ee461f0
Refactor: based: Functionize validating/parsing remote auth message
nrwahl2 Jan 12, 2026
318c4fe
Doc: based: Document confusion about "dangerous" options
nrwahl2 Jan 12, 2026
a99dd22
Refactor: based: Reorganize cib_handle_remote_msg()
nrwahl2 Jan 12, 2026
3caaf83
Refactor: based: Use pcmk__request_t in process_transaction_requests()
nrwahl2 Jan 12, 2026
31e9935
Refactor: based: based_process_request() takes pcmk__request_t argument
nrwahl2 Jan 12, 2026
31cb427
Refactor: based: Drop redundant client == NULL check
nrwahl2 Jan 12, 2026
de5a053
Refactor: based: forward_request() takes pcmk__request_t
nrwahl2 Jan 12, 2026
14ee045
Refactor: based: parse_peer_options() takes pcmk__request_t
nrwahl2 Jan 12, 2026
5558090
Refactor: based: based_perform_op_rw() takes pcmk__request_t
nrwahl2 Jan 12, 2026
537de7c
Doc: based: Drop TODO comment
nrwahl2 Jan 13, 2026
e13a829
Refactor: based: Free output in the done section
nrwahl2 Jan 13, 2026
e3aca73
Low: based: Don't forward requests via cluster if in stand-alone mode
nrwahl2 Jan 13, 2026
7aff27e
Refactor: libcib: Drop unneeded modifies flag for primary request
nrwahl2 Jan 13, 2026
b379436
Feature: based: Drop support for cib_ismaster requests
nrwahl2 Jan 13, 2026
32345e2
Refactor: libcib, based: Drop cib__op_attr_local
nrwahl2 Jan 13, 2026
01fa7ef
Feature: based: Drop support for cib_delete_alt requests
nrwahl2 Jan 13, 2026
56d6343
Refactor: libcib: Drop cib__op_attr_replaces
nrwahl2 Jan 13, 2026
1c4d79f
Low: based: Replace/commit ops don't automatically write to disk
nrwahl2 Jan 13, 2026
07f8b0f
Refactor: libcrmcommon: Drop pcmk__update_schema transform argument
nrwahl2 Jan 13, 2026
59255d6
Refactor: libcib: Drop cib__op_attr_writes_through
nrwahl2 Jan 13, 2026
d3923c8
Refactor: libcib: Drop cib__op_attr_transaction
nrwahl2 Jan 13, 2026
7fb2e6b
Refactor: libcib: Drop enum cib__op_attr
nrwahl2 Jan 13, 2026
d88aa64
Refactor: libcib: Clean up includes
nrwahl2 May 3, 2026
083ab42
Refactor: libcib: Drop redundant cib_discard_reply check in cib_remote.c
nrwahl2 Jan 13, 2026
581a29a
API: libcib: Deprecate cib_api_operations_t:query_from() method
nrwahl2 Jan 15, 2026
fe9b4b5
Refactor: based: Drop redundant based_stand_alone() check
nrwahl2 Jan 15, 2026
dc948ef
Refactor: based: Call process_ping_reply() in process section
nrwahl2 Jan 16, 2026
43f50a6
Refactor: based: Check cib_status after checking process
nrwahl2 Jan 16, 2026
80facec
Refactor: based: Return void from parse_peer_options()
nrwahl2 Jan 16, 2026
67eadad
Refactor: based: Default needs_reply to false
nrwahl2 Jan 15, 2026
89657aa
Refactor: based: Construct reply only if needs_reply is true
nrwahl2 Jan 17, 2026
71ff004
Low: based: Fix memory leak on upgrade when validate-with is not set
nrwahl2 Jan 18, 2026
05067c0
Refactor: libcrmcluster: pcmk__cpg_send_xml() returns void
nrwahl2 Jan 18, 2026
69c8916
Refactor: libcrmcluster: Pass GString to send_cpg_text(0
nrwahl2 Jan 19, 2026
446df1b
Refactor: libcrmcluster: Drop two memset() calls
nrwahl2 Jan 19, 2026
1b79374
Refactor: libcrmcluster: Consolidate some init in send_cpg_text()
nrwahl2 Jan 19, 2026
caed892
Refactor: libcrmcluster: Use size_t for local_name_len
nrwahl2 Jan 19, 2026
3cf8929
Refactor: libcrmcluster: Use pid_t for local_pid
nrwahl2 Jan 19, 2026
a6fc7f3
Refactor: libcrmcommon: Drop max argument from pcmk__compress()
nrwahl2 Jan 19, 2026
773e3c3
Doc: libcrmcluster: Document a type conversion mess
nrwahl2 Jan 19, 2026
fd9db3b
Refactor: libcrmcluster: Reduce log call duplication
nrwahl2 Jan 19, 2026
415516c
Refactor: libcrmcluster: Drop send_cpg_text()
nrwahl2 Jan 19, 2026
88d07fa
Refactor: attrd: Return void from attrd_send_message()
nrwahl2 Jan 19, 2026
1ba5001
Refactor: libcrmcluster: Return void from pcmk__cluster_send_message()
nrwahl2 Jan 19, 2026
c7c2eac
Refactor: based: Reuse req in based_process_upgrade()
nrwahl2 Jan 19, 2026
86e0b31
Log: based: Drop some basically redundant log messages
nrwahl2 Jan 20, 2026
d018e94
Refactor: based: Create reply only if we will send it
nrwahl2 Jan 20, 2026
f448d09
Refactor: libcib: Reorder CIB request constants alphabetically
nrwahl2 Jan 20, 2026
7e6859b
wip
nrwahl2 Jan 13, 2026
0ff7e6f
Refactor: based: Ignore cib_discard_reply
nrwahl2 Jan 14, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 15 additions & 1 deletion daemons/attrd/attrd_corosync.c
Original file line number Diff line number Diff line change
Expand Up @@ -487,6 +487,12 @@ broadcast_unseen_local_values(void)
}
}

/*!
* \internal
* \brief Initialize \c attrd_cluster and connect to the cluster layer
*
* \return Standard Pacemaker return code
*/
int
attrd_cluster_connect(void)
{
Expand All @@ -512,11 +518,19 @@ attrd_cluster_connect(void)
return rc;
}

/*!
* \internal
* \brief Disconnect from the cluster layer and free \c attrd_cluster
*/
void
attrd_cluster_disconnect(void)
{
if (attrd_cluster == NULL) {
return;
}

pcmk_cluster_disconnect(attrd_cluster);
pcmk_cluster_free(attrd_cluster);
g_clear_pointer(&attrd_cluster, pcmk_cluster_free);
}

void
Expand Down
4 changes: 2 additions & 2 deletions daemons/attrd/attrd_messages.c
Original file line number Diff line number Diff line change
Expand Up @@ -348,7 +348,7 @@ attrd_send_protocol(const pcmk__node_status_t *peer)
pcmk__xml_free(attrd_op);
}

gboolean
void
attrd_send_message(const pcmk__node_status_t *node, xmlNode *data, bool confirm)
{
const char *op = pcmk__xe_get(data, PCMK_XA_TASK);
Expand All @@ -365,5 +365,5 @@ attrd_send_message(const pcmk__node_status_t *node, xmlNode *data, bool confirm)
}

attrd_xml_add_writer(data);
return pcmk__cluster_send_message(node, pcmk_ipc_attrd, data);
pcmk__cluster_send_message(node, pcmk_ipc_attrd, data);
}
23 changes: 6 additions & 17 deletions daemons/attrd/attrd_utils.c
Original file line number Diff line number Diff line change
Expand Up @@ -57,28 +57,16 @@ attrd_shutdown(int nsig)
// Tell various functions not to do anthing
shutting_down = true;

// Don't respond to signals while shutting down
mainloop_destroy_signal(SIGTERM);
mainloop_destroy_signal(SIGCHLD);
mainloop_destroy_signal(SIGPIPE);
mainloop_destroy_signal(SIGUSR1);
mainloop_destroy_signal(SIGUSR2);
mainloop_destroy_signal(SIGTRAP);

attrd_free_waitlist();
attrd_free_confirmations();

g_clear_pointer(&peer_protocol_vers, g_hash_table_destroy);

if ((mloop == NULL) || !g_main_loop_is_running(mloop)) {
/* If there's no main loop active, just exit. This should be possible
* only if we get SIGTERM in brief windows at start-up and shutdown.
*/
crm_exit(CRM_EX_OK);
} else {
g_main_loop_quit(mloop);
g_main_loop_unref(mloop);
}
// There should be no way to get here without the main loop running
CRM_CHECK((mloop != NULL) && g_main_loop_is_running(mloop),
crm_exit(CRM_EX_OK));

g_main_loop_quit(mloop);
}

/*!
Expand All @@ -99,6 +87,7 @@ void
attrd_run_mainloop(void)
{
g_main_loop_run(mloop);
g_clear_pointer(&mloop, g_main_loop_unref);
}

/* strlen("value") */
Expand Down
8 changes: 4 additions & 4 deletions daemons/attrd/pacemaker-attrd.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
*/

#ifndef PACEMAKER_ATTRD__H
# define PACEMAKER_ATTRD__H
#define PACEMAKER_ATTRD__H

#include <regex.h>
#include <stdbool.h>
Expand Down Expand Up @@ -210,8 +210,8 @@ void attrd_client_clear_failure(pcmk__request_t *request);
void attrd_client_update(pcmk__request_t *request);
void attrd_client_refresh(pcmk__request_t *request);
xmlNode *attrd_client_query(pcmk__request_t *request);
gboolean attrd_send_message(const pcmk__node_status_t *node, xmlNode *data,
bool confirm);
void attrd_send_message(const pcmk__node_status_t *node, xmlNode *data,
bool confirm);

xmlNode *attrd_add_value_xml(xmlNode *parent, const attribute_t *a,
const attribute_value_t *v, bool force_write);
Expand Down Expand Up @@ -267,4 +267,4 @@ void attrd_set_node_xml_id(const char *node_name, const char *node_xml_id);
void attrd_forget_node_xml_id(const char *node_name);
void attrd_cleanup_xml_ids(void);

#endif /* PACEMAKER_ATTRD__H */
#endif // PACEMAKER_ATTRD__H
3 changes: 3 additions & 0 deletions daemons/based/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,9 @@ halibdir = $(CRM_DAEMON_DIR)
halib_PROGRAMS = pacemaker-based

noinst_HEADERS = based_callbacks.h
noinst_HEADERS += based_corosync.h
noinst_HEADERS += based_io.h
noinst_HEADERS += based_ipc.h
noinst_HEADERS += based_messages.h
noinst_HEADERS += based_notify.h
noinst_HEADERS += based_operation.h
Expand All @@ -33,6 +35,7 @@ pacemaker_based_LDADD += $(CLUSTERLIBS) $(PAM_LIBS)

pacemaker_based_SOURCES = pacemaker-based.c
pacemaker_based_SOURCES += based_callbacks.c
pacemaker_based_SOURCES += based_corosync.c
pacemaker_based_SOURCES += based_io.c
pacemaker_based_SOURCES += based_ipc.c
pacemaker_based_SOURCES += based_messages.c
Expand Down
Loading