Describe BGP commit boundaries and diagnose initialization failures
This commit is contained in:
1 parent
7ebfddfc4b
commit
f541ab428b
2 files changed
+16
-3
No files matched your search
@@ -78,6 +78,12 @@ Timestamp 0 обозначает bootstrap-сведения без подпис
|
||||
|
||||
После принятия BGP-записи `node_conn_direct_update_node` применяет адреса к
|
||||
существующему NCD-соединению. Отсутствующее соединение этот вызов не создаёт.
|
||||
Путь подготавливается до изменения общего реестра и групповых подсетей: отказ
|
||||
памяти сохраняет прежнюю запись, ссылки и пути. После commit IPv4-таблица
|
||||
перестраивается для этого узла, включая удаление старых подсетей при пустом
|
||||
новом наборе. Конфликт подсетей или OOM установки маршрутов логируется,
|
||||
новый набор не устанавливается, прежние маршруты удаляются; ошибка запрещает
|
||||
READY сессии. Принятая подписанная запись и пути при этом могут сохраниться.
|
||||
Линки дополняются как при UP, так и до установления соединения; повторная
|
||||
доставка не создаёт дубликаты UDP/TCP. Работающие линки не закрываются только
|
||||
из-за смены списка адресов. NCD удерживает ссылку на общую запись, пока
|
||||
|
||||
@@ -730,10 +730,14 @@ struct TOPO_GROUPS* topo_groups_init(struct UTUN_INSTANCE* instance) {
|
||||
rc = sqlite3_exec(instance->topo_sqlite_db, "PRAGMA journal_mode=WAL; PRAGMA foreign_keys=ON;"
|
||||
" PRAGMA synchronous=NORMAL; PRAGMA wal_autocheckpoint=10000; PRAGMA cache_size=-32768;"
|
||||
" PRAGMA mmap_size=134217728; PRAGMA temp_store=MEMORY", NULL, NULL, NULL);
|
||||
if (rc != SQLITE_OK || topo_node_sqlite_init(instance->topo_sqlite_db) < 0) {
|
||||
DEBUG_ERROR(DEBUG_CATEGORY_BGP, "cannot initialize SQLite %s: rc=%d %s",
|
||||
if (rc != SQLITE_OK) {
|
||||
DEBUG_ERROR(DEBUG_CATEGORY_BGP, "cannot configure SQLite %s: rc=%d %s",
|
||||
db_file, rc, sqlite3_errmsg(instance->topo_sqlite_db)); goto fail;
|
||||
}
|
||||
if (topo_node_sqlite_init(instance->topo_sqlite_db) < 0) {
|
||||
DEBUG_ERROR(DEBUG_CATEGORY_BGP, "cannot initialize topology schema in %s: %s",
|
||||
db_file, sqlite3_errmsg(instance->topo_sqlite_db)); goto fail;
|
||||
}
|
||||
DEBUG_INFO(DEBUG_CATEGORY_GENERAL, "SQLite opened: %s rc=%d db=%p", db_file, rc, (void*)instance->topo_sqlite_db);
|
||||
} else {
|
||||
DEBUG_ERROR(DEBUG_CATEGORY_BGP, "sqlite3_open(%s) failed: %s",
|
||||
@@ -1030,7 +1034,10 @@ void topo_group_remove_conn(struct TOPO_GROUP* group, struct ETCP_CONN* conn, en
|
||||
bool found_in_list = false;
|
||||
struct ll_entry* e = group->senders_list->head;
|
||||
while (e) { struct TOPO_GROUP_CONN_ITEM* item = (struct TOPO_GROUP_CONN_ITEM*)e->data; if (item->conn == conn) { found_in_list = true; break; } e = e->next; }
|
||||
if (!found_in_list) { DEBUG_WARN(DEBUG_CATEGORY_BGP, "topo_group_remove_conn: conn=%p peer=%016llx state=%d NOT in senders_list (already removed?), skip grp=%016llx ch=%s", (void*)conn, (unsigned long long)conn->peer_node_id, conn->state, (unsigned long long)group->group_id, group->channel_id); return; }
|
||||
if (!found_in_list) {
|
||||
DEBUG_DEBUG(DEBUG_CATEGORY_BGP, "ignore transport removal outside group: peer=%016llx group=%016llx reason=%s",
|
||||
(unsigned long long)conn->peer_node_id, (unsigned long long)group->group_id, reason_text); return;
|
||||
}
|
||||
|
||||
DEBUG_INFO(DEBUG_CATEGORY_BGP, "BGP peer session lost; removing its routes: peer=%016llx group=%016llx channel=%s "
|
||||
"reason=%s links_up=%u close_requested=%u reinit_pending=%u",
|
||||
|
||||
Reference in new issue
Block a user