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
01b2506
Refactor: libcib: New cib__get_calldata()
nrwahl2 Jan 3, 2026
9ffea2b
Refactor: libcib: New cib__set_calldata()
nrwahl2 Jan 3, 2026
151e494
Refactor: libcib: Call xml_apply_patchset() in cib_apply_patch_event()
nrwahl2 Jan 3, 2026
ba7d444
Refactor: libcib: Drop input arg from cib__op_fn_t
nrwahl2 Jan 3, 2026
3c9a0d0
Refactor: libcib: Drop input argument from cib_perform_op helpers
nrwahl2 Jan 3, 2026
9f0bee2
Refactor: libcib: Reduce number of arguments in cib_ops.c
nrwahl2 Jan 3, 2026
9b0d998
Log: based: Drop redundant log from cib_process_command()
nrwahl2 Jan 3, 2026
0965918
Refactor: based: Drop redundant cib_process_command() config_changed set
nrwahl2 Jan 3, 2026
6e97cbb
Refactor: based: Unindent block of cib_process_command()
nrwahl2 Jan 3, 2026
889e0aa
Refactor: based: Unindent some of process_ping_reply()
nrwahl2 Jan 3, 2026
b34f725
Refactor: based: Unindent rest of process_ping_reply()
nrwahl2 Jan 3, 2026
9a076de
Refactor: based: Convert ping_seq to long long
nrwahl2 Jan 3, 2026
3829cff
Low: based: Ignore ping reply if we're no longer DC
nrwahl2 Jan 3, 2026
c390ada
Refactor: based: Unindent outermost else block in based_process_upgrade
nrwahl2 Jan 4, 2026
6c2a196
Refactor: based: Unindent pcmk_rc_ok section of based_process_upgrade()
nrwahl2 Jan 4, 2026
804fe22
Refactor: based: Don't set answer to NULL in cib__op_fn_t functions
nrwahl2 Jan 4, 2026
887f171
Refactor: libcib: Rename cib__perform_query() to cib__perform_op_ro()
nrwahl2 Jan 4, 2026
6b02f5e
Refactor: libcib: Rename cib_perform_op() to cib__perform_op_rw()
nrwahl2 Jan 4, 2026
7548260
Refactor: based: Don't free remote_versions in process_ping_reply()
nrwahl2 Jan 4, 2026
ae92fa0
Refactor: based: Assume the_cib is not NULL
nrwahl2 Jan 4, 2026
72254f7
Doc: based, libcib: Clarify cib__op_attr_modifies
nrwahl2 Jan 4, 2026
d54935d
Refactor: based: Set ping_modified_since to true only if the CIB changed
nrwahl2 Jan 12, 2026
b187b1b
Doc: based: Add Doxygen for process_ping_reply()
nrwahl2 Jan 4, 2026
c7dc7b2
Refactor: based: sync_our_cib() takes const argument
nrwahl2 Jan 4, 2026
d5ca362
Low: based: Free ping_digest on exit
nrwahl2 Jan 4, 2026
38cfbab
Refactor: based: Minor reorganization of cib_process_command()
nrwahl2 Jan 4, 2026
13421e3
Feature: libcrmcommon: Assert on memory error in mainloop_add_fd()
nrwahl2 Jan 6, 2026
51c3876
Refactor: libcrmcommon: Unindent mainloop_add_fd()
nrwahl2 Jan 6, 2026
e2c56c9
Low: based: Free remote client if TLS session creation fails
nrwahl2 Jan 6, 2026
5ddbbc0
Refactor: based: Drop qb_ipcs_stats_get() call
nrwahl2 Jan 6, 2026
50d70f1
Doc: libcrmcommon: Add detail to mainloop_del_fd() Doxygen
nrwahl2 Jan 8, 2026
be3243b
Low: based: Drop remote clients during shutdown
nrwahl2 Jan 6, 2026
ca4e05e
Refactor: based: Use pcmk__drop_all_clients() in based_shutdown()
nrwahl2 Jan 4, 2026
b2a8d47
Refactor: based: Call based_shutdown() only once
nrwahl2 Jan 6, 2026
c31b052
Refactor: based: Inline initiate_exit()
nrwahl2 Jan 6, 2026
f470dbf
Refactor: based: create_cib_reply/based_diff_notify take standard rc
nrwahl2 Jan 4, 2026
91b0122
Refactor: based: based_diff_notify() takes request argument
nrwahl2 Jan 4, 2026
3bf9331
Refactor: based: create_cib_reply() takes request argument
nrwahl2 Jan 4, 2026
2df7d05
Doc: based: Drop irrelevant comment about legacy mode
nrwahl2 Jan 4, 2026
034dea0
Refactor: based: Unindent do_local_notify() call
nrwahl2 Jan 4, 2026
79f2232
Refactor: based: Guard create_cib_reply() call with !cib_discard_reply
nrwahl2 Jan 4, 2026
be2a801
Refactor: based: Move privilege check to based_process_request()
nrwahl2 Jan 4, 2026
f75af13
Refactor: based: Drop NULL-check of reply from cib_process_command()
nrwahl2 Jan 4, 2026
6ef967a
Refactor: based: Drop based_process_request last cib_discard_reply check
nrwahl2 Jan 4, 2026
beb78cc
Refactor: libcib: Use done label in cib__perform_op_ro()
nrwahl2 Jan 4, 2026
90b599f
Low: libcib: Avoid memory leak in processing CIB file commit transaction
nrwahl2 Jan 4, 2026
1e7de54
Refactor: libcib: Assert to satisfy Coverity
nrwahl2 May 2, 2026
7e94787
Refactor: libcib: Avoid unnecessary copy in process_request()
nrwahl2 Jan 5, 2026
e30d6bf
Refactor: libcib: Don't copy output that's part of the current CIB's doc
nrwahl2 Jan 5, 2026
eff3244
Refactor: libcib: Minor cib__perform_op_ro() cleanup
nrwahl2 Jan 5, 2026
033a05a
Refactor: based: based_process_request gets last create_cib_reply check
nrwahl2 Jan 5, 2026
dea0436
Refactor: based: Pull read-only ops out of cib_process_command()
nrwahl2 Jan 5, 2026
869170b
Low: based: Free digest_timer on exit
nrwahl2 Jan 5, 2026
0bc3cf1
Refactor: based: Move notify to done section in based_perform_op_rw()
nrwahl2 Jan 5, 2026
d3acb65
Refactor: based: Unindent successful common case in based_perform_op_rw
nrwahl2 Jan 5, 2026
5289f07
Refactor: based: Drop dead output log msg for pcmk_rc_schema_validation
nrwahl2 Jan 5, 2026
b4c5b1a
Fix: based: Fix handling of intermediate transaction results
nrwahl2 Jan 5, 2026
a9ff1f3
Log: based: Drop redundant log in based_process_request()
nrwahl2 Jan 5, 2026
13cd2c7
Refactor: based: Unindent "if (process)" block of based_process_request
nrwahl2 Jan 5, 2026
bd6a537
Refactor: based: Don't call option parser when cib_transaction is set
nrwahl2 Jan 5, 2026
c36ded2
Refactor: based: Drop needs_forward variable
nrwahl2 Jan 5, 2026
33f6b0c
Log: based: Drop log message from forward_request()
nrwahl2 Jan 12, 2026
8dad98f
Doc: based: Drop comment in parse_peer_options()
nrwahl2 Jan 12, 2026
026fcb8
API: libcib: Deprecate cib_api_operations_t:sync
nrwahl2 Jan 5, 2026
834e7cc
Refactor: based: Minor easy changes to parse_peer_options()
nrwahl2 Jan 5, 2026
aa453ce
Refactor: based: Move two parse_peer_options() early returns upward
nrwahl2 Jan 5, 2026
fa99503
Refactor: based: Drop legacy code from parse_peer_options()
nrwahl2 Jan 5, 2026
f6a6a6e
Refactor: based: Move is_reply block to where it's used
nrwahl2 Jan 5, 2026
946668a
Refactor: based: Drop redundant check for upgrade RC
nrwahl2 Jan 5, 2026
0528180
Refactor: based: Move early return to beginning of upgrade block
nrwahl2 Jan 5, 2026
e59b9b7
Refactor: based: Drop skip_is_reply label
nrwahl2 Jan 5, 2026
652abbe
Refactor: based: parse_local_options() -> log_local_options()
nrwahl2 Jan 5, 2026
8623fac
Refactor: based: Set control variables only if they override defaults
nrwahl2 Jan 5, 2026
262059d
Refactor: based: Rename crm_cluster to based_cluster
nrwahl2 Jan 6, 2026
2781077
Refactor: based: Don't create based_cluster if in stand-alone mode
nrwahl2 Jan 6, 2026
3301156
Refactor: based: New based_ipc_init() and based_ipc.h
nrwahl2 Jan 6, 2026
5465430
Refactor: based: Unindent cib_init()
nrwahl2 Jan 7, 2026
847b5aa
Refactor: based: New based_ipc_cleanup()
nrwahl2 Jan 6, 2026
299929b
Low: based: Move based_ipc_cleanup() call to based_terminate()
nrwahl2 Jan 6, 2026
507af24
Refactor: based: Functionize remote fd closure in based_remote.c
nrwahl2 Jan 6, 2026
79ebd5a
Refactor: based: New based_cluster_connect()
nrwahl2 Jan 7, 2026
ac4c07c
Refactor: based: Pull cib_init() body into main()
nrwahl2 Jan 7, 2026
8e4ba87
Refactor: based: Move based_io_init() call just before based_read_cib()
nrwahl2 Jan 7, 2026
effb498
Refactor: based: Set based_is_primary in setup_stand_alone()
nrwahl2 Jan 7, 2026
536d1f1
Refactor: based: New based_corosync.c for cluster-related functions
nrwahl2 Jan 7, 2026
d902102
Refactor: libcrmcluster: Don't init caches in pcmk__corosync_connect()
nrwahl2 Jan 7, 2026
afa87f8
Refactor: libcrmcluster: Clean up includes in corosync.c
nrwahl2 Jan 7, 2026
777adf8
Refactor: libcrmcluster: Destroy caches unconditionally on disconnect
nrwahl2 Jan 7, 2026
6bd8622
Refactor: based: New based_cluster_disconnect()
nrwahl2 Jan 7, 2026
56432a9
Refactor: attrd, fencer: Set cluster pointer to NULL after freeing
nrwahl2 Jan 7, 2026
375f0be
Refactor: various: g_clear_pointer for cib_delete and lrmd_api_delete
nrwahl2 Apr 26, 2026
76ce118
Fix: libcrmcluster: NULL to pcmk_cluster_disconnect() returns EINVAL
nrwahl2 Jan 7, 2026
c72e744
Refactor: various: Use g_clear_pointer() with mainloop_del_*() functions
nrwahl2 May 2, 2026
abcb723
Refactor: based: Rename corosync callback functions
nrwahl2 Jan 7, 2026
aa7625e
Refactor: based: Don't send shutdown request
nrwahl2 Jan 10, 2026
ee159e8
Refactor: based: Move based_shutdown() to pacemaker-based.c
nrwahl2 Jan 7, 2026
e85ada9
Refactor: based: New based_cluster_node_name()
nrwahl2 Jan 7, 2026
eeec978
Refactor: based: Make based_cluster static
nrwahl2 Jan 7, 2026
047c848
Refactor: based: New based_shutting_down()
nrwahl2 Jan 7, 2026
702fd70
Refactor: based: New based_stand_alone()
nrwahl2 Jan 7, 2026
90fffdc
Refactor: based: New based_{get,set}_local_node_dc()
nrwahl2 Jan 7, 2026
0931d13
Refactor: based: Rename the_cib to based_cib
nrwahl2 Jan 7, 2026
2490c4c
Feature: libcrmcommon: Drop support for PCMK_ipc_type env variable
nrwahl2 Jan 7, 2026
8f2ff46
Refactor: libcrmcommon: Use QB_IPC_SHM in pcmk__serve_DAEMON_ipc()
nrwahl2 Jan 8, 2026
766cd28
Feature: libcrmcommon: mainloop_add_ipc_server{,_with_prio} ignore type
nrwahl2 Jan 8, 2026
7483a4c
API: libcib: Deprecate cib_command_nonblocking
nrwahl2 Jan 11, 2026
92b76d5
Refactor: various: Drop PCMK__SERVER_BASED_SHM
nrwahl2 Jan 11, 2026
350f7c8
Refactor: libcrmcommon: Drop pcmk__stop_based_ipc()
nrwahl2 Jan 11, 2026
8cfa97a
Refactor: libcrmcommon: Assert for arguments in pcmk__serve_DAEMON_ipc()
nrwahl2 Jan 11, 2026
ad8ebca
Refactor: based: New based_{callbacks,io}_cleanup()
nrwahl2 Jan 8, 2026
43bbff4
Refactor: based: Move based_terminate() to pacemaker-based.c
nrwahl2 Jan 8, 2026
cc54993
Refactor: based: New based_cleanup()
nrwahl2 Jan 8, 2026
b4ebfbf
Refactor: based: Assume main loop is running in based_terminate()
nrwahl2 Jan 8, 2026
75a25ee
Doc: based: Add notes to based_terminate()
nrwahl2 Jan 8, 2026
4a5f002
Refactor: based: Set shutting_down to true in based_terminate()
nrwahl2 Jan 8, 2026
fec01b9
Low: based: Fix memory leak in remote listeners
nrwahl2 Jan 9, 2026
b81a169
Refactor: libcrmcommon: Expose struct mainloop_io_s internally
nrwahl2 Jan 9, 2026
5832741
Low: based: Destroy remote listeners in based_remote_cleanup()
nrwahl2 Jan 9, 2026
f0d007c
Refactor: libcrmcommon: Free mainloop child list at exit
nrwahl2 Jan 10, 2026
1f16d35
Refactor: libcrmcommon: Drop callback_needed variable
nrwahl2 Jan 10, 2026
ad8c15f
Refactor: libcrmcommon: child_kill_helper() returns standard code
nrwahl2 Jan 10, 2026
bacb695
Refactor: libcrmcommon: Track mainloop children in a hash table
nrwahl2 Jan 10, 2026
8484d23
Refactor: based: Add missing include to pacemaker-based.c
nrwahl2 Jan 11, 2026
2d27ec9
Refactor: based: Clean up shutdown logic
nrwahl2 Jan 11, 2026
6a1634b
Refactor: based: based_cib should always be non-NULL after init now
nrwahl2 Jan 14, 2026
b50e0d9
Refactor: various: Unref main loop consistently
nrwahl2 Jan 11, 2026
77531b6
Refactor: attrd: Drop mainloop_destroy_signal() from attrd_shutdown()
nrwahl2 Jan 11, 2026
aec85e4
Refactor: attrd: Assume main loop is running in attrd_shutdown()
nrwahl2 Jan 11, 2026
ee72686
Refactor: based: Don't init node caches explicitly
nrwahl2 Jan 11, 2026
e920622
Refactor: based: Drop based_peer_callback()
nrwahl2 Jan 11, 2026
fcf1814
API: libcib: Deprecate cib_query and cib_connected_query
nrwahl2 Jan 11, 2026
376a323
Refactor: remoted: Drop cib_proxy_accept_ro()
nrwahl2 Jan 11, 2026
cc1f77c
Refactor: based: Check for old PCMK__SERVER_BASED_RW instance
nrwahl2 Jan 11, 2026
90b9ece
Refactor: based: Make PCMK__SERVER_BASED_RO behave like _RW
nrwahl2 Jan 11, 2026
d81b94c
Refactor: based: Drop privileged argument of based_process_request()
nrwahl2 Jan 11, 2026
6d3f01f
Refactor: libcib: Drop cib__op_attr_privileged
nrwahl2 Jan 11, 2026
cabea94
Refactor: liblrmd: Map proxied PCMK__SERVER_BASED_RO clients to _RW
nrwahl2 Jan 11, 2026
86f7ebe
Refactor: libcrmcommon: pcmk__serve_based_ipc() starts only one server
nrwahl2 Jan 12, 2026
aca9174
Refactor: based: Standardize based_cpg_dispatch()
nrwahl2 Jan 12, 2026
923b3d8
Refactor: based: Standardize based_ipc_dispatch()
nrwahl2 Jan 12, 2026
181bdab
Refactor: remoted: Minor improvements to remoted__read_handshake_data()
nrwahl2 Jan 12, 2026
af0eebb
Refactor: based: New based_read_handshake_data()
nrwahl2 Jan 12, 2026
098dafc
Refactor: based: pcmk__remote_ready() in cib_remote_msg()
nrwahl2 Jan 12, 2026
990d5f4
Refactor: based: Some cleanup/standardization of cib_remote_msg()
nrwahl2 Jan 12, 2026
f2f4fae
Refactor: libcrmcommon: Reorganize pcmk__is_user_in_group() unit test
nrwahl2 Jan 12, 2026
6acc5df
Refactor: libcrmcommon: Use getgrnam() in pcmk__is_user_in_group()
nrwahl2 Jan 12, 2026
92f9921
Refactor: based: Drop is_daemon_group_member()
nrwahl2 May 3, 2026
4aaa86a
Refactor: based: authenticate_user() takes client_name argument
nrwahl2 May 3, 2026
07a8ed9
Refactor: based: Rename login argument to msg
nrwahl2 May 3, 2026
4417fd6
Refactor: based: Rename cib_remote_auth() variables
nrwahl2 May 3, 2026
48dd7eb
Log: based: Improve cib_remote_auth() log messages
nrwahl2 May 3, 2026
1c8560e
Refactor: based: New based_remote_client_auth()
nrwahl2 Jan 12, 2026
8cab49a
Refactor: based: Functionize validating/parsing remote auth message
nrwahl2 Jan 12, 2026
a095cf7
Doc: based: Document confusion about "dangerous" options
nrwahl2 Jan 12, 2026
d52d2d8
Refactor: based: Reorganize cib_handle_remote_msg()
nrwahl2 Jan 12, 2026
a1e15ab
Refactor: based: Use pcmk__request_t in process_transaction_requests()
nrwahl2 Jan 12, 2026
c215797
Refactor: based: based_process_request() takes pcmk__request_t argument
nrwahl2 Jan 12, 2026
d4e6834
Refactor: based: Drop redundant client == NULL check
nrwahl2 Jan 12, 2026
f7b5e83
Refactor: based: forward_request() takes pcmk__request_t
nrwahl2 Jan 12, 2026
f5d06d8
Refactor: based: parse_peer_options() takes pcmk__request_t
nrwahl2 Jan 12, 2026
8379758
Refactor: based: based_perform_op_rw() takes pcmk__request_t
nrwahl2 Jan 12, 2026
9f2ae33
Doc: based: Drop TODO comment
nrwahl2 Jan 13, 2026
1da0ef2
Refactor: based: Free output in the done section
nrwahl2 Jan 13, 2026
ff6efec
Low: based: Don't forward requests via cluster if in stand-alone mode
nrwahl2 Jan 13, 2026
0e29da3
Refactor: libcib: Drop unneeded modifies flag for primary request
nrwahl2 Jan 13, 2026
c476924
Feature: based: Drop support for cib_ismaster requests
nrwahl2 Jan 13, 2026
1a3701a
Refactor: libcib, based: Drop cib__op_attr_local
nrwahl2 Jan 13, 2026
8d4934d
Feature: based: Drop support for cib_delete_alt requests
nrwahl2 Jan 13, 2026
90897a8
Refactor: libcib: Drop cib__op_attr_replaces
nrwahl2 Jan 13, 2026
2c602c1
Low: based: Replace/commit ops don't automatically write to disk
nrwahl2 Jan 13, 2026
3178a82
Refactor: libcrmcommon: Drop pcmk__update_schema transform argument
nrwahl2 Jan 13, 2026
e92dd56
Refactor: libcib: Drop cib__op_attr_writes_through
nrwahl2 Jan 13, 2026
9c39fea
Refactor: libcib: Drop cib__op_attr_transaction
nrwahl2 Jan 13, 2026
c0848f1
Refactor: libcib: Drop enum cib__op_attr
nrwahl2 Jan 13, 2026
6d57ea9
Refactor: libcib: Clean up includes
nrwahl2 May 3, 2026
d4a023e
Refactor: libcib: Drop redundant cib_discard_reply check in cib_remote.c
nrwahl2 Jan 13, 2026
c3ecafe
API: libcib: Deprecate cib_api_operations_t:query_from() method
nrwahl2 Jan 15, 2026
57c0b27
Refactor: based: Drop redundant based_stand_alone() check
nrwahl2 Jan 15, 2026
b289828
Refactor: based: Call process_ping_reply() in process section
nrwahl2 Jan 16, 2026
14246b6
Refactor: based: Check cib_status after checking process
nrwahl2 Jan 16, 2026
4e4a328
Refactor: based: Return void from parse_peer_options()
nrwahl2 Jan 16, 2026
5734bb5
Refactor: based: Default needs_reply to false
nrwahl2 Jan 15, 2026
a8b3f6f
Refactor: based: Construct reply only if needs_reply is true
nrwahl2 Jan 17, 2026
ffcd43a
Low: based: Fix memory leak on upgrade when validate-with is not set
nrwahl2 Jan 18, 2026
d3fb9a2
Refactor: libcrmcluster: pcmk__cpg_send_xml() returns void
nrwahl2 Jan 18, 2026
d14f69e
Refactor: libcrmcluster: Pass GString to send_cpg_text(0
nrwahl2 Jan 19, 2026
a617be4
Refactor: libcrmcluster: Drop two memset() calls
nrwahl2 Jan 19, 2026
05a35ac
Refactor: libcrmcluster: Consolidate some init in send_cpg_text()
nrwahl2 Jan 19, 2026
fbcefb6
Refactor: libcrmcluster: Use size_t for local_name_len
nrwahl2 Jan 19, 2026
3725df3
Refactor: libcrmcluster: Use pid_t for local_pid
nrwahl2 Jan 19, 2026
1dbbd1b
Refactor: libcrmcommon: Drop max argument from pcmk__compress()
nrwahl2 Jan 19, 2026
29b970d
Doc: libcrmcluster: Document a type conversion mess
nrwahl2 Jan 19, 2026
82d823c
Refactor: libcrmcluster: Reduce log call duplication
nrwahl2 Jan 19, 2026
299698e
Refactor: libcrmcluster: Drop send_cpg_text()
nrwahl2 Jan 19, 2026
5612542
Refactor: attrd: Return void from attrd_send_message()
nrwahl2 Jan 19, 2026
5c104f5
Refactor: libcrmcluster: Return void from pcmk__cluster_send_message()
nrwahl2 Jan 19, 2026
65d0881
Refactor: based: Reuse req in based_process_upgrade()
nrwahl2 Jan 19, 2026
29b035d
Log: based: Drop some basically redundant log messages
nrwahl2 Jan 20, 2026
aa63934
Refactor: based: Create reply only if we will send it
nrwahl2 Jan 20, 2026
076307d
Refactor: libcib: Reorder CIB request constants alphabetically
nrwahl2 Jan 20, 2026
56d9990
wip
nrwahl2 Jan 13, 2026
4fbe89b
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