Files
zeekayandHanzo Dev af0f387bbe Remove weed and SeaweedFS naming from the tree
The binary is s3 and the product is Hanzo S3; the rest of the tree now
says so too.

- Environment: WEED_* and SEAWEEDFS_* are S3_*, no aliases. fla9's flag
  prefix is S3, matching viper's existing "s3" prefix, so the S3_S3_SSE_*
  names mini.go exports are the ones viper reads (WEED_S3_SSE_KEK was never
  seen once viper moved to "s3").
- Java and Hadoop: packages, fs.hanzofs.* keys and the hanzofs:// scheme
  under the hanzofs namespace the protos already declare; classes take a
  neutral Filer prefix and file names match them again (the earlier pass left
  Seas3*.java holding Seaweed* classes). Client, hdfs3, examples, s3copier,
  random_access and the Spark tests compile.
- Helm chart: helpers are hanzo.*, values live under global.s3; the chart
  renders and lints, which it did not before.
- Terraform: the s3.service.tftpl reference matches the file; 12/12 render
  tests pass. Config paths point at /etc/hanzo, which the binary reads.
- loadtest.pb.go regenerated from loadtest.proto.
- Upstream logo, sponsor images and unreferenced diagrams removed from note/.

Kept: NOTICE attribution, LICENSE, the erasure-coding fixture
s3/storage/erasure_coding/1.dat (test bytes), and unmaintained/ and
third_party/ (vendored). No on-disk format, wire protocol or metadata key
changed.

Co-authored-by: Hanzo Dev <[email protected]>
2026-10-02 08:06:48 -07:00

8.4 KiB

๐Ÿณ Docker Integration Testing Guide

This guide provides comprehensive Docker-based integration testing for the Hanzo RDMA sidecar system.

๐Ÿ—๏ธ Architecture

The Docker Compose setup includes:

โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”    โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”    โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚   Hanzo Master  โ”‚    โ”‚  Hanzo Volume   โ”‚    โ”‚    Rust RDMA       โ”‚
โ”‚     :9333          โ”‚โ—„โ”€โ”€โ–บโ”‚     :8080          โ”‚    โ”‚    Engine           โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜    โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜    โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
                                    โ”‚                           โ”‚
                                    โ–ผ                           โ–ผ
โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”    โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”    โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚   Go RDMA Sidecar  โ”‚โ—„โ”€โ”€โ–บโ”‚    Unix Socket      โ”‚โ—„โ”€โ”€โ–บโ”‚   Integration       โ”‚
โ”‚     :8081          โ”‚    โ”‚   /tmp/rdma.sock    โ”‚    โ”‚   Test Suite        โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜    โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜    โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

๐Ÿš€ Quick Start

1. Start All Services

# Using the helper script (recommended)
./tests/docker-test-helper.sh start

# Or using docker-compose directly
docker-compose up -d

2. Run Integration Tests

# Run the complete test suite
./tests/docker-test-helper.sh test

# Or run tests manually
docker-compose run --rm integration-tests

3. Interactive Testing

# Open a shell in the test container
./tests/docker-test-helper.sh shell

# Inside the container, you can run:
./test-rdma ping
./test-rdma capabilities  
./test-rdma read --volume 1 --needle 12345 --size 1024
curl http://rdma-sidecar:8081/health
curl http://rdma-sidecar:8081/stats

๐Ÿ“‹ Test Helper Commands

The docker-test-helper.sh script provides convenient commands:

# Service Management
./tests/docker-test-helper.sh start      # Start all services
./tests/docker-test-helper.sh stop       # Stop all services  
./tests/docker-test-helper.sh clean      # Stop and clean volumes

# Testing
./tests/docker-test-helper.sh test       # Run integration tests
./tests/docker-test-helper.sh shell      # Interactive testing shell

# Monitoring
./tests/docker-test-helper.sh status     # Check service health
./tests/docker-test-helper.sh logs       # Show all logs
./tests/docker-test-helper.sh logs rdma-engine  # Show specific service logs

๐Ÿงช Test Coverage

The integration test suite covers:

โœ… Core Components

  • Hanzo Master: Cluster leadership and status
  • Hanzo Volume Server: Volume operations and health
  • Rust RDMA Engine: Socket communication and operations
  • Go RDMA Sidecar: HTTP API and RDMA integration

โœ… Integration Points

  • IPC Communication: Unix socket + MessagePack protocol
  • RDMA Operations: Ping, capabilities, read operations
  • HTTP API: All sidecar endpoints and error handling
  • Fallback Logic: RDMA โ†’ HTTP fallback behavior

โœ… Performance Testing

  • Direct RDMA Benchmarks: Engine-level performance
  • Sidecar Benchmarks: End-to-end performance
  • Latency Measurements: Operation timing validation
  • Throughput Testing: Operations per second

๐Ÿ”ง Service Details

Hanzo Master

  • Port: 9333
  • Health Check: /cluster/status
  • Data: Persistent volume master-data

