Raise default NBD timeout from 30 to 300 seconds and allow to take it from /etc/vitastor/vitastor.conf
Test / buildenv (push) Successful in 10s Details
Test / build (push) Successful in 2m40s Details
Test / test_cas (push) Successful in 9s Details
Test / make_test (push) Successful in 32s Details
Test / test_change_pg_size (push) Successful in 7s Details
Test / test_change_pg_count (push) Successful in 35s Details
Test / test_create_nomaxid (push) Successful in 7s Details
Test / test_etcd_fail (push) Successful in 41s Details
Test / test_add_osd (push) Failing after 1m25s Details
Test / test_interrupted_rebalance (push) Successful in 1m31s Details
Test / test_interrupted_rebalance_imm (push) Successful in 1m46s Details
Test / test_failure_domain (push) Successful in 8s Details
Test / test_change_pg_count_ec (push) Failing after 3m6s Details
Test / test_interrupted_rebalance_ec_imm (push) Successful in 1m20s Details
Test / test_snapshot (push) Successful in 22s Details
Test / test_minsize_1 (push) Successful in 13s Details
Test / test_move_reappear (push) Successful in 17s Details
Test / test_rm (push) Successful in 12s Details
Test / test_snapshot_chain (push) Successful in 1m0s Details
Test / test_snapshot_down (push) Successful in 20s Details
Test / test_snapshot_ec (push) Failing after 3m6s Details
Test / test_splitbrain (push) Successful in 13s Details
Test / test_snapshot_chain_ec (push) Failing after 3m7s Details
Test / test_snapshot_down_ec (push) Failing after 3m7s Details
Test / test_rebalance_verify (push) Successful in 2m42s Details
Test / test_rebalance_verify_imm (push) Successful in 2m14s Details
Test / test_write (push) Successful in 45s Details
Test / test_rebalance_verify_ec_imm (push) Successful in 2m19s Details
Test / test_write_no_same (push) Successful in 12s Details
Test / test_interrupted_rebalance_ec (push) Failing after 10m40s Details
Test / test_write_xor (push) Failing after 3m5s Details
Test / test_rebalance_verify_ec (push) Failing after 5m22s Details
Test / test_heal_pg_size_2 (push) Failing after 3m48s Details
Test / test_heal_csum_32k_dj (push) Successful in 4m27s Details
Test / test_heal_ec (push) Failing after 10m6s Details
Test / test_heal_csum_32k_dmj (push) Failing after 10m14s Details
Test / test_heal_csum_32k (push) Failing after 10m14s Details
Test / test_scrub (push) Successful in 22s Details
Test / test_scrub_zero_osd_2 (push) Successful in 19s Details
Test / test_heal_csum_4k_dmj (push) Failing after 10m10s Details
Test / test_scrub_pg_size_3 (push) Successful in 30s Details
Test / test_scrub_xor (push) Failing after 3m6s Details
Test / test_scrub_pg_size_6_pg_minsize_4_osd_count_6_ec (push) Failing after 3m5s Details
Test / test_heal_csum_4k_dj (push) Failing after 10m13s Details
Test / test_scrub_ec (push) Failing after 3m5s Details
Test / test_heal_csum_4k (push) Failing after 10m8s Details

kv-update
Vitaliy Filippov 2023-12-02 14:11:02 +03:00
parent 037cf64a47
commit 628aa59574
9 changed files with 35 additions and 21 deletions

View File

@ -28,7 +28,8 @@ It supports the following commands:
Global options:
```
--etcd_address ADDR Etcd connection address
--config_file FILE Path to Vitastor configuration file
--etcd_address URL Etcd connection address
--iodepth N Send N operations in parallel to each OSD when possible (default 32)
--parallel_osds M Work with M osds in parallel when possible (default 4)
--progress 1|0 Report progress (default 1)

View File

@ -27,7 +27,8 @@ vitastor-cli - интерфейс командной строки для адм
Глобальные опции:
```
--etcd_address ADDR Адрес соединения с etcd
--config_file FILE Путь к файлу конфигурации Vitastor
--etcd_address URL Адрес соединения с etcd
--iodepth N Отправлять параллельно N операций на каждый OSD (по умолчанию 32)
--parallel_osds M Работать параллельно с M OSD (по умолчанию 4)
--progress 1|0 Печатать прогресс выполнения (по умолчанию 1)

View File

@ -20,16 +20,16 @@ See also [VDUSE](qemu.en.md#vduse).
To create a local block device for a Vitastor image run:
```
vitastor-nbd map --etcd_address 10.115.0.10:2379/v3 --image testimg
vitastor-nbd map --image testimg
```
It will output a block device name like /dev/nbd0 which you can then use as a normal disk.
You can also use `--pool <POOL> --inode <INODE> --size <SIZE>` instead of `--image <IMAGE>` if you want.
Additional options for map command:
vitastor-nbd supports all usual Vitastor configuration options like `--config_file <path_to_config>` plus NBD-specific:
* `--nbd_timeout 30` \
* `--nbd_timeout 300` \
Timeout for I/O operations in seconds after exceeding which the kernel stops
the device. You can set it to 0 to disable the timeout, but beware that you
won't be able to stop the device at all if vitastor-nbd process dies.
@ -44,6 +44,9 @@ Additional options for map command:
* `--foreground 1` \
Stay in foreground, do not daemonize.
Note that `nbd_timeout`, `nbd_max_devices` and `nbd_max_part` options may also be specified
in `/etc/vitastor/vitastor.conf` or in other configuration file specified with `--config_file`.
## Unmap image
To unmap the device run:

View File

@ -23,7 +23,7 @@ CSI-драйвер Kubernetes Vitastor основан на NBD.
Чтобы создать локальное блочное устройство для образа, выполните команду:
```
vitastor-nbd map --etcd_address 10.115.0.10:2379/v3 --image testimg
vitastor-nbd map --image testimg
```
Команда напечатает название блочного устройства вида /dev/nbd0, которое потом можно
@ -32,7 +32,8 @@ vitastor-nbd map --etcd_address 10.115.0.10:2379/v3 --image testimg
Для обращения по номеру инода, аналогично другим командам, можно использовать опции
`--pool <POOL> --inode <INODE> --size <SIZE>` вместо `--image testimg`.
Дополнительные опции для команды подключения NBD-устройства:
vitastor-nbd поддерживает все обычные опции Vitastor, например, `--config_file <path_to_config>`,
плюс специфичные для NBD:
* `--nbd_timeout 30` \
Максимальное время выполнения любой операции чтения/записи в секундах, при
@ -53,6 +54,10 @@ vitastor-nbd map --etcd_address 10.115.0.10:2379/v3 --image testimg
* `--foreground 1` \
Не уводить процесс в фоновый режим.
Обратите внимание, что опции `nbd_timeout`, `nbd_max_devices` и `nbd_max_part` можно
также задавать в `/etc/vitastor/vitastor.conf` или в другом файле конфигурации,
заданном опцией `--config_file`.
## Отключить устройство
Для отключения устройства выполните:

View File

@ -23,7 +23,7 @@ balancer or any failover method you want to in that case.
vitastor-nfs usage:
```
vitastor-nfs [--etcd_address ADDR] [OTHER OPTIONS]
vitastor-nfs [STANDARD OPTIONS] [OTHER OPTIONS]
--subdir <DIR> export images prefixed <DIR>/ (default empty - export all images)
--portmap 0 do not listen on port 111 (portmap/rpcbind, requires root)

View File

@ -22,7 +22,7 @@
Использование vitastor-nfs:
```
vitastor-nfs [--etcd_address ADDR] [ДРУГИЕ ОПЦИИ]
vitastor-nfs [СТАНДАРТНЫЕ ОПЦИИ] [ДРУГИЕ ОПЦИИ]
--subdir <DIR> экспортировать "поддиректорию" - образы с префиксом имени <DIR>/ (по умолчанию пусто - экспортировать все образы)
--portmap 0 отключить сервис portmap/rpcbind на порту 111 (по умолчанию включён и требует root привилегий)

View File

@ -116,7 +116,8 @@ static const char* help_text =
"Use vitastor-cli --help <command> for command details or vitastor-cli --help --all for all details.\n"
"\n"
"GLOBAL OPTIONS:\n"
" --etcd_address <etcd_address>\n"
" --config_file FILE Path to Vitastor configuration file\n"
" --etcd_address URL Etcd connection address\n"
" --iodepth N Send N operations in parallel to each OSD when possible (default 32)\n"
" --parallel_osds M Work with M osds in parallel when possible (default 4)\n"
" --progress 1|0 Report progress (default 1)\n"

View File

@ -30,7 +30,7 @@ protected:
std::string image_name;
uint64_t inode = 0;
uint64_t device_size = 0;
int nbd_timeout = 30;
int nbd_timeout = 300;
int nbd_max_devices = 64;
int nbd_max_part = 3;
inode_watch_t *watch = NULL;
@ -135,14 +135,16 @@ public:
" %s unmap /dev/nbd0\n"
" %s ls [--json]\n"
"OPTIONS:\n"
" All usual Vitastor config options like --etcd_address <etcd_address> plus NBD-specific:\n"
" --nbd_timeout 30\n"
" All usual Vitastor config options like --config_file <path_to_config> plus NBD-specific:\n"
" --nbd_timeout 300\n"
" Timeout for I/O operations in seconds after exceeding which the kernel stops\n"
" the device. You can set it to 0 to disable the timeout, but beware that you\n"
" won't be able to stop the device at all if vitastor-nbd process dies.\n"
" --nbd_max_devices 64 --nbd_max_part 3\n"
" Options for the \"nbd\" kernel module when modprobing it (nbds_max and max_part).\n"
" note that maximum allowed (nbds_max)*(1+max_part) is 256.\n"
" Note that nbd_timeout, nbd_max_devices and nbd_max_part options may also be specified\n"
" in /etc/vitastor/vitastor.conf or in other configuration file specified with --config_file.\n"
" --logfile /path/to/log/file.txt\n"
" Wite log messages to the specified file instead of dropping them (in background mode)\n"
" or printing them to the standard output (in foreground mode).\n"
@ -204,17 +206,18 @@ public:
exit(1);
}
}
if (cfg["nbd_max_devices"].is_number() || cfg["nbd_max_devices"].is_string())
auto file_config = osd_messenger_t::read_config(cfg);
if (file_config["nbd_max_devices"].is_number() || file_config["nbd_max_devices"].is_string())
{
nbd_max_devices = cfg["nbd_max_devices"].uint64_value();
nbd_max_devices = file_config["nbd_max_devices"].uint64_value();
}
if (cfg["nbd_max_part"].is_number() || cfg["nbd_max_part"].is_string())
if (file_config["nbd_max_part"].is_number() || file_config["nbd_max_part"].is_string())
{
nbd_max_part = cfg["nbd_max_part"].uint64_value();
nbd_max_part = file_config["nbd_max_part"].uint64_value();
}
if (cfg["nbd_timeout"].is_number() || cfg["nbd_timeout"].is_string())
if (file_config["nbd_timeout"].is_number() || file_config["nbd_timeout"].is_string())
{
nbd_timeout = cfg["nbd_timeout"].uint64_value();
nbd_timeout = file_config["nbd_timeout"].uint64_value();
}
if (cfg["client_writeback_allowed"].is_null())
{
@ -272,7 +275,7 @@ public:
int i = 0;
while (true)
{
int r = run_nbd(sockfd, i, device_size, NBD_FLAG_SEND_FLUSH, 30, bg);
int r = run_nbd(sockfd, i, device_size, NBD_FLAG_SEND_FLUSH, nbd_timeout, bg);
if (r == 0)
{
printf("/dev/nbd%d\n", i);

View File

@ -56,7 +56,7 @@ json11::Json::object nfs_proxy_t::parse_args(int narg, const char *args[])
"(c) Vitaliy Filippov, 2021-2022 (VNPL-1.1)\n"
"\n"
"USAGE:\n"
" %s [--etcd_address ADDR] [OTHER OPTIONS]\n"
" %s [STANDARD OPTIONS] [OTHER OPTIONS]\n"
" --subdir <DIR> export images prefixed <DIR>/ (default empty - export all images)\n"
" --portmap 0 do not listen on port 111 (portmap/rpcbind, requires root)\n"
" --bind <IP> bind service to <IP> address (default 0.0.0.0)\n"