[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[taler-exchange] branch master updated: fix #8030
From: |
gnunet |
Subject: |
[taler-exchange] branch master updated: fix #8030 |
Date: |
Sun, 28 Jan 2024 19:37:08 +0100 |
This is an automated email from the git hooks/post-receive script.
grothoff pushed a commit to branch master
in repository exchange.
The following commit(s) were added to refs/heads/master by this push:
new f8f7c83c fix #8030
f8f7c83c is described below
commit f8f7c83cb8df30accb772ae1a4ea3fc62606a5cc
Author: Christian Grothoff <christian@grothoff.org>
AuthorDate: Sun Jan 28 19:37:04 2024 +0100
fix #8030
---
...aler-exchange.taler-exchange-aggregator.service | 3 ++-
.../taler-exchange.taler-exchange-closer.service | 3 ++-
.../taler-exchange.taler-exchange-expire.service | 3 ++-
debian/taler-exchange.taler-exchange-httpd.service | 3 ++-
.../taler-exchange.taler-exchange-transfer.service | 3 ++-
...taler-exchange.taler-exchange-wirewatch.service | 3 ++-
src/exchange/taler-exchange-aggregator.c | 3 +++
src/exchange/taler-exchange-closer.c | 10 ++++-----
src/exchange/taler-exchange-expire.c | 4 ++--
src/exchange/taler-exchange-httpd.c | 19 ++++++++++------
src/exchange/taler-exchange-transfer.c | 2 +-
src/exchange/taler-exchange-wirewatch.c | 2 +-
src/include/platform.h | 25 ++++++++++++++++++++++
src/testing/taler-unified-setup.sh | 1 +
14 files changed, 61 insertions(+), 23 deletions(-)
diff --git a/debian/taler-exchange.taler-exchange-aggregator.service
b/debian/taler-exchange.taler-exchange-aggregator.service
index 09594598..f92dfb17 100644
--- a/debian/taler-exchange.taler-exchange-aggregator.service
+++ b/debian/taler-exchange.taler-exchange-aggregator.service
@@ -7,8 +7,9 @@ After=postgres.service
User=taler-exchange-aggregator
Type=simple
Restart=always
+RestartMode=direct
RestartSec=1s
-RestartPreventExitStatus=9
+RestartPreventExitStatus=2 3 4 5 6 9
ExecStart=/usr/bin/taler-exchange-aggregator -c /etc/taler/taler.conf
StandardOutput=journal
StandardError=journal
diff --git a/debian/taler-exchange.taler-exchange-closer.service
b/debian/taler-exchange.taler-exchange-closer.service
index ab9c6d98..c6315375 100644
--- a/debian/taler-exchange.taler-exchange-closer.service
+++ b/debian/taler-exchange.taler-exchange-closer.service
@@ -7,8 +7,9 @@ After=network.target postgres.service
User=taler-exchange-closer
Type=simple
Restart=always
+RestartMode=direct
RestartSec=1s
-RestartPreventExitStatus=9
+RestartPreventExitStatus=2 3 4 5 6 9
ExecStart=/usr/bin/taler-exchange-closer -c /etc/taler/taler.conf
StandardOutput=journal
StandardError=journal
diff --git a/debian/taler-exchange.taler-exchange-expire.service
b/debian/taler-exchange.taler-exchange-expire.service
index a34cdccb..7bbccc2a 100644
--- a/debian/taler-exchange.taler-exchange-expire.service
+++ b/debian/taler-exchange.taler-exchange-expire.service
@@ -7,8 +7,9 @@ After=postgres.service
User=taler-exchange-expire
Type=simple
Restart=always
+RestartMode=direct
RestartSec=1s
-RestartPreventExitStatus=9
+RestartPreventExitStatus=2 3 4 5 6 9
ExecStart=/usr/bin/taler-exchange-expire -c /etc/taler/taler.conf
StandardOutput=journal
StandardError=journal
diff --git a/debian/taler-exchange.taler-exchange-httpd.service
b/debian/taler-exchange.taler-exchange-httpd.service
index 2a4cf72e..1fb538a1 100644
--- a/debian/taler-exchange.taler-exchange-httpd.service
+++ b/debian/taler-exchange.taler-exchange-httpd.service
@@ -12,8 +12,9 @@ Type=simple
# Depending on the configuration, the service process kills itself and then
# needs to be restarted. Thus no significant delay on restarts.
Restart=always
+RestartMode=direct
RestartSec=1ms
-RestartPreventExitStatus=9
+RestartPreventExitStatus=2 3 4 5 6 9
# Disable the service if more than 5 restarts are encountered within 5s.
# These are usually the systemd defaults, but can be overwritten, thus we set
diff --git a/debian/taler-exchange.taler-exchange-transfer.service
b/debian/taler-exchange.taler-exchange-transfer.service
index 40d47b09..2557dbdf 100644
--- a/debian/taler-exchange.taler-exchange-transfer.service
+++ b/debian/taler-exchange.taler-exchange-transfer.service
@@ -7,8 +7,9 @@ PartOf=taler-exchange.target
User=taler-exchange-wire
Type=simple
Restart=always
+RestartMode=direct
RestartSec=1s
-RestartPreventExitStatus=9
+RestartPreventExitStatus=2 3 4 5 6 9
ExecStart=/usr/bin/taler-exchange-transfer -c /etc/taler/taler.conf
StandardOutput=journal
StandardError=journal
diff --git a/debian/taler-exchange.taler-exchange-wirewatch.service
b/debian/taler-exchange.taler-exchange-wirewatch.service
index 14023c12..2a549977 100644
--- a/debian/taler-exchange.taler-exchange-wirewatch.service
+++ b/debian/taler-exchange.taler-exchange-wirewatch.service
@@ -7,8 +7,9 @@ PartOf=taler-exchange.target
User=taler-exchange-wire
Type=simple
Restart=always
+RestartMode=direct
RestartSec=1s
-RestartPreventExitStatus=9
+RestartPreventExitStatus=2 3 4 5 6 9
RuntimeMaxSec=3600s
ExecStart=/usr/bin/taler-exchange-wirewatch -c /etc/taler/taler.conf
StandardOutput=journal
diff --git a/src/exchange/taler-exchange-aggregator.c
b/src/exchange/taler-exchange-aggregator.c
index 7a579a9f..1d0a0bb5 100644
--- a/src/exchange/taler-exchange-aggregator.c
+++ b/src/exchange/taler-exchange-aggregator.c
@@ -382,6 +382,7 @@ release_shard (struct Shard *s)
case GNUNET_DB_STATUS_SOFT_ERROR:
GNUNET_break (GNUNET_DB_STATUS_SOFT_ERROR != qs);
GNUNET_break (0);
+ global_ret = EXIT_FAILURE;
GNUNET_SCHEDULER_shutdown ();
return;
case GNUNET_DB_STATUS_SUCCESS_NO_RESULTS:
@@ -934,6 +935,7 @@ run_aggregation (void *cls)
switch (ret)
{
case GNUNET_SYSERR:
+ global_ret = EXIT_FAILURE;
GNUNET_SCHEDULER_shutdown ();
db_plugin->rollback (db_plugin->cls);
release_shard (s);
@@ -1197,6 +1199,7 @@ drain_kyc_alerts (void *cls)
{
case GNUNET_SYSERR:
GNUNET_break (0);
+ global_ret = EXIT_FAILURE;
GNUNET_SCHEDULER_shutdown ();
db_plugin->rollback (db_plugin->cls); /* just in case */
return;
diff --git a/src/exchange/taler-exchange-closer.c
b/src/exchange/taler-exchange-closer.c
index 63a98bd0..779525c4 100644
--- a/src/exchange/taler-exchange-closer.c
+++ b/src/exchange/taler-exchange-closer.c
@@ -469,13 +469,11 @@ run_reserve_closures (void *cls)
if (GNUNET_YES == test_mode)
{
GNUNET_SCHEDULER_shutdown ();
+ return;
}
- else
- {
- task = GNUNET_SCHEDULER_add_delayed (closer_idle_sleep_interval,
- &run_reserve_closures,
- NULL);
- }
+ task = GNUNET_SCHEDULER_add_delayed (closer_idle_sleep_interval,
+ &run_reserve_closures,
+ NULL);
return;
case GNUNET_DB_STATUS_SUCCESS_ONE_RESULT:
(void) commit_or_warn ();
diff --git a/src/exchange/taler-exchange-expire.c
b/src/exchange/taler-exchange-expire.c
index c7132fcb..b2d34ee1 100644
--- a/src/exchange/taler-exchange-expire.c
+++ b/src/exchange/taler-exchange-expire.c
@@ -272,9 +272,9 @@ run_expire (void *cls)
"expire-purse"))
{
GNUNET_break (0);
- global_ret = EXIT_FAILURE;
db_plugin->rollback (db_plugin->cls);
abort_shard (s);
+ global_ret = EXIT_FAILURE;
GNUNET_SCHEDULER_shutdown ();
return;
}
@@ -285,9 +285,9 @@ run_expire (void *cls)
{
case GNUNET_DB_STATUS_HARD_ERROR:
GNUNET_break (0);
- global_ret = EXIT_FAILURE;
db_plugin->rollback (db_plugin->cls);
abort_shard (s);
+ global_ret = EXIT_FAILURE;
GNUNET_SCHEDULER_shutdown ();
return;
case GNUNET_DB_STATUS_SOFT_ERROR:
diff --git a/src/exchange/taler-exchange-httpd.c
b/src/exchange/taler-exchange-httpd.c
index 67e08962..e650b3fd 100644
--- a/src/exchange/taler-exchange-httpd.c
+++ b/src/exchange/taler-exchange-httpd.c
@@ -2435,7 +2435,9 @@ run_single_request (void)
xfork = fork ();
if (-1 == xfork)
{
- global_ret = EXIT_FAILURE;
+ GNUNET_log_strerror (GNUNET_ERROR_TYPE_ERROR,
+ "fork");
+ global_ret = EXIT_NO_RESTART;
GNUNET_SCHEDULER_shutdown ();
return;
}
@@ -2604,35 +2606,38 @@ run (void *cls,
if (GNUNET_OK !=
TALER_TEMPLATING_init ("exchange"))
{
- global_ret = EXIT_FAILURE;
+ global_ret = EXIT_NOTINSTALLED;
GNUNET_SCHEDULER_shutdown ();
return;
}
if (GNUNET_SYSERR ==
TEH_plugin->preflight (TEH_plugin->cls))
{
- global_ret = EXIT_FAILURE;
+ GNUNET_break (0);
+ global_ret = EXIT_NO_RESTART;
GNUNET_SCHEDULER_shutdown ();
return;
}
if (GNUNET_OK !=
TEH_extensions_init ())
{
- global_ret = EXIT_FAILURE;
+ global_ret = EXIT_NOTINSTALLED;
GNUNET_SCHEDULER_shutdown ();
return;
}
if (GNUNET_OK !=
TEH_keys_init ())
{
- global_ret = EXIT_FAILURE;
+ GNUNET_break (0);
+ global_ret = EXIT_NO_RESTART;
GNUNET_SCHEDULER_shutdown ();
return;
}
if (GNUNET_OK !=
TEH_wire_init ())
{
- global_ret = EXIT_FAILURE;
+ GNUNET_break (0);
+ global_ret = EXIT_NO_RESTART;
GNUNET_SCHEDULER_shutdown ();
return;
}
@@ -2644,7 +2649,7 @@ run (void *cls,
if (NULL == TEH_curl_ctx)
{
GNUNET_break (0);
- global_ret = EXIT_FAILURE;
+ global_ret = EXIT_NO_RESTART;
GNUNET_SCHEDULER_shutdown ();
return;
}
diff --git a/src/exchange/taler-exchange-transfer.c
b/src/exchange/taler-exchange-transfer.c
index ae2b4fe7..b0fad660 100644
--- a/src/exchange/taler-exchange-transfer.c
+++ b/src/exchange/taler-exchange-transfer.c
@@ -574,7 +574,7 @@ wire_prepare_cb (void *cls,
GNUNET_break (0);
cleanup_wpd ();
db_plugin->rollback (db_plugin->cls);
- global_ret = EXIT_NOTCONFIGURED;
+ global_ret = EXIT_NO_RESTART;
GNUNET_SCHEDULER_shutdown ();
return;
}
diff --git a/src/exchange/taler-exchange-wirewatch.c
b/src/exchange/taler-exchange-wirewatch.c
index 34235eb9..da5d9c09 100644
--- a/src/exchange/taler-exchange-wirewatch.c
+++ b/src/exchange/taler-exchange-wirewatch.c
@@ -362,7 +362,6 @@ exchange_serve_process_config (void)
GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
"No accounts enabled for credit!\n");
GNUNET_SCHEDULER_shutdown ();
- global_ret = EXIT_INVALIDARGUMENT;
return GNUNET_SYSERR;
}
return GNUNET_OK;
@@ -951,6 +950,7 @@ run (void *cls,
{
GNUNET_break (0);
GNUNET_SCHEDULER_shutdown ();
+ global_ret = EXIT_NO_RESTART;
return;
}
rc = GNUNET_CURL_gnunet_rc_create (ctx);
diff --git a/src/include/platform.h b/src/include/platform.h
index f27ee38b..db04cb97 100644
--- a/src/include/platform.h
+++ b/src/include/platform.h
@@ -231,22 +231,42 @@ atoll (const char *nptr);
/* LSB-style exit status codes */
#ifndef EXIT_INVALIDARGUMENT
+/**
+ * Command-line arguments are invalid.
+ * Restarting useless.
+ */
#define EXIT_INVALIDARGUMENT 2
#endif
#ifndef EXIT_NOTIMPLEMENTED
+/**
+ * The requested operation is not implemented.
+ * Restarting useless.
+ */
#define EXIT_NOTIMPLEMENTED 3
#endif
#ifndef EXIT_NOPERMISSION
+/**
+ * Permissions needed to run are not available.
+ * Restarting useless.
+ */
#define EXIT_NOPERMISSION 4
#endif
#ifndef EXIT_NOTINSTALLED
+/**
+ * Key resources are not installed.
+ * Restarting useless.
+ */
#define EXIT_NOTINSTALLED 5
#endif
#ifndef EXIT_NOTCONFIGURED
+/**
+ * Key configuration settings are missing or invalid.
+ * Restarting useless.
+ */
#define EXIT_NOTCONFIGURED 6
#endif
@@ -254,7 +274,12 @@ atoll (const char *nptr);
#define EXIT_NOTRUNNING 7
#endif
+
#ifndef EXIT_NO_RESTART
+/**
+ * Exit code from 'main' if we do not want to be restarted,
+ * except by manual intervention (hard failure).
+ */
#define EXIT_NO_RESTART 9
#endif
diff --git a/src/testing/taler-unified-setup.sh
b/src/testing/taler-unified-setup.sh
index 5b379e18..e621567d 100755
--- a/src/testing/taler-unified-setup.sh
+++ b/src/testing/taler-unified-setup.sh
@@ -581,6 +581,7 @@ then
$USE_VALGRIND taler-merchant-wirewatch \
-c "$CONF" \
-L "$LOGLEVEL" \
+ --persist \
2> taler-merchant-wirewatch.log &
echo " DONE"
fi
--
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [taler-exchange] branch master updated: fix #8030,
gnunet <=