diff --git a/include/crm/cib/internal.h b/include/crm/cib/internal.h index 78e5c1a4c47..d42daf2a186 100644 --- a/include/crm/cib/internal.h +++ b/include/crm/cib/internal.h @@ -181,6 +181,8 @@ cib__client_triggers_refresh(const char *name) "crm_attribute", "crm_node", "crm_resource", + "crm_shadow_status", + "cibadmin_status", "crm_ticket", NULL); } diff --git a/tools/cibadmin.c b/tools/cibadmin.c index 7fd636e1851..a227b18a066 100644 --- a/tools/cibadmin.c +++ b/tools/cibadmin.c @@ -137,6 +137,7 @@ static struct { gboolean input_stdin; gboolean allow_create; gboolean force; + gboolean update_status; gboolean get_node_path; gboolean no_children; gboolean score_update; @@ -433,6 +434,11 @@ cibadmin_handle_command(pcmk__output_t *out, "entire CIB", options.cib_section); } + if (options.update_status) { + free(crm_system_name); + crm_system_name = strdup("cibadmin_status"); + } + rc = cib__create_signon(&cib_conn); if (rc != pcmk_rc_ok) { exit_code = pcmk_rc2exitc(rc); @@ -807,6 +813,11 @@ static GOptionEntry addl_entries[] = { "result", NULL }, + { "update-status", 'u', G_OPTION_FLAG_NONE, G_OPTION_ARG_NONE, + &options.update_status, + "(Advanced) Apply CIB update without triggering a controller refresh", + NULL }, + // @COMPAT Deprecated since 3.0.0 { "local", 'l', G_OPTION_FLAG_HIDDEN, G_OPTION_ARG_NONE, &options.local, "(deprecated)", NULL }, diff --git a/tools/crm_shadow.c b/tools/crm_shadow.c index 4d302784358..80a0d24ee55 100644 --- a/tools/crm_shadow.c +++ b/tools/crm_shadow.c @@ -77,6 +77,7 @@ static struct { gboolean force; gboolean batch; gboolean full_upload; + gboolean update_status; gchar *validate_with; } options = { .cmd_options = cib_sync_call, @@ -679,6 +680,12 @@ commit_shadow_file(GError **error) return; } + if (options.update_status) { + options.full_upload = TRUE; + free(crm_system_name); + crm_system_name = strdup("crm_shadow_status"); + } + filename = get_shadow_file(options.instance); if (check_file_exists(filename, true, error) != pcmk_rc_ok) { goto done; @@ -1139,6 +1146,11 @@ static GOptionEntry addl_entries[] = { &options.validate_with, "(Advanced) Create an older configuration version", NULL }, + { "update-status", 'u', G_OPTION_FLAG_NONE, G_OPTION_ARG_NONE, + &options.update_status, + "(Advanced) Upload entire CIB with --commit, without triggering a " + "controller refresh", NULL }, + { NULL } };