Skip to content

CB‐Spider Zone Based Control Testing Guide

ByoungSeob Kim edited this page Feb 14, 2025 · 5 revisions

Zone-Based Control Testing Guide

Table of Contents


What is Zone-Based Control?

Zone-Based Control is a feature provided by CB-Spider in Cloud-Barista, allowing resource creation and management not only in the Default Zone within a single Connection but also in other Target Zones. For more, Check the Zone-based Control wiki document.

Environment Setup

- CB-SPIDER: 0.10.1
- CSP: AWS
- Region: us-east-2
- Default Zone: us-east-2a (United States, Ohio)
- Target Zone: us-east-2b (United States, Ohio)
- VM Spec: t2.micro
- VM Image: ami-00afc76f2b7273d3b
- Disk: Size - 1GB / Type - gp2

Test Cases

Case 1: Check Resource Zone Information

Objective:

Verify the zone information of the provisioned resources(Subnet, Disk, VM).

Steps:

  1. List all resources created in the default and target zones.
  2. Ensure the zone information matches the expected configuration.

Expected Result:

  • Resource details include accurate zone information.

Examples:

VPC/Subnet Management
Figure 1: VPC/Subnet Management


Disk Management
Figure 2: Disk Management


VM Provisioning Info
Figure 3: VM Provisioning Info


Case 2: Default Zone Test

Objective:

Test resource provisioning in the default zone (us-east-2a).

Steps:

  1. Create a subnet s1 and disk d1 in the default zone (us-east-2a).
  2. Create a Security Group for s1.
  3. Provision a VM in the subnet s1.
  4. Attach the disk d1 to the VM.
  5. Detach the disk d1 from the VM.

Expected Result:

  • Subnet s1 and disk d1 are successfully created in the default zone (us-east-2a).
  • VM1 is successfully created in the us-east-2a zone.
  • Disk d1 is successfully attached to the VM1.
  • Disk d1 is successfully detached from the VM1.

Examples:

Disk Attach to Default Zone
Figure 4: Disk Attach to Default Zone
Disk Detach from Default Zone
Figure 5: Disk Detach from Default Zone

Case 3: Target Zone Test

Objective:

Test resource provisioning in the target zone (us-east-2b).

Steps:

  1. Create a subnet s2 and disk d2 in the target zone (us-east-2b).
  2. Create a Security Group for s2
  3. Provision a VM2 in the subnet s2.
  4. Attach the disk d2 to the VM2.
  5. Detach the disk d2 from the VM2.

Expected Result:

  • Subnet s2 and disk d2 are successfully created in the target zone (us-east-2b).
  • VM2 is successfully created in the us-east-2b zone.
  • Disk d2 is successfully attached to the VM2.
  • Disk d2 is successfully detached from the VM2

Examples:


Figure 6: Disk Attach to Target Zone
Disk Detach from Target Zone
Figure 7: Disk Detach from Target Zone

Case 4: Verify Zone Mismatch Error Message

Objective:

Validate error handling when there is a zone mismatch.

Steps:

  1. Attempt to interaction with a resource in an incorrect zone.
  2. Attempt to attach d1 (in us-east-2a) to VM2 (in us-east-2b) using the API / CLI
  3. Observe the error message returned by the system.

API Details:

Expected Result:

  • System Should return a Zone Mismatch Error response, clearly indicating that the disk and the VM are not in the same availability zone.

Example Response:

{
  "message": "InvalidVolume.ZoneMismatch: The volume 'vol-0fb0eede632787658' is not in the same availability zone as instance 'i-08bdefda0ac12fef5'\nstatus code: 400, request id: 60e134ec-8477-4679-88a8-a70d057a62c8"
}

Test Result

You can view the Zone-Based Control Test results for each CSP's resources at the link below:
🔗 View Google Spreadsheet


By following this guide, you can successfully test the Zone-Based Control feature in CB-SPIDER and ensure it operates as expected under various scenarios.

Table of contents



Clone this wiki locally