This Confluence has been LDAP enabled, if you are an ASF Committer, please use your LDAP Credentials to login. Any problems file an INFRA jira ticket please.

Child pages
  • Expansion of Management IP Range
Skip to end of metadata
Go to start of metadata

Introduction

CloudStack accesses all the system VMs (CPVM, SSVM, VR) through the management network. The VR is connected to management network only in case of Hyper-V and VMware hypervisor, but for all other hypervisors, VR is not part of management network. It is a POD level network. The system VMs get an IP of the network from a range of IPs. That range is decided while creating a POD under a particular ZONE.

Purpose

At present, The management IP range can only be expanded under the same subnet. According to existing range, either the last IP can be forward extended or the first IP can be backward extended. But we cannot add an entirely different range from the same subnet or different subnet. So the expansion of range is subnet bound, which is fixed. But when the range gets exhausted and a user wants to deploy more system VMs, then the operation would fail. The purpose of this feature is to expand the range of management network IPs within the existing subnet. It can create, delete and list the IP ranges.

References

Glossary

  • None

Feature Specifications

  • New API(createManagementNetworkIpRange) to allow expand the IP range.
  • New API(deleteManagementNetworkIpRange) to allow delete the IP range.
  • For listing the range, we use listPods API.
  • The createX API will add a different range in the same subnet.
  • The createX API to take POD, Gateway, Netmask, StartIp as mandatory input.
  • EndIp is an optional input in createX API. If left blank, then EndIp is same as StartIp.
  • The deleteX API to take POD, StartIp and EndIp as mandatory input.
  • The response of the listPods API is modified where it will send a list of StartIps and EndIps instead of one.
  • All the APIs are only available to root admin.
  • The createX, deleteX APIs will be asynchronous, which returns a job ID where the action can be tracked.
  • Basic validations like static parameter checks (type, length, null), availability of resources will be performed upfront but beyond that, it will be a best-effort task and it is not guaranteed that action will compete successfully. If there is any runtime error, the job will fail with appropriate logs.
  • StartIP and EndIP parameters are made optional in UpdatePod API.

Use Cases/Requirements

  1. Add new IPs of a completely different range of the same subnet.
  2. Can deploy a system VM even if all the existing IPs are exhausted.

Architecture and Design Description

  • As the added range is from an existing subnet, then no new network is created.
  • We maintain the multiple ranges in host_pod_ref table description field with the comma(,) separated.
  • When the user creates a range, the range is checked with existing ranges for overlapping cases.
  • If there is an overlap with any range, it fails the expansion.
  • Else the range is appended with existing ranges and all the IPs are populated in op_dc_ip_address_alloc table.
  • Deletion of an IP range is allowed only if any IP of the range is not allocated.
  • If so, it removes all the entries of that range from op_dc_ip_address_alloc table and then it removes the string from host_pod_ref table.
  • At a time we can add/delete a single IP range. Concurrent access to APIs are not allowed.
  • Now, we can only update the name, gateway and netmask of a Pod using updatePod API.
  • We cannot update StartIp and EndIp of the pod. Because we cannot replace them with just one range.
  • Even if we pass startIp and endIp parameters in updatePod API. It is considered as NULL thereafter.

Web Services APIs

createManagementNetworkIpRange

Creates a management network IP range.

  • Input Parameters
    • gateway - The gateway for the management network.
      • Type - String
      • Validation - Should be a valid IP.
      • Required
    • netmask - The netmask for the management network.
      • Type - String
      • Validation - Should be a valid IP as well as a valid netmask.
      • Required
    • podid - UUID of POD, where the IP range belongs to.
      • Type - String
      • Validation - Should exist in DB.
      • Required
    • startip - The starting IP address.
      • Type - String
      • Validation - Should be a valid IP.
      • Required
    • endip - The ending IP address.
      • Type - String
      • Validation - Should be a valid IP.
      • Optional
  • Output
    • id - The UUID of the management network IP range.
      • Type - String
    • jobid - The job id for the creation of IP range.
      • Type - String

deleteManagementNetworkIpRange

Deletes a management network IP range. This action is only allowed when no IPs in this range are allocated.

  • Input Parameters
    • podid - UUID of POD, where the IP range belongs to.
      • Type - String
      • Validation - Should exist in DB.
      • Required
    • startip - The starting IP address.
      • Type - String
      • Validation - Should be a valid IP.
      • Required
    • endip - The ending IP address.
      • Type - String
      • Validation - Should be a valid IP.
      • Required
  • Output
    • jobid - The job id for the deletion of IP range.
      • Type - String

DB Changes

  • No DB changes.

UI flow

  • Infrastructure page, select Management.

 

  • Select the Pod, input the same gateway and netmask for the network and input Start IP and End IP(Optional) then Add.
  • Will update the Figures soon(Making gateway and netmask as input fields)

 

  • List the IP ranges created. Delete it.

 

  • Removal of StartIP and EndIP from Pods detail page.

 

Upgrade Considerations

  • No upgrade is required.

Security

  • The new APIs are only available to root admin and the parameters passed don't have any sensitive information.

Concurrency Considerations

  • None.

Appendix

Appendix A:

Appendix B:

  • No labels