Skip to content

Commit

Permalink
test(manual): upgrade responder collects volume backend store driver
Browse files Browse the repository at this point in the history
ref: 6033

Signed-off-by: Chin-Ya Huang <[email protected]>
  • Loading branch information
c3y1huang committed Dec 22, 2023
1 parent 8b965d0 commit a476c61
Showing 1 changed file with 44 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,17 @@ longhorn_disk_block_count float
longhorn_disk_filesystem_count float
```

**And** the value in `longhorn_disk_block_Count` should equal to the number of volume using the V1 engine.
**And** the value in `longhorn_disk_filesystem_Count` should equal to the number of volume using the V1 engine.
```bash
> kubectl exec -it ${influxdb_pod} -- influx -execute 'SELECT "longhorn_disk_filesystem_count" FROM "upgrade_request"' -database="${app_name}_upgrade_responder"
name: upgrade_request
time longhorn_disk_filesystem_count
---- ------------------------------
1702351841122419036 1
1702351841563938125 1
1702351842436864452 1
```
**And** the value in `longhorn_disk_block_Count` should equal to the number of volume using the V2 engine.
```bash
> kubectl exec -it ${influxdb_pod} -- influx -execute 'SELECT "longhorn_disk_block_count" FROM "upgrade_request"' -database="${app_name}_upgrade_responder"
name: upgrade_request
Expand All @@ -57,13 +67,39 @@ time longhorn_disk_block_count
1702351841563938125 2
1702351842436864452 2
```
**And** the value in `longhorn_disk_filesystem_Count` should equal to the number of volume using the V2 engine.

#### Test Collecting Volume Backend Store Driver

**Given** [Prerequisite](#prerequisite).
**And** Create one volume using V1 engine.
Create two volume using V2 engine.
**And** [Deploy upgrade responder stack](https://github.com/longhorn/longhorn/tree/master/dev/upgrade-responder).

**When** Wait 1~2 hours for collection data to send to the influxDB database.

**Then** `longhorn_volume_backend_store_driver_v1_count` should exist the influxDB database.
`longhorn_volume_backend_store_driver_v2_count` should exist the influxDB database.
```bash
> kubectl exec -it ${influxdb_pod} -- influx -execute 'SELECT "longhorn_disk_filesystem_count" FROM "upgrade_request"' -database="${app_name}_upgrade_responder"
> app_name="longhorn"
> influxdb_pod=$(kubectl get pod | grep influxdb | awk '{print $1}' | head -n 1)
> kubectl exec -it ${influxdb_pod} -- influx -execute 'SHOW FIELD KEYS FROM upgrade_request' -database="${app_name}_upgrade_responder" | grep longhorn_volume_backend_store_driver
longhorn_volume_backend_store_driver_v1_count float
longhorn_volume_backend_store_driver_v2_count float
```

**And** the value in `longhorn_volume_backend_store_driver_v1_count` should equal to the number of volume using the V1 engine.
```bash
> kubectl exec -it ${influxdb_pod} -- influx -execute 'SELECT "longhorn_volume_backend_store_driver_v1_count" FROM "upgrade_request"' -database="${app_name}_upgrade_responder"
name: upgrade_request
time longhorn_disk_filesystem_count
---- ------------------------------
1702351841122419036 1
1702351841563938125 1
1702351842436864452 1
time longhorn_volume_backend_store_driver_v1_count
---- ---------------------------------------------
1702351841122419036 3
```
**And** the value in `longhorn_volume_backend_store_driver_v2_count` should equal to the number of volume using the V2 engine.
```bash
> kubectl exec -it ${influxdb_pod} -- influx -execute 'SELECT "longhorn_volume_backend_store_driver_v2_count" FROM "upgrade_request"' -database="${app_name}_upgrade_responder"
name: upgrade_request
time longhorn_volume_backend_store_driver_v2_count
---- ---------------------------------------------
1702351841122419036 2
```

0 comments on commit a476c61

Please sign in to comment.