Commit Graph
100 Commits
Author SHA1 Message Date
Vitaliy Filippov 039c524f0a Implement handshake for AES-256-GCM by capturing TLS secrets (pretty shitty approach actually...) 2026-04-26 11:26:34 +03:00
Vitaliy Filippov 4383135434 Extract openssl-related code, wire ssl implementation back 2026-04-26 11:25:38 +03:00
Vitaliy Filippov 767a61e47c Coalesce entries in send_out_buf 2026-04-22 01:41:29 +03:00
Vitaliy Filippov 5d42881736 Support isa-l_crypto for AES-XTS too 2026-04-22 01:41:29 +03:00
Vitaliy Filippov 9d2f6046c6 Fix xts+rdma encrypt errors 2026-04-22 01:41:29 +03:00
Vitaliy Filippov bed4dc11b5 Fix "use-after-realloc" warning 2026-04-22 01:41:29 +03:00
Vitaliy Filippov 4fb7687561 Support isa-l_crypto for AES-GCM 2026-04-22 01:41:29 +03:00
Vitaliy Filippov 1f64e94f2e Remove WITH_OPENSSL from all files except http_client, always require OpenSSL 2026-04-22 01:41:29 +03:00
Vitaliy Filippov 2435209071 Use pools for GCM contexts 2026-04-22 01:41:29 +03:00
Vitaliy Filippov 0eba3e5862 Try to run tests with AES-GCM 2026-04-22 01:41:29 +03:00
Vitaliy Filippov 1ffea58519 Implement direct AES-256-GCM with a static key for benchmark 2026-04-22 01:41:29 +03:00
Vitaliy Filippov cb9ccb8a54 Make sure to send all TLS data before continuing 2026-04-22 01:41:29 +03:00
Vitaliy Filippov 184920102c Parse standard TLS record headers 2026-04-22 01:41:29 +03:00
Vitaliy Filippov d6f1a28096 Omit msgr_tls_record_hdr_t for non-tls data 2026-04-22 01:41:29 +03:00
Vitaliy Filippov cb392ffdfd Allow 2 and 4 byte per block chain_info (allow more than 255 snapshots with encryption) 2026-04-22 01:41:29 +03:00
Vitaliy Filippov a21e4f9503 Implement OSD TLS support 2026-04-22 01:41:29 +03:00
Vitaliy Filippov a9c12d9858 Allow to skip checksums for headers 2026-04-22 01:41:29 +03:00
Vitaliy Filippov 6d40fd86e2 Implement protocol-level checksums (xxhash3) 2026-04-22 01:41:29 +03:00
Vitaliy Filippov a4f47cc67a Include xxhash3 x86dispatch 2026-04-22 01:41:29 +03:00
Vitaliy Filippov 32ab12a880 Do not use scrap_buffer in the client (it would block protocol checksum support) 2026-04-22 01:41:29 +03:00
Vitaliy Filippov 7a40c7f2f6 Support TLS CN authentication and per-image permissions in vitastor-cli serve 2026-04-22 01:41:29 +03:00
Vitaliy Filippov 0f001b0e76 Add VitastorAuthFilter 2026-04-22 01:41:29 +03:00
Vitaliy Filippov 3551525f5e Implement vitastor-cli ls-user, modify-user, remove-user commands 2026-04-22 01:41:29 +03:00
Vitaliy Filippov 6cc899db84 Add image owner/owner_group/reader_group support (for antietcd VitastorAuthFilter) 2026-04-22 01:41:29 +03:00
Vitaliy Filippov 64380856c2 Add security parameter documentation 2026-04-22 01:41:29 +03:00
Vitaliy Filippov 2d9167dd57 Support inline (string PEM) certificates and pkeys 2026-04-22 01:41:29 +03:00
Vitaliy Filippov 04f624f2be Show encryption keys (only IDs) in the listing 2026-04-22 01:41:29 +03:00
Vitaliy Filippov 8b6d978390 Support storing image encryption keys in Vault 2026-04-22 01:41:29 +03:00
Vitaliy Filippov 08401808e8 Prefer local etcd addresses and correctly cycle over them even when they need resolving
Seems slightly overcomplicated...
2026-04-22 01:41:29 +03:00
Vitaliy Filippov 800744b5c3 Support DNS resolving via libc-ares 2026-04-22 01:41:29 +03:00
Vitaliy Filippov a1ac51da24 Batch handle_immediate_ops more 2026-04-22 01:41:29 +03:00
Vitaliy Filippov 64dd98a4d6 Add vitastor-cli create & modify --enc-key parameter 2026-04-22 01:41:29 +03:00
Vitaliy Filippov 3ccfa25b47 Support reading from snapshots encrypted with different keys 2026-04-22 01:41:29 +03:00
Vitaliy Filippov 798ae7c393 Support decryption with multiple keys 2026-04-22 01:41:29 +03:00
Vitaliy Filippov c88bf12484 Allow to return chain_info in response to reads 2026-04-22 01:41:29 +03:00
Vitaliy Filippov e64d8c8c61 Add basic AES-XTS client-side encryption support 2026-04-22 01:41:28 +03:00
Vitaliy Filippov ced3cc3de9 Rework msgr send/receive to allow encryption support 2026-04-22 01:41:10 +03:00
Vitaliy Filippov 43c00538b3 Move fromhexstr() to str_util 2026-04-22 01:41:10 +03:00
Vitaliy Filippov 4cb718de44 Add openapi description 2026-04-22 01:41:10 +03:00
Vitaliy Filippov 45da16995e Slightly fix API return and input types 2026-04-22 01:41:10 +03:00
Vitaliy Filippov 54feea5234 Implement vitastor-cli serve command to serve simple HTTP API 2026-04-22 01:41:10 +03:00
Vitaliy Filippov 157191b770 Implement HTTP server support O_o 2026-04-22 01:41:10 +03:00
Vitaliy Filippov c971a32226 Rename http_response_t to http_message_t 2026-04-22 01:41:10 +03:00
Vitaliy Filippov 14dabf4de5 Extract common HTTP context 2026-04-22 01:41:10 +03:00
Vitaliy Filippov 5776837c58 Support xxhash 32-bit checksums (data_csum_type=xxh3_32) 2026-04-22 01:41:10 +03:00
Vitaliy Filippov e21a10940f Detect block checksums using csum_block_size, not data_csum_type 2026-04-22 01:41:10 +03:00
Vitaliy Filippov ef3c9a0eb4 Add client certificate support 2026-04-22 01:41:10 +03:00
Vitaliy Filippov 55e86dbb29 Do not re-initialize TLS context every connection 2026-04-22 01:41:10 +03:00
Vitaliy Filippov cd46bee266 Add https support to antietcd 2026-04-22 01:41:10 +03:00
Vitaliy Filippov a1130598c0 Implement etcd SSL support via OpenSSL
Maybe I should remove all of this and use libwebsockets :)
2026-04-22 01:41:10 +03:00
Vitaliy Filippov 008ed5b269 Rollback 25ecca7625 - there was no actual use-after-free :) 2026-04-22 01:35:38 +03:00
Vitaliy Filippov 4fffe0f032 Fix vitastor-nfs trace option 2026-04-20 21:51:47 +03:00
Vitaliy Filippov a76d5ccc0d Wakeup callers in rm-data 2026-04-17 13:53:32 +03:00
Vitaliy Filippov 8ed1e180e0 Clear inode_stats in mon 2026-04-14 02:44:46 +03:00
Vitaliy Filippov 8832fc3b14 Fix print to stdout in client 2026-04-14 02:43:50 +03:00
Vitaliy Filippov 0134934c99 Do not skip garbage entries on start (rollback change from 3.0.4) 2026-04-11 12:05:02 +03:00
Vitaliy Filippov 2e36f292bd Fix buffer alignment during metadata clearing on init 2026-04-10 21:56:12 +03:00
Vitaliy Filippov bcc6419760 Auto-select the only RDMA device/port if there is only one 2026-04-08 15:46:10 +03:00
Vitaliy Filippov dd5941b9a4 Release 3.0.9
- Fix broken garbage collection in the new store leading to very high memory usage
- Make the new store do full garbage collection on OSD startup by default (can be turned off with a new gc_on_start parameter)
- Make startup logging with the new store more informative, allow to log amount of garbage with log_level > 1
- Fix clients reading from snapshots incorrectly on retries (for example when OSDs were restarted during read)
- Fix a possible "send-after-free" in OSD which could probably also affect snapshot reads
- Fix OSD crashing when handling a read_bitmap operation from a deleted object with the new store
2026-04-04 18:38:40 +03:00
Vitaliy Filippov 4005b88865 Do not use node_type 2026-04-04 17:37:47 +03:00
Vitaliy Filippov 280b5cd675 Add gc_on_start docs 2026-04-04 17:19:32 +03:00
Vitaliy Filippov e5c505eaf4 Write 1 entry to blocks to collect garbage 2026-04-03 18:08:12 +00:00
Vitaliy Filippov c1d244d4f0 Fix init metadata entry loading logging 2026-04-03 18:08:12 +00:00
Vitaliy Filippov 9b264a212f Do full metadata GC on start (new store) 2026-04-03 18:08:12 +00:00
Vitaliy Filippov ff7f5cb4f4 Report live & garbage entry count / memory with log_level > 1 2026-04-02 23:45:13 +00:00
Vitaliy Filippov 25ecca7625 Fix use-after-free in OSD ops (ooops) 2026-04-02 13:48:17 +00:00
Vitaliy Filippov 99c4244004 Try to write into blocks with more garbage first 2026-04-02 13:48:17 +00:00
Vitaliy Filippov 9949b9fb4e Fix incorrect reads from snapshots on retries 2026-03-31 02:06:53 +03:00
Vitaliy Filippov e6881ad1d5 Fix read_bitmap from deleted objects with the new store 2026-03-31 01:59:53 +03:00
Vitaliy Filippov b30635b932 Release 3.0.8
- Surrogate increment-only peer IDs are now used instead of file descriptor numbers,
  and client cleanup sequence is reworked in another attempt to fix a possible PG hang
  in 'peering' states. The history of this bug is still unclear and it still hasn't been
  reproduced in tests, but several users have reported it since 3.0.4 (only with enabled RDMA).
- Fix a minor bug where an OSD could skip reporting misplaced PG state when moving
  an object in non-immediate_commit mode.
- Add Ubuntu 26.04 (Resolute Raccoon) support and patches for qemu 10.2 and libvirt 12.0
2026-03-30 02:09:02 +03:00
Vitaliy Filippov 0c1154833c Add Ubuntu 26.04 support 2026-03-30 02:06:10 +03:00
Vitaliy Filippov c227bb05b6 Fix incorrect patch contents for qemu 10.1, add patch for qemu 10.2 2026-03-30 02:06:10 +03:00
Vitaliy Filippov dd85315f22 Update CMake supported versions 2026-03-30 02:06:10 +03:00
Vitaliy Filippov 47d2f4e0be Add patch for libvirt 12.0 2026-03-30 02:06:10 +03:00
Vitaliy Filippov 2a5028d17f Use robin_hood_map in messenger 2026-03-30 02:06:10 +03:00
Vitaliy Filippov 07915c2881 Use surrogate peer IDs instead of FDs 2026-03-30 02:06:10 +03:00
Vitaliy Filippov 79141eb383 Fix commented out //this->pg_state_dirty.insert 2026-03-28 20:08:52 +03:00
Vitaliy Filippov f7cbb6ed56 Remove FD from the event loop in destroy_client, not in stop_client 2026-03-28 14:18:20 +03:00
Vitaliy Filippov 8f8172db99 clear_immediate_ops is now done by stop_client 2026-03-26 01:08:23 +03:00
Vitaliy Filippov 94be147e80 Clear received_ops - they are already freed 2026-03-26 01:08:02 +03:00
Vitaliy Filippov 538620b400 Release 3.0.6
- Fix one more bug in old store checksums O_o - checksum verification wasn't
  working correctly on reads quickly after small initial offsetted writes
  (when a BIG_WRITE was read from the journal).
- Fix clients possibly not destroyed after being switched to RDMA. Not 100%
  verified, but in theory it could rarely lead to PGs hanging in peering/stopping
  states with RDMA enabled.
- Use vitastor-cli in the Cinder driver for modifications instead of direct etcd
  interaction.
- Fix mon_https_ca parsing.
- Fix Docker install.sh, add instructions for Podman.
2026-03-22 22:49:51 +03:00
Vitaliy Filippov 4c34a47179 Fix str_replace 2026-03-19 01:19:29 +03:00
Vitaliy Filippov df16ab627a Fix another bug in old store checksums O_o
Checksum verification wasn't working correctly on reads of small initial offsetted writes
from the journal (until the write was flushed to "clean" metadata).
2026-03-17 22:26:38 +00:00
Vitaliy Filippov 44c895dc30 Fix clients possibly not destroyed after being switched to RDMA
It could in theory lead to hung operations on RDMA client disconnections.

Workflow (probable):
* OSD switches an outbound connection to PEER_RDMA and removes the FD from epoll
* But a receive request in io_uring is still active
* Receive response is never handled, refs remains > 0
* The connection is dropped, but osd_client_t is not destroyed because refs > 0
* Outbound ops are not canceled, suboperations hang, primary operations hang too
2026-03-17 01:04:17 +03:00
Vitaliy Filippov fdea595913 Use vitastor-cli in the Cinder driver for modifications instead of direct etcd interaction 2026-03-15 01:44:30 +03:00
Vitaliy Filippov ef4c91ecc8 Fix mon_https_ca parsing 2026-03-15 01:01:41 +03:00
Vitaliy Filippov 5192c6cf50 Fix Docker install.sh, add instructions for Podman 2026-03-13 20:08:18 +03:00
Vitaliy Filippov cb639a130d Release 3.0.5
A single urgent fix for the new store: metadata was written incorrectly when
filled metadata area exceeded 4 GB due to a simple & stupid 32-bit integer overflow.
This was leading to OSDs corrupting metadata and being unable to start on the next
run.

