20260608 默认rsync scope切到module-root
This commit is contained in:
parent
8e6e2f1318
commit
d0224d53f6
@ -26,10 +26,10 @@ OUTPUT_COMPACT_REPORT=1
|
||||
ALLOW_RSYNC_MIRROR_REUSE=1
|
||||
|
||||
# rsync 同步/去重 scope。
|
||||
# module-root 表示扩大实际拉取到 rsync module 根目录,并在同一 module 下复用成功拉取结果;
|
||||
# host 表示按 rsync host 做失败短路,但实际拉取仍限定当前发布点,避免同一不可达 host 重复等待超时;
|
||||
# publication-point 表示只按当前发布点去重;
|
||||
# module-root 表示扩大实际拉取到 rsync module 根目录。
|
||||
RSYNC_SCOPE=host
|
||||
# publication-point 表示只按当前发布点去重。
|
||||
RSYNC_SCOPE=module-root
|
||||
|
||||
# 前一轮失败或不完整时,是否隔离旧数据库和运行态目录后强制下一轮 snapshot。
|
||||
# 建议保持 1;设置为 0 时,检测到前一轮失败会直接停止。
|
||||
|
||||
@ -17,7 +17,7 @@ RUN_ROOT="${RUN_ROOT:-$PACKAGE_ROOT}"
|
||||
RETAIN_RUNS="${RETAIN_RUNS:-10}"
|
||||
OUTPUT_COMPACT_REPORT="${OUTPUT_COMPACT_REPORT:-1}"
|
||||
ALLOW_RSYNC_MIRROR_REUSE="${ALLOW_RSYNC_MIRROR_REUSE:-1}"
|
||||
RSYNC_SCOPE="${RSYNC_SCOPE:-host}"
|
||||
RSYNC_SCOPE="${RSYNC_SCOPE:-module-root}"
|
||||
FAILURE_SNAPSHOT_RESET="${FAILURE_SNAPSHOT_RESET:-1}"
|
||||
DB_STATS_EXACT_EVERY="${DB_STATS_EXACT_EVERY:-3}"
|
||||
RPKI_PROGRESS_LOG="${RPKI_PROGRESS_LOG:-1}"
|
||||
|
||||
@ -233,7 +233,7 @@ Options:
|
||||
--http-timeout-secs <n> HTTP fetch timeout seconds (default: 20)
|
||||
--rsync-timeout-secs <n> rsync I/O timeout seconds (default: 60)
|
||||
--rsync-mirror-root <path> Persist rsync mirrors under this directory (default: disabled)
|
||||
--rsync-scope <policy> rsync scope policy: host, publication-point, or module-root (default: host)
|
||||
--rsync-scope <policy> rsync scope policy: host, publication-point, or module-root (default: module-root)
|
||||
--max-depth <n> Max CA instance depth (0 = root only)
|
||||
--max-instances <n> Max number of CA instances to process
|
||||
--validation-time <rfc3339> Validation time in RFC3339 (default: now UTC)
|
||||
|
||||
@ -22,7 +22,7 @@ pub enum RsyncScopePolicy {
|
||||
|
||||
impl Default for RsyncScopePolicy {
|
||||
fn default() -> Self {
|
||||
Self::Host
|
||||
Self::ModuleRoot
|
||||
}
|
||||
}
|
||||
|
||||
@ -563,15 +563,15 @@ mod tests {
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn system_rsync_dedup_key_uses_host_scope_by_default() {
|
||||
fn system_rsync_dedup_key_uses_module_root_by_default() {
|
||||
let fetcher = SystemRsyncFetcher::new(SystemRsyncConfig::default());
|
||||
assert_eq!(
|
||||
fetcher.dedup_key("rsync://example.net/repo/ta/ca/publication-point/"),
|
||||
"rsync://example.net/repo/ta/ca/publication-point/"
|
||||
"rsync://example.net/repo/"
|
||||
);
|
||||
assert_eq!(
|
||||
fetcher.failure_dedup_key("rsync://example.net/repo/ta/ca/publication-point/"),
|
||||
Some("rsync://example.net/".to_string())
|
||||
None
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user