Hanzo Volume Server

  • Port: 8080
  • Health Check: /status
  • Data: Persistent volume volume-data
  • Depends on: Hanzo Master

Rust RDMA Engine

  • Socket: /tmp/rdma-engine.sock
  • Mode: Mock RDMA (development)
  • Health Check: Socket existence
  • Privileged: Yes (for RDMA access)

Go RDMA Sidecar

  • Port: 8081
  • Health Check: /health
  • API Endpoints: /stats, /read, /benchmark
  • Depends on: RDMA Engine, Volume Server

Test Client

  • Purpose: Integration testing and interactive debugging
  • Tools: curl, jq, test-rdma binary
  • Environment: All service URLs configured

๐Ÿ“Š Expected Test Results

โœ… Successful Output Example

===============================================
๐Ÿš€ HANZO S3 RDMA INTEGRATION TEST SUITE  
===============================================

๐Ÿ”ต Waiting for Hanzo Master to be ready...
โœ… Hanzo Master is ready
โœ… Hanzo Master is leader and ready

๐Ÿ”ต Waiting for Hanzo Volume Server to be ready...
โœ… Hanzo Volume Server is ready
Volume Server Version: 3.60

๐Ÿ”ต Checking RDMA engine socket...
โœ… RDMA engine socket exists
๐Ÿ”ต Testing RDMA engine ping...
โœ… RDMA engine ping successful

๐Ÿ”ต Waiting for RDMA Sidecar to be ready...
โœ… RDMA Sidecar is ready
โœ… RDMA Sidecar is healthy
RDMA Status: true

๐Ÿ”ต Testing needle read via sidecar...
โœ… Sidecar needle read successful
โš ๏ธ  HTTP fallback used. Duration: 2.48ms

๐Ÿ”ต Running sidecar performance benchmark...
โœ… Sidecar benchmark completed
Benchmark Results:
  RDMA Operations: 5
  HTTP Operations: 0  
  Average Latency: 2.479ms
  Operations/sec: 403.2

===============================================
๐ŸŽ‰ ALL INTEGRATION TESTS COMPLETED!
===============================================

๐Ÿ› Troubleshooting

Service Not Starting

# Check service logs
./tests/docker-test-helper.sh logs [service-name]

# Check container status
docker-compose ps

# Restart specific service
docker-compose restart [service-name]

RDMA Engine Issues

# Check socket permissions
docker-compose exec rdma-engine ls -la /tmp/rdma/rdma-engine.sock

# Check RDMA engine logs
./tests/docker-test-helper.sh logs rdma-engine

# Test socket directly
docker-compose exec test-client ./test-rdma ping

Sidecar Connection Issues

# Test sidecar health directly
curl http://localhost:8081/health

# Check sidecar logs
./tests/docker-test-helper.sh logs rdma-sidecar

# Verify environment variables
docker-compose exec rdma-sidecar env | grep RDMA

Volume Server Issues

# Check Hanzo status
curl http://localhost:9333/cluster/status
curl http://localhost:8080/status

# Check volume server logs  
./tests/docker-test-helper.sh logs hanzo-volume

๐Ÿ” Manual Testing Examples

Test RDMA Engine Directly

# Enter test container
./tests/docker-test-helper.sh shell

# Test RDMA operations
./test-rdma ping --socket /tmp/rdma-engine.sock
./test-rdma capabilities --socket /tmp/rdma-engine.sock
./test-rdma read --socket /tmp/rdma-engine.sock --volume 1 --needle 12345
./test-rdma bench --socket /tmp/rdma-engine.sock --iterations 10

Test Sidecar HTTP API

# Health and status
curl http://rdma-sidecar:8081/health | jq '.'
curl http://rdma-sidecar:8081/stats | jq '.'

# Needle operations
curl "http://rdma-sidecar:8081/read?volume=1&needle=12345&size=1024" | jq '.'

# Benchmarking
curl "http://rdma-sidecar:8081/benchmark?iterations=5&size=2048" | jq '.benchmark_results'

Test Hanzo Integration

# Check cluster status
curl http://hanzo-master:9333/cluster/status | jq '.'

# Check volume status  
curl http://hanzo-volume:8080/status | jq '.'

# List volumes
curl http://hanzo-master:9333/vol/status | jq '.'

๐Ÿš€ Production Deployment

This Docker setup can be adapted for production by:

  1. Replacing Mock RDMA: Switch to real-ucx feature in Rust
  2. RDMA Hardware: Add RDMA device mappings and capabilities
  3. Security: Remove privileged mode, add proper user/group mapping
  4. Scaling: Use Docker Swarm or Kubernetes for orchestration
  5. Monitoring: Add Prometheus metrics and Grafana dashboards
  6. Persistence: Configure proper volume management

๐Ÿ“š Additional Resources


๐Ÿณ Happy Docker Testing!

For issues or questions, please check the logs first and refer to the troubleshooting section above.