The bug affected only the new store (meta_format=3) and OSDs with metadata area size
larger than 4 GB. You can check your OSD metadata area size by checking `data_offset`
in `vitastor-disk read-sb /dev/vitastor/osdXX-data` for single-disk OSDs or
`blockdev --getsize64 /dev/vitastor/osdXX-meta` for hybrid OSDs.

If you're affected, it's highly recommended to:
- Install updated packages without restarting OSDs
- Restart OSDs **one by one**
- If a restart of an OSD triggers "has_degraded" rebalance - wait for it to finish
  before restarting another OSD
- If an OSD fails to start with "double-claimed" errors in the log - purge and recreate it,
  and again wait for "has_degraded" rebalance to finish before proceeding to the next OSD
2026-03-07 13:54:44 +03:00
Vitaliy Filippov 892e3a8b6d Add Ubuntu 26.04 build 2026-03-07 13:54:44 +03:00
Vitaliy Filippov 0bd9c26620 Make block_sizes uint64_t to prevent other integer overflow errors in the future 2026-03-07 12:02:57 +03:00
Vitaliy Filippov ae2b1f7802 Some useless code changes for beauty 2026-03-07 00:15:16 +03:00
Vitaliy Filippov 883b2e45da Fix uint32 overflow in the new store :-X 2026-03-06 17:21:22 +03:00
Vitaliy Filippov 09df74cfac Release 3.0.4
New store bug fixes:

- Fix very slow OSD startup (hours) possible in unlucky cases
- Fix incorrect garbage entry validation on start in some cases, preventing OSD startup
- Fix small_write_throttling not functioning and either hanging or crashing OSDs
- Fix "different fact_versions returned from subops" error possible with EC in some cases
- Add a recovery option for the new store: skip_corrupted_meta_entries
- Disable intent writes (even 4k) for hybrid OSDs by default for better write buffering

Other changes:

- Fix chmod/chown of a new empty VitastorFS root directory not working
- Fix vitastor-dd treating all < 32k reads as always empty
- Fix vitastor-disk always setting 32k csum_block_size for HDDs when checksums are enabled
- Fix OSD missing PG state updates and PGs hanging in "starting" in rare cases
- Fix a possible OSD crash with "map::at" message in rare cases when stopping a client
- Fix a possible OSD crash on start when RDMA is available but fails to initialize
- Fix removal and overwriting of totaled objects (objects with all corrupted copies)
- Do not allow data_block_size < 8*bitmap_granularity
- Remove RDMA ODP (On-Demand Paging) support
- Update antietcd to 1.2.4
- Update Docker build to Debian Trixie
- Add packages for AlmaLinux 10
2026-03-03 20:12:31 +03:00
Vitaliy Filippov 2ef3f012c9 Fix Docker builds 2026-03-03 20:09:23 +03:00
Vitaliy Filippov 7175d99c64 Add packages for Alma 10 to docs 2026-03-03 11:17:20 +03:00
Vitaliy Filippov 230a26772e Do not allow data_block_size < 8*bitmap_granularity 2026-03-03 02:09:16 +03:00
Vitaliy Filippov 637684c579 Fix chmod/chown of empty NFS root directory 2026-03-03 02:05:37 +03:00
Vitaliy Filippov c541dd422f Add skip_corrupted_meta_entries docs 2026-03-03 01:52:22 +03:00
Vitaliy Filippov 22c39561cf Add a recovery option for the new store: skip_corrupted_meta_entries 2026-03-02 02:51:09 +03:00
Vitaliy Filippov d4c67b4879 Ignore array-bounds warning in bs_heap 2026-03-02 02:49:56 +03:00