Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
SUSE:SLE-15-SP7:GA
pacemaker.34780
bsc#1224183-0002-Fix-tools-CIB-clients-retry-si...
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File bsc#1224183-0002-Fix-tools-CIB-clients-retry-signon-upon-an-EAGAIN-er.patch of Package pacemaker.34780
From 843a8e6cc96f137819fb5f4e1d45abce58c05ca3 Mon Sep 17 00:00:00 2001 From: "Gao,Yan" <ygao@suse.com> Date: Tue, 2 Jul 2024 10:20:24 +0200 Subject: [PATCH 2/2] Fix: tools: CIB clients retry signon upon an EAGAIN error ... up to 5 times. Previously CIB clients wouldn't retry signon upon an EAGAIN and directly return a connection error, which made them not resilient enough. --- tools/cibadmin.c | 2 +- tools/crm_attribute.c | 2 +- tools/crm_node.c | 2 +- tools/crm_resource.c | 2 +- tools/crm_shadow.c | 2 +- tools/crm_ticket.c | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) Index: pacemaker-2.1.2+20211124.ada5c3b36/tools/cibadmin.c =================================================================== --- pacemaker-2.1.2+20211124.ada5c3b36.orig/tools/cibadmin.c +++ pacemaker-2.1.2+20211124.ada5c3b36/tools/cibadmin.c @@ -737,7 +737,7 @@ do_init(void) int rc = pcmk_ok; the_cib = cib_new(); - rc = the_cib->cmds->signon(the_cib, crm_system_name, cib_command); + rc = cib__signon_attempts(the_cib, crm_system_name, cib_command, 5); if (rc != pcmk_ok) { crm_err("Could not connect to the CIB: %s", pcmk_strerror(rc)); fprintf(stderr, "Could not connect to the CIB: %s\n", Index: pacemaker-2.1.2+20211124.ada5c3b36/tools/crm_attribute.c =================================================================== --- pacemaker-2.1.2+20211124.ada5c3b36.orig/tools/crm_attribute.c +++ pacemaker-2.1.2+20211124.ada5c3b36/tools/crm_attribute.c @@ -355,7 +355,7 @@ main(int argc, char **argv) } the_cib = cib_new(); - rc = the_cib->cmds->signon(the_cib, crm_system_name, cib_command); + rc = cib__signon_attempts(the_cib, crm_system_name, cib_command, 5); if (rc != pcmk_ok) { fprintf(stderr, "Could not connect to the CIB: %s\n", Index: pacemaker-2.1.2+20211124.ada5c3b36/tools/crm_node.c =================================================================== --- pacemaker-2.1.2+20211124.ada5c3b36.orig/tools/crm_node.c +++ pacemaker-2.1.2+20211124.ada5c3b36/tools/crm_node.c @@ -350,7 +350,7 @@ cib_remove_node(long id, const char *nam } cib = cib_new(); - cib->cmds->signon(cib, crm_system_name, cib_command); + cib__signon_attempts(cib, crm_system_name, cib_command, 5); rc = cib->cmds->remove(cib, XML_CIB_TAG_NODES, node, cib_sync_call); if (rc != pcmk_ok) { Index: pacemaker-2.1.2+20211124.ada5c3b36/tools/crm_resource.c =================================================================== --- pacemaker-2.1.2+20211124.ada5c3b36.orig/tools/crm_resource.c +++ pacemaker-2.1.2+20211124.ada5c3b36/tools/crm_resource.c @@ -1764,7 +1764,7 @@ main(int argc, char **argv) "Could not create CIB connection"); goto done; } - rc = cib_conn->cmds->signon(cib_conn, crm_system_name, cib_command); + rc = cib__signon_attempts(cib_conn, crm_system_name, cib_command, 5); rc = pcmk_legacy2rc(rc); if (rc != pcmk_rc_ok) { exit_code = pcmk_rc2exitc(rc); Index: pacemaker-2.1.2+20211124.ada5c3b36/tools/crm_shadow.c =================================================================== --- pacemaker-2.1.2+20211124.ada5c3b36.orig/tools/crm_shadow.c +++ pacemaker-2.1.2+20211124.ada5c3b36/tools/crm_shadow.c @@ -414,7 +414,7 @@ main(int argc, char **argv) if (command == 'd' || command == 'r' || command == 'c' || command == 'C') { real_cib = cib_new_no_shadow(); - rc = real_cib->cmds->signon(real_cib, crm_system_name, cib_command); + rc = cib__signon_attempts(real_cib, crm_system_name, cib_command, 5); if (rc != pcmk_ok) { fprintf(stderr, "Could not connect to CIB: %s\n", pcmk_strerror(rc)); Index: pacemaker-2.1.2+20211124.ada5c3b36/tools/crm_ticket.c =================================================================== --- pacemaker-2.1.2+20211124.ada5c3b36.orig/tools/crm_ticket.c +++ pacemaker-2.1.2+20211124.ada5c3b36/tools/crm_ticket.c @@ -860,7 +860,7 @@ main(int argc, char **argv) goto done; } - rc = cib_conn->cmds->signon(cib_conn, crm_system_name, cib_command); + rc = cib__signon_attempts(cib_conn, crm_system_name, cib_command, 5); if (rc != pcmk_ok) { CMD_ERR("Could not connect to CIB: %s", pcmk_strerror(rc)); exit_code = crm_errno2exit(rc);
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor