File tree Expand file tree Collapse file tree 5 files changed +24
-20
lines changed Expand file tree Collapse file tree 5 files changed +24
-20
lines changed Original file line number Diff line number Diff line change @@ -2902,6 +2902,7 @@ class MySqlConfigBackendDHCPv4Impl : public MySqlConfigBackendImpl {
2902
2902
}
2903
2903
2904
2904
bool reopened = false ;
2905
+ bool do_exit = false ;
2905
2906
2906
2907
const std::string timer_name = db_reconnect_ctl->timerName ();
2907
2908
@@ -2913,10 +2914,8 @@ class MySqlConfigBackendDHCPv4Impl : public MySqlConfigBackendImpl {
2913
2914
// Something is definitely wrong. Did the configuration change
2914
2915
// somehow and there is no configuration for CB?
2915
2916
if (!config_ctl) {
2916
- std::string reason (" No CB configuration found!" );
2917
- LOG_ERROR (mysql_cb_logger, MYSQL_CB_RECONNECT_ATTEMPT_FAILED4)
2918
- .arg (reason);
2919
- return (true );
2917
+ do_exit = true ;
2918
+ isc_throw (Unexpected, " No CB configuration found!" );
2920
2919
}
2921
2920
2922
2921
// Iterate over the configured DBs and instantiate them.
@@ -2932,6 +2931,9 @@ class MySqlConfigBackendDHCPv4Impl : public MySqlConfigBackendImpl {
2932
2931
} catch (const std::exception& ex) {
2933
2932
LOG_ERROR (mysql_cb_logger, MYSQL_CB_RECONNECT_ATTEMPT_FAILED4)
2934
2933
.arg (ex.what ());
2934
+ if (do_exit) {
2935
+ return (true );
2936
+ }
2935
2937
}
2936
2938
2937
2939
if (reopened) {
Original file line number Diff line number Diff line change @@ -3329,6 +3329,7 @@ class MySqlConfigBackendDHCPv6Impl : public MySqlConfigBackendImpl {
3329
3329
}
3330
3330
3331
3331
bool reopened = false ;
3332
+ bool do_exit = false ;
3332
3333
3333
3334
const std::string timer_name = db_reconnect_ctl->timerName ();
3334
3335
@@ -3340,10 +3341,8 @@ class MySqlConfigBackendDHCPv6Impl : public MySqlConfigBackendImpl {
3340
3341
// Something is definitely wrong. Did the configuration change
3341
3342
// somehow and there is no configuration for CB?
3342
3343
if (!config_ctl) {
3343
- std::string reason (" No CB configuration found!" );
3344
- LOG_ERROR (mysql_cb_logger, MYSQL_CB_RECONNECT_ATTEMPT_FAILED6)
3345
- .arg (reason);
3346
- return (true );
3344
+ do_exit = true ;
3345
+ isc_throw (Unexpected, " No CB configuration found!" );
3347
3346
}
3348
3347
3349
3348
// Iterate over the configured DBs and instantiate them.
@@ -3359,6 +3358,9 @@ class MySqlConfigBackendDHCPv6Impl : public MySqlConfigBackendImpl {
3359
3358
} catch (const std::exception& ex) {
3360
3359
LOG_ERROR (mysql_cb_logger, MYSQL_CB_RECONNECT_ATTEMPT_FAILED6)
3361
3360
.arg (ex.what ());
3361
+ if (do_exit) {
3362
+ return (true );
3363
+ }
3362
3364
}
3363
3365
3364
3366
if (reopened) {
Original file line number Diff line number Diff line change @@ -2707,6 +2707,7 @@ class PgSqlConfigBackendDHCPv4Impl : public PgSqlConfigBackendImpl {
2707
2707
}
2708
2708
2709
2709
bool reopened = false ;
2710
+ bool do_exit = false ;
2710
2711
2711
2712
const std::string timer_name = db_reconnect_ctl->timerName ();
2712
2713
@@ -2718,10 +2719,8 @@ class PgSqlConfigBackendDHCPv4Impl : public PgSqlConfigBackendImpl {
2718
2719
// Something is definitely wrong. Did the configuration change
2719
2720
// somehow and there is no configuration for CB?
2720
2721
if (!config_ctl) {
2721
- std::string reason (" No CB configuration found!" );
2722
- LOG_ERROR (pgsql_cb_logger, PGSQL_CB_RECONNECT_ATTEMPT_FAILED4)
2723
- .arg (reason);
2724
- return (true );
2722
+ do_exit = true ;
2723
+ isc_throw (Unexpected, " No CB configuration found!" );
2725
2724
}
2726
2725
2727
2726
// Iterate over the configured DBs and instantiate them.
@@ -2737,6 +2736,9 @@ class PgSqlConfigBackendDHCPv4Impl : public PgSqlConfigBackendImpl {
2737
2736
} catch (const std::exception& ex) {
2738
2737
LOG_ERROR (pgsql_cb_logger, PGSQL_CB_RECONNECT_ATTEMPT_FAILED4)
2739
2738
.arg (ex.what ());
2739
+ if (do_exit) {
2740
+ return (true );
2741
+ }
2740
2742
}
2741
2743
2742
2744
if (reopened) {
Original file line number Diff line number Diff line change @@ -3029,6 +3029,7 @@ class PgSqlConfigBackendDHCPv6Impl : public PgSqlConfigBackendImpl {
3029
3029
}
3030
3030
3031
3031
bool reopened = false ;
3032
+ bool do_exit = false ;
3032
3033
3033
3034
const std::string timer_name = db_reconnect_ctl->timerName ();
3034
3035
@@ -3040,10 +3041,8 @@ class PgSqlConfigBackendDHCPv6Impl : public PgSqlConfigBackendImpl {
3040
3041
// Something is definitely wrong. Did the configuration change
3041
3042
// somehow and there is no configuration for CB?
3042
3043
if (!config_ctl) {
3043
- std::string reason (" No CB configuration found!" );
3044
- LOG_ERROR (pgsql_cb_logger, PGSQL_CB_RECONNECT_ATTEMPT_FAILED6)
3045
- .arg (reason);
3046
- return (true );
3044
+ do_exit = true ;
3045
+ isc_throw (Unexpected, " No CB configuration found!" );
3047
3046
}
3048
3047
3049
3048
// Iterate over the configured DBs and instantiate them.
@@ -3059,6 +3058,9 @@ class PgSqlConfigBackendDHCPv6Impl : public PgSqlConfigBackendImpl {
3059
3058
} catch (const std::exception& ex) {
3060
3059
LOG_ERROR (pgsql_cb_logger, PGSQL_CB_RECONNECT_ATTEMPT_FAILED6)
3061
3060
.arg (ex.what ());
3061
+ if (do_exit) {
3062
+ return (true );
3063
+ }
3062
3064
}
3063
3065
3064
3066
if (reopened) {
Original file line number Diff line number Diff line change 93
93
% HA_PAUSE_CLIENT_LISTENER_FAILED: 2
94
94
% LOG_BAD_STREAM: 4
95
95
% LOG_DUPLICATE_MESSAGE_ID: 4
96
- % MYSQL_CB_RECONNECT_ATTEMPT_FAILED4: 2
97
- % MYSQL_CB_RECONNECT_ATTEMPT_FAILED6: 2
98
96
% NETCONF_GET_CONFIG_FAILED: 4
99
97
% NETCONF_SET_CONFIG_FAILED: 5
100
98
% NETCONF_UPDATE_CONFIG_FAILED: 5
103
101
% DHCP4_PACKET_PROCESS_STD_EXCEPTION: 4
104
102
% DHCP6_PACKET_PROCESS_EXCEPTION: 4
105
103
% DHCP6_PACKET_PROCESS_STD_EXCEPTION: 4
106
- % PGSQL_CB_RECONNECT_ATTEMPT_FAILED4: 2
107
- % PGSQL_CB_RECONNECT_ATTEMPT_FAILED6: 2
108
104
% DCTL_CONFIG_FILE_LOAD_FAIL: 2
109
105
% LOG_DUPLICATE_NAMESPACE: 2
110
106
% LOG_NO_MESSAGE_ID: 2
You can’t perform that action at this time.
0 commit comments