]> git.ipfire.org Git - thirdparty/FORT-validator.git/commitdiff
Update 'retry' conf default values, fix compile warning at OpenBSD
authorpcarana <pc.moreno2099@gmail.com>
Thu, 16 Jan 2020 20:12:31 +0000 (14:12 -0600)
committerpcarana <pc.moreno2099@gmail.com>
Thu, 16 Jan 2020 20:12:31 +0000 (14:12 -0600)
docs/usage.md
examples/config.json
man/fort.8
src/config.c
src/rtr/db/vrps.c

index 62279c57931b818bf8c8d8450a4fd744ea61ebd9..0f3bb5dc4629852487916de4a8685d9286f8c441 100644 (file)
@@ -597,8 +597,8 @@ The configuration options are mostly the same as the ones from the `argv` interf
                "<a href="#--rrdpenabled">enabled</a>": true,
                "<a href="#--rrdppriority">priority</a>": 50,
                "retry": {
-                       "<a href="#--rrdpretrycount">count</a>": 1,
-                       "<a href="#--rrdpretryinterval">interval</a>": 3
+                       "<a href="#--rrdpretrycount">count</a>": 2,
+                       "<a href="#--rrdpretryinterval">interval</a>": 5
                }
        },
 
@@ -607,8 +607,8 @@ The configuration options are mostly the same as the ones from the `argv` interf
                "<a href="#--rsyncpriority">priority</a>": 50,
                "<a href="#--rsyncstrategy">strategy</a>": "root",
                "retry": {
-                       "<a href="#--rsyncretrycount">count</a>": 1,
-                       "<a href="#--rsyncretryinterval">interval</a>": 3
+                       "<a href="#--rsyncretrycount">count</a>": 2,
+                       "<a href="#--rsyncretryinterval">interval</a>": 5
                },
                "<a href="#rsyncprogram">program</a>": "rsync",
                "<a href="#rsyncarguments-recursive">arguments-recursive</a>": [
@@ -715,18 +715,20 @@ Whenever a certificate has both RSYNC and RRDP repositories, the following crite
 
 - **Type:** Integer
 - **Availability:** `argv` and JSON
-- **Default:** 1
+- **Default:** 2
 - **Range:** 0--[`UINT_MAX`](http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/limits.h.html)
 
 Maximum number of retries whenever there's an error fetching RRDP files.
 
 A value of **0** means **no retries**.
 
+Whenever is necessary to fetch an RRDP file, the validator will try the download at least once. If there was an error fetching the file, the validator will retry at most `--rrdp.retry.count` times to fetch the file, waiting [`--rrdp.retry.interval`](#--rrdpretryinterval) seconds between each retry.
+
 ### `--rrdp.retry.interval`
 
 - **Type:** Integer
 - **Availability:** `argv` and JSON
-- **Default:** 3
+- **Default:** 5
 - **Range:** 0--[`UINT_MAX`](http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/limits.h.html)
 
 Period of time (in seconds) to wait between each retry to fetch an RRDP file.
@@ -807,18 +809,20 @@ Useful if you want `root`, but the root certificate is separated from the rest o
 
 - **Type:** Integer
 - **Availability:** `argv` and JSON
-- **Default:** 1
+- **Default:** 2
 - **Range:** 0--[`UINT_MAX`](http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/limits.h.html)
 
 Maximum number of retries whenever there's an error executing an RSYNC.
 
 A value of **0** means **no retries**.
 
+Whenever is necessary to execute an RSYNC, the validator will try at least one time the execution. If there was an error executing the RSYNC, the validator will retry it at most `--rrdp.retry.count` times, waiting [`--rsync.retry.interval`](#--rsyncretryinterval) seconds between each retry.
+
 ### `--rsync.retry.interval`
 
 - **Type:** Integer
 - **Availability:** `argv` and JSON
-- **Default:** 3
+- **Default:** 5
 - **Range:** 0--[`UINT_MAX`](http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/limits.h.html)
 
 Period of time (in seconds) to wait between each retry to execute an RSYNC.
index ceaaaf6099722227255c2e29fa94dfbf83434b06..1762773241f81ccb7edf1ac5cca655567de91841 100644 (file)
@@ -33,8 +33,8 @@
     "enabled": true,
     "priority": 50,
     "retry": {
-      "count": 1,
-      "interval": 3
+      "count": 2,
+      "interval": 5
     }
   },
   "rsync": {
@@ -42,8 +42,8 @@
     "priority": 50,
     "strategy": "root",
     "retry": {
-      "count": 1,
-      "interval": 3
+      "count": 2,
+      "interval": 5
     },
     "program": "rsync",
     "arguments-recursive": [
index 1f7f176ec8fd2c9cd63aefdac7cade1ab4ff963c..a60cb6708e308754d745250021d4d0e8a6c267f4 100644 (file)
@@ -594,7 +594,12 @@ Maximum number of retries whenever there's an error fetching RRDP files.
 .P
 A value of \fI0\fR means no retries.
 .P
-By default, the value is \fI1\fR.
+Whenever is necessary to fetch an RRDP file, the validator will try the
+download at least once. If there was an error fetching the file, the validator
+will retry at most \fI--rrdp.retry.count\fR times to fetch the file, waiting
+\fI--rrdp.retry.interval\fR seconds between each retry.
+.P
+By default, the value is \fI2\fR.
 .RE
 .P
 
@@ -603,7 +608,7 @@ By default, the value is \fI1\fR.
 Period (in seconds) to wait between retries after an error ocurred fetching
 RRDP files.
 .P
-By default, the value is \fI3\fR.
+By default, the value is \fI5\fR.
 .RE
 .P
 
@@ -725,7 +730,12 @@ Maximum number of retries whenever there's an error executing RSYNC.
 .P
 A value of \fI0\fR means no retries.
 .P
-By default, the value is \fI1\fR.
+Whenever is necessary to execute an RSYNC, the validator will try the execution
+at least once. If there was an error executing the RSYNC, the validator will
+retry it at most \fI--rrdp.retry.count\fR times, waiting
+\fI--rsync.retry.interval\fR seconds between each retry.
+.P
+By default, the value is \fI2\fR.
 .RE
 .P
 
@@ -733,7 +743,7 @@ By default, the value is \fI1\fR.
 .RS 4
 Period (in seconds) to wait between retries after an RSYNC error ocurred.
 .P
-By default, the value is \fI3\fR.
+By default, the value is \fI5\fR.
 .RE
 .P
 
@@ -860,12 +870,20 @@ to a specific value:
   },
   "rrdp": {
     "enabled": true,
-    "priority": 50
+    "priority": 50,
+    "retry": {
+      "count": 2,
+      "interval": 5
+    }
   },
   "rsync": {
     "enabled": true,
     "priority": 50,
     "strategy": "root",
+    "retry": {
+      "count": 2,
+      "interval": 5
+    },
     "program": "rsync",
     "arguments-recursive": [
       "--recursive",
index 8edc72521bbbd899c63041b7ee5242b187e19f8f..0602a565ea0c864fee8d4d1cc6f48e5dfb2c87b2 100644 (file)
@@ -733,8 +733,8 @@ set_default_values(void)
        rpki_config.rsync.enabled = true;
        rpki_config.rsync.priority = 50;
        rpki_config.rsync.strategy = RSYNC_ROOT;
-       rpki_config.rsync.retry.count = 1;
-       rpki_config.rsync.retry.interval = 3;
+       rpki_config.rsync.retry.count = 2;
+       rpki_config.rsync.retry.interval = 5;
        rpki_config.rsync.program = strdup("rsync");
        if (rpki_config.rsync.program == NULL) {
                error = pr_enomem();
@@ -753,8 +753,8 @@ set_default_values(void)
 
        rpki_config.rrdp.enabled = true;
        rpki_config.rrdp.priority = 50;
-       rpki_config.rrdp.retry.count = 1;
-       rpki_config.rrdp.retry.interval = 3;
+       rpki_config.rrdp.retry.count = 2;
+       rpki_config.rrdp.retry.interval = 5;
 
        rpki_config.http.user_agent = strdup(PACKAGE_NAME "/" PACKAGE_VERSION);
        if (rpki_config.http.user_agent == NULL) {
index 2f9787921fd0c85e654f4f29f048580fd6e9c967..be7f3bddc76a0bb631cb992b7c5df6c28a14effe 100644 (file)
@@ -373,7 +373,8 @@ revert_base:
 int
 vrps_update(bool *changed)
 {
-       time_t start, finish, exec_time;
+       time_t start, finish;
+       long int exec_time;
        serial_t serial;
        int error;