CN112468458B - Scheduling method based on neutron layering mechanism - Google Patents

Scheduling method based on neutron layering mechanism Download PDF

Info

Publication number
CN112468458B
CN112468458B CN202011263902.6A CN202011263902A CN112468458B CN 112468458 B CN112468458 B CN 112468458B CN 202011263902 A CN202011263902 A CN 202011263902A CN 112468458 B CN112468458 B CN 112468458B
Authority
CN
China
Prior art keywords
virtual
local area
computing node
virtual machine
computing
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202011263902.6A
Other languages
Chinese (zh)
Other versions
CN112468458A (en
Inventor
马增协
周建二
肖锋
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Southwest University of Science and Technology
Peng Cheng Laboratory
Original Assignee
Southwest University of Science and Technology
Peng Cheng Laboratory
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Southwest University of Science and Technology, Peng Cheng Laboratory filed Critical Southwest University of Science and Technology
Priority to CN202011263902.6A priority Critical patent/CN112468458B/en
Publication of CN112468458A publication Critical patent/CN112468458A/en
Application granted granted Critical
Publication of CN112468458B publication Critical patent/CN112468458B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/02Network architectures or network communication protocols for network security for separating internal from external traffic, e.g. firewalls
    • H04L63/0272Virtual private networks
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/08Configuration management of networks or network elements
    • H04L41/0803Configuration setting
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/10Flow control; Congestion control
    • H04L47/24Traffic characterised by specific attributes, e.g. priority or QoS
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L49/00Packet switching elements
    • H04L49/70Virtual switches
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network

Abstract

The application discloses a scheduling method based on a neutron hierarchical mechanism, which comprises the steps of determining a plurality of candidate computing nodes based on the number of residual Virtual Local Area Networks (VLANs) corresponding to each computing node in a plurality of computing nodes when a virtual machine of the computing node to be distributed is obtained; acquiring computing resource weights corresponding to the candidate computing nodes, and determining virtual local area network weight values corresponding to the candidate computing nodes based on the number of the residual virtual local area networks corresponding to the candidate computing nodes; and determining a target computing node corresponding to the virtual machine based on the virtual local area network weight value and the computing resource weight corresponding to each candidate computing node, and distributing the target computing node to the virtual machine. According to the method and the device, the VLAN is screened based on the number of the residual virtual local area networks, the computing nodes with the distributed VLAN resources are removed, and the problem of scheduling failure is avoided.

Description

Scheduling method based on neutron layering mechanism
Technical Field
The application relates to the field of cloud computing and virtual networks, in particular to a scheduling method based on a neutron hierarchical mechanism.
Background
When creating a Virtual Private Cloud (VPC) with a VLXAN type tenant network, the hierarchical binding mechanism of neutron needs to dynamically allocate two resources, wherein one resource is to configure a VXLAN ID of the VPC to a hardware switch of a first level; another mechanism for allocating resources is to configure the VLAN ID required for a VM (Virtual Machine) to access the VPC to a computing node, and this mechanism for dynamically allocating resources is called a hierarchical binding mechanism of neutron. The existing hierarchical binding mechanism of neutron often has the problem of scheduling failure.
Disclosure of Invention
The technical problem to be solved by the present application is to provide a scheduling method based on a neutron hierarchical mechanism, aiming at the defects of the prior art.
In order to solve the above technical problem, a first aspect of the embodiments of the present application provides a scheduling method based on a neutron hierarchical mechanism, where the method includes:
when a virtual machine of a computing node to be distributed is obtained, determining a plurality of candidate computing nodes based on the number of the remaining virtual local area networks corresponding to the computing nodes in the plurality of computing nodes;
acquiring computing resource weights corresponding to the candidate computing nodes, and determining virtual local area network weight values corresponding to the candidate computing nodes based on the number of the residual virtual local area networks corresponding to the candidate computing nodes;
and determining a target computing node corresponding to the virtual machine based on the virtual local area network weight value and the computing resource weight corresponding to each candidate computing node, and distributing the target computing node to the virtual machine.
In the scheduling method based on the neutron hierarchical mechanism, each of the plurality of computing nodes is configured with a plurality of virtual local area networks; for each computing node, the VLAN IDs of the virtual local area networks corresponding to the virtual ports belonging to the same virtual private cloud in the computing node are the same, and the VLAN IDs of the virtual local area networks corresponding to the virtual ports belonging to different virtual private clouds are different.
The scheduling method based on the neutron hierarchical mechanism, wherein when the virtual machine of the computing node to be allocated is obtained, the determining the number of the candidate computing nodes based on the number of the remaining virtual local area networks corresponding to each of the computing nodes includes:
when a virtual machine of a computing node to be distributed is obtained, the number of the remaining virtual local area networks corresponding to each computing node in a plurality of computing nodes is obtained;
and selecting the computing nodes with the number of the remaining virtual local area networks larger than the preset number threshold value as candidate computing nodes to obtain a plurality of candidate computing nodes.
The scheduling method based on the neutron hierarchical mechanism, wherein after the computing nodes with the number of the remaining virtual local area networks being greater than the preset number threshold are selected as candidate computing nodes to obtain a plurality of candidate computing nodes, the method further comprises:
acquiring resource information corresponding to the virtual machine;
and filtering the candidate computing nodes based on the resource information, and taking the filtered candidate computing nodes as the candidate computing nodes corresponding to the virtual machine.
The scheduling method based on the neutron hierarchical mechanism, wherein the formula for calculating the weight value of the virtual local area network may be:
virtual local area network weight value 1-ex-n
Wherein x represents the number of remaining virtual local area networks and n represents the maximum number of remaining virtual local area networks of the compute node.
The dispatch method based on the neutron hierarchical mechanism, wherein the determining a target computing node corresponding to the virtual machine based on the virtual local area network weight value and the computing resource weight corresponding to each candidate computing node and allocating the target computing node to the virtual machine body comprises:
for each candidate computing node, taking the minimum value of the weighted value of the virtual local area network corresponding to the candidate computing node and the weight of the computing resource as the target weighted value corresponding to the candidate computing node;
selecting a target computing node corresponding to the virtual machine from a plurality of candidate computing nodes based on a target weight, wherein the target computing node is the candidate computing node with the maximum target weight in the candidate computing nodes;
and allocating the selected target computing node to the virtual machine.
The scheduling method based on the neutron hierarchical mechanism, wherein after determining a target computing node corresponding to the virtual machine based on a virtual local area network weight value and a computing resource weight corresponding to each candidate computing node and allocating the target computing node to the virtual machine, the method includes:
detecting whether a virtual private cloud to which the virtual machine belongs is configured in the target computing node;
if the virtual private cloud to which the virtual machine belongs is detected, distributing a virtual local area network corresponding to the virtual private cloud to the virtual machine;
and if the virtual private cloud to which the virtual machine belongs is not detected, distributing a virtual local area network for the virtual private cloud to which the virtual machine belongs.
The scheduling method based on the neutron hierarchical mechanism, wherein after determining a target computing node corresponding to the virtual machine based on a virtual local area network weight value and a computing resource weight corresponding to each candidate computing node and distributing the target computing node to the virtual machine, the method comprises the following steps of;
configuring configuration information of a virtual private cloud to which the virtual machine belongs to a switch, and configuring a VLAN ID of a virtual local area network accessed by the virtual machine to a downlink of the switch for connecting a computing node;
and acquiring the equipment information of the interactive machine, generating switch configuration by the acquired equipment information, and configuring the switch to the interactive machine.
A second aspect of embodiments of the present application provides a computer-readable storage medium storing one or more programs, which are executable by one or more processors to implement the steps in the scheduling method based on the neutron hierarchical mechanism as described in any one of the above.
A third aspect of the embodiments of the present application provides a scheduling apparatus, including: a processor, a memory, and a communication bus; the memory has stored thereon a computer readable program executable by the processor;
the communication bus realizes connection communication between the processor and the memory;
the processor, when executing the computer readable program, implements the steps in the dispatch method based on the neutron hierarchical mechanism as described in any of the above.
Has the advantages that: compared with the prior art, the scheduling method based on the neutron hierarchical mechanism comprises the steps that when a virtual machine of a computing node to be distributed is obtained, a plurality of candidate computing nodes are determined based on the number of residual virtual local area networks corresponding to the computing nodes in the computing nodes; acquiring computing resource weights corresponding to the candidate computing nodes, and determining virtual local area network weight values corresponding to the candidate computing nodes based on the number of the residual virtual local area networks corresponding to the candidate computing nodes; and determining a target computing node corresponding to the virtual machine based on the virtual local area network weight value and the computing resource weight corresponding to each candidate computing node, and distributing the target computing node to the virtual machine. In the embodiment, the VLAN is screened based on the number of the remaining virtual local area networks, so that the computing nodes with the VLAN resources already allocated are removed, and the problem of scheduling failure is avoided.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed to be used in the description of the embodiments are briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and it is obvious for those skilled in the art that other drawings can be obtained according to the drawings without any inventive work.
Fig. 1 is an exemplary diagram of a neutron hierarchical schedule in a global manner.
Fig. 2 is a diagram illustrating an example of VLAN assignment of a computing node in the conventional neutron hierarchical scheduling.
Fig. 3 is a flowchart of a scheduling method based on a neutron hierarchical mechanism provided in the present application.
Fig. 4 is a schematic flow chart of a candidate computing node determination process in the scheduling method based on the neutron hierarchical mechanism provided by the present application.
Fig. 5 is a schematic flow chart of a candidate computing node ranking process in the scheduling method based on the neutron hierarchical mechanism provided by the present application.
Fig. 6 is a variation curve of virtual local area network weight in the scheduling method based on the neutron hierarchical mechanism provided in the present application.
Fig. 7 is a flowchart of allocating a VLAN to a VPC to which a VM belongs in the scheduling method based on the neutron hierarchical mechanism provided in the present application.
Fig. 8 is a diagram illustrating an example of a scheduling method based on a neutron hierarchical mechanism provided in the present application.
Fig. 9 is a schematic structural diagram of a scheduling apparatus according to the present application.
Detailed Description
The present application provides a scheduling method based on a neutron hierarchical mechanism, and in order to make the purpose, technical scheme, and effect of the present application clearer and clearer, the present application is further described in detail below with reference to the accompanying drawings and examples. It should be understood that the specific embodiments described herein are merely illustrative of the present application and are not intended to limit the present application.
As used herein, the singular forms "a", "an", "the" and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It will be further understood that the terms "comprises" and/or "comprising," when used in this specification, specify the presence of stated features, integers, steps, operations, elements, and/or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and/or groups thereof. It will be understood that when an element is referred to as being "connected" or "coupled" to another element, it can be directly connected or coupled to the other element or intervening elements may also be present. Further, "connected" or "coupled" as used herein may include wirelessly connected or wirelessly coupled. As used herein, the term "and/or" includes all or any element and all combinations of one or more of the associated listed items.
It will be understood by those within the art that, unless otherwise defined, all terms (including technical and scientific terms) used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs. It will be further understood that terms, such as those defined in commonly used dictionaries, should be interpreted as having a meaning that is consistent with their meaning in the context of the prior art and will not be interpreted in an idealized or overly formal sense unless expressly so defined herein. In addition, it should be understood that, the sequence numbers and sizes of the steps in this embodiment do not mean the execution sequence, and the execution sequence of each process is determined by the function and the inherent logic of the process, and should not constitute any limitation on the implementation process of the embodiment of the present application.
The inventor finds through research that, when creating a VPC (Virtual Private Cloud) with a VLXAN type tenant network, the hierarchical binding mechanism of neutron needs to dynamically allocate two resources, wherein one resource is used for configuring a VXLAN ID of the VPC to a hardware switch at a first level; another mechanism for allocating resources is to configure the VLAN ID required for a VM (Virtual Machine) to access the VPC to a computing node, and this mechanism for dynamically allocating resources is called a hierarchical binding mechanism of neutron. The existing hierarchical binding mechanism of neutron often has the problem of scheduling failure. In addition, the existing hierarchical binding mechanism of neutron also has the following problems in the use process:
first problem, it is unreasonable to dynamically allocate VLANs based on tenant network VPC
The current neutron VLAN assignment policy is to dynamically assign VPCs in a global manner (e.g., as shown in fig. 1), and VMs under each VPC will assign the same access VLAN ID even at different compute nodes, so the number of supported VPCs is limited by VLAN 4K.
Second problem, not considering VLAN resources
With the development of hardware and network technologies and the more refined requirements of user services, the granularity of the VM is smaller, and the existing VM scheduling algorithm only considers the computing resources such as CPU, memory and storage on the computing node and does not consider the influence of VLAN resources. This results in a scheduling failure due to the inability to create a VPC as a result of the VLAN resource allocation at the compute node, for example, as shown in fig. 2. In addition, after VLAN resources are allocated, a VM cannot be created on the computing node, which results in a waste of computing resources.
In order to solve the above problem, in the embodiment of the present application, when a virtual machine of a computing node to be allocated is acquired, a plurality of candidate computing nodes are determined based on the number of remaining virtual local area networks corresponding to each of the computing nodes; acquiring computing resource weights corresponding to the candidate computing nodes, and determining virtual local area network weight values corresponding to the candidate computing nodes based on the number of the residual virtual local area networks corresponding to the candidate computing nodes; and determining a target computing node corresponding to the virtual machine based on the virtual local area network weight value and the computing resource weight corresponding to each candidate computing node, and distributing the target computing node to the virtual machine. In the embodiment, the VLAN is screened based on the number of the remaining virtual local area networks, so that the computing nodes with the VLAN resources already allocated are removed, and the problem of scheduling failure is avoided.
The following further describes the content of the application by describing the embodiments with reference to the attached drawings.
This embodiment provides a scheduling method based on a neutron hierarchical mechanism, which can be applied to a Virtual eXtensible Local Area Network (VLXAN) tenant Network scenario based on a neutron hierarchical binding mechanism, as shown in fig. 3, the method includes:
s10, when the virtual machine of the computing node to be distributed is obtained, determining a plurality of candidate computing nodes based on the number of the remaining virtual local area networks corresponding to each computing node in the plurality of computing nodes.
Specifically, the computing nodes are pre-configured in a Virtual extensible Local Area Network (VLXAN), and the VLXAN allocates VLAN Network resources using the computing nodes as units, so that each computing node is configured with corresponding VLAN Network resources. The maximum VLAN number that can be configured for the number of VLAN network resources corresponding to each of the plurality of computing nodes is a preset value, for example, 4K. Thus, the Cloud host may support N × 4K VPCs (Virtual Private clouds), where N is the number of compute nodes.
Each computing node access switch in the plurality of computing nodes is independent, and each computing node in the plurality of computing nodes is configured with a plurality of virtual local area networks; for each computing node, the VLAN IDs of the virtual local area networks corresponding to the virtual ports belonging to the same virtual private cloud in the computing node are the same, and the VLAN IDs of the virtual local area networks corresponding to the virtual ports belonging to different virtual private clouds are different. Furthermore, for any two of the several computing nodes, the VLAN ID assignments on the first and second of the two computing nodes are independent of each other.
Further, each of the plurality of computing nodes may correspond to a VLAN address pool, the VLAN address pool may be generated based on a name of the computing node, and the VLAN address pool is used to store remaining VLANs corresponding to the computing nodes. Wherein the remaining VLANs refer to the number of VLANs to which VPCs are not allocated. For example, the computing nodes include computer _ node1, computer _ node2, and computer _ node n, each computing node configures the maximum number of VLANs that can be configured to be 4k, and then the VLAN address pool corresponding to each computing node may be represented as:
computer_node1:[2,3,...,4094];
computer_node2:[2,3,...,4094];
.......
computer_nodeN:[2,3,...,4094]。
in addition, the cloud host may be configured with a database in advance, where the database is used to record the VLAN to which the virtual port corresponding to the VPC1 accessed by each computing node belongs and the address pool corresponding to each computing node, and update the address pool corresponding to the computing node when the VLAN in the computing node is used or released.
For example, the following steps are carried out: newly created virtual machine VM1 is associated with VPC1, and VM1 is assigned to compute node computer _ node1, to which VLAN ID is assigned 3 by a random assignment method; the database would record that all virtual ports under that compute node VPC1 belong to VLAN 3; and calculates the address pool update corresponding to node computer _ node1, the updated address computer _ node1: [2,4, 5., 4094], if VPC1 is deleted, the address pool will restore the released VLAN, i.e. to computer _ node1: [2,3, 4., 4094 ].
In an implementation manner of this embodiment, when obtaining the virtual machine of the computing node to be allocated, the determining the candidate computing nodes based on the number of remaining virtual local area networks corresponding to each of the computing nodes in the plurality of computing nodes specifically includes:
when a virtual machine of a computing node to be distributed is obtained, the number of the remaining virtual local area networks corresponding to each computing node in a plurality of computing nodes is obtained;
and selecting the computing nodes with the number of the remaining virtual local area networks larger than the preset number threshold value as candidate computing nodes to obtain a plurality of candidate computing nodes.
Specifically, the number of remaining virtual local area networks refers to the number of VLANs of which the computing node does not access the VPC. The preset number threshold is used for measuring whether the computing nodes can be used as computing node bases corresponding to the virtual machines, wherein when the number of the remaining virtual local area networks is larger than the preset number threshold, the computing nodes corresponding to the number of the remaining virtual local area networks can be used as computing nodes corresponding to the virtual machines; otherwise, when the number of the remaining virtual local area networks is less than or equal to the preset number, it is indicated that the computing nodes corresponding to the number of the remaining virtual local area networks cannot be used as the computing nodes corresponding to the virtual machine. And filtering according to the residual VLAN resources on the computing nodes, and eliminating the computing nodes of which the VLAN number reaches 4094 or the maximum value defined by a user. Therefore, the computing nodes are sent by presetting the quantity threshold, and the problem that the cloud platform is failed to establish due to the fact that the quantity of the VPCs on the computing nodes exceeds the maximum value of the VLAN can be solved. In addition, the scheduling service allocates VPCs on the compute nodes that satisfy the conditions, and the total number of VPCs supported can be implemented as follows:
VPCmax_num=N*VIDmax
where N is the number of compute nodes and VIDmax is the maximum value of VLAN ID, e.g., 4094.
In an implementation manner of this embodiment, on the basis of ensuring that the computing node can allocate a VLAN for the virtual machine, in order to avoid waste of VLAN resources as much as possible, the pre-number threshold may be set to 0. Therefore, the fact that the number of the remaining virtual local area networks is larger than the preset number threshold value indicates that unallocated VLANs exist in the computing node; otherwise, the number of the remaining virtual local area networks is equal to the preset number threshold, which indicates that no unallocated VLAN exists in the computing node. Thus, the candidate computing node is a computing node with an unallocated VLAN in the plurality of computing nodes, and the plurality of candidate computing nodes includes a computing node with an unallocated VLAN in the plurality of computing nodes. For example, as shown in fig. 4, the several computing nodes include host1, host2, host3, host4, host5, and host6, where host1, host3, host5, and host6 have unassigned VLANs; host2 and host4 do not have an unassigned VLAN, then several candidate compute nodes include host1, host3, host5, and host 6.
In an implementation manner of this embodiment, after the selecting, as candidate computing nodes, computing nodes whose number of remaining virtual local area networks is greater than a preset number threshold, to obtain a plurality of candidate computing nodes, the method further includes:
acquiring resource information corresponding to the virtual machine;
and filtering the candidate computing nodes based on the resource information, and taking the filtered candidate computing nodes as the candidate computing nodes corresponding to the virtual machine.
Specifically, the resource information may include a required CPU number, a required RAM value, and the like, and the filtering the candidate computing nodes based on the resource information refers to selecting candidate computing nodes that can satisfy the resource information from the candidate computing nodes, and using the selected candidate computing nodes as candidate computing nodes corresponding to the virtual machine. In this embodiment, the candidate computing nodes are filtered through the resource information, so that the filtered candidate computing nodes can meet the requirements of the virtual machine, and the virtual machine can run normally.
For example, the following steps are carried out: the resource information comprises that the number of the required CPUs is 5, and the RAM value is 120; then the number of CPUs available for each of the candidate compute nodes is greater than or equal to 5 and the RAM value available for each of the candidate compute nodes is greater than or equal to 120. Of course, in practical applications, the resource information may further include an available disk space, an IO load, and the like, and different virtual machines may correspond to different resource information, which is not described here, so that the schemes for filtering candidate computing nodes by using the resource information all belong to the protection scope of this embodiment.
S20, obtaining the respective computing resource weight of each candidate computing node, and determining the respective virtual local area network weight value of each candidate computing node based on the respective residual virtual local area network number of each candidate computing node.
Specifically, the computing resource weight is determined based on node resource information corresponding to the computing node, and the virtual local area network weight value is determined based on the number of the remaining virtual local area networks of the computing node, where the computing resource weight is used for reflecting the computing capability of the computing node, and the virtual local area network weight value is used for reflecting the number of the remaining virtual local area networks of the computing node. The node resource information may include several information items, for example, several information items include available RAM, available CPU, available disk space, and IO load; the calculation resource weight may be calculated for a plurality of information items, and the calculation formula of the calculation resource weight may be:
weight=w1_multiplier*norm(w1)+w2_multiplier*norm(w2)+...+wn_multiplier*norm(wn)
wherein weight represents the weight of the computational resource; wi _ multiplier represents the priority weight of the ith information item; norm (. cndot.) represents the normalization process.
The formula for calculating the weighted value of the virtual local area network may be:
virtual local area network weight value 1-ex-n
Wherein x represents the number of remaining virtual local area networks and n represents the maximum number of remaining virtual local area networks of the compute node.
S30, determining a target computing node corresponding to the virtual machine based on the virtual local area network weight value and the computing resource weight corresponding to each candidate computing node, and distributing the target computing node to the virtual machine.
Specifically, the target computing node is a computing node to be scheduled by the virtual machine, and the target computing node allocates a VLAN ID to the VPC network associated with the virtual machine. After the virtual machine determines the associated VPC network, the neutron creates a logical port for the virtual machine VM, and the logical port is bound to the VPC network.
In an implementation manner of this embodiment, as shown in fig. 5, the determining a target computing node corresponding to the virtual machine based on a virtual local area network weight value and a computing resource weight corresponding to each candidate computing node, and allocating the target computing node to the virtual machine includes:
for each candidate computing node, taking the minimum value of the weighted value of the virtual local area network corresponding to the candidate computing node and the weight of the computing resource as the target weighted value corresponding to the candidate computing node;
selecting a target computing node corresponding to the virtual machine from a plurality of candidate computing nodes based on a target weight, wherein the target computing node is the candidate computing node with the maximum target weight in the candidate computing nodes;
and allocating the selected target computing node to the virtual machine.
Specifically, the target computing node is determined based on a target weight, and the target weight is the minimum value of a virtual local area network weight value and a computing resource weight corresponding to the candidate computing node. As can be seen from the formula for calculating the virtual lan weight and fig. 6, when the number of the remaining virtual lans is greater than the preset threshold, the virtual lan weight approaches 0, and when the number of the remaining virtual lans is less than or equal to the preset threshold, the virtual lan weight approaches 1. It can be understood that, when the VLAN resources are sufficient (i.e. the number of the remaining virtual local area networks is greater than the preset threshold), the virtual local area network weight value approaches 0, and the computing resource weight is taken as the target weight, and when the VLAN resources are insufficient (i.e. the number of the remaining virtual local area networks is less than or equal to the preset threshold), the virtual local area network weight value approaches 1, and the virtual local area network weight value is taken as the target weight, so that the waste of other computing resources due to the early allocation of the VLAN can be avoided, and when the VLAN is sufficient, the computing resource can be taken as a priority condition, and the scheduling rationality can be ensured.
In an implementation manner of this embodiment, the preset threshold may be 50, and as can be seen from fig. 6, when the assigned VLAN resource is calculated to be less than 4090 (i.e. the number of remaining virtual local area networks is greater than 50), the weight value of the virtual local area network is approximately equal to 1, so that the target weight value only depends on the weight value of the computing resource; when the VLAN resource is larger than 4090 (i.e., the number of remaining VLANs is smaller than 50), the VLAN weight value decreases sharply to approximately 0, so the target weight value depends on the VLAN resource remaining.
In an implementation manner of this embodiment, each information item cost (e.g., CPU cost, RAM cost, IO cost, etc.) in the computing resource information is normalized and weighted to obtain a computing resource weight value c _ weight, and then a target weight value of c _ weight and a virtual local area network weight value vlan weight is taken, where a calculation formula of the target weight value may be:
FinalWighter=min(c_weight,VlanWeighter)
in an implementation manner of this embodiment, as shown in fig. 7, after determining a target computing node corresponding to the virtual machine based on a virtual local area network weight value and a computing resource weight corresponding to each candidate computing node, and allocating the target computing node to the virtual machine, the method includes:
detecting whether a virtual private cloud to which the virtual machine belongs is configured in the target computing node;
if the virtual private cloud to which the virtual machine belongs is detected, distributing a virtual local area network corresponding to the virtual private cloud to the virtual machine;
and if the virtual private cloud to which the virtual machine belongs is not detected, distributing a virtual local area network for the virtual private cloud to which the virtual machine belongs.
Specifically, the configuring of the virtual private cloud to which the virtual machine belongs means that a VLAN exists in a VLAN already allocated to the computing node, and a virtual private cloud accessed by the VLAN and to which the virtual machine belongs. When the virtual private cloud to which the virtual machine belongs is detected, the VLAN IDs of the virtual local area networks corresponding to the virtual ports belonging to the same virtual private cloud are the same, so that the virtual local area networks corresponding to the virtual private cloud are allocated to the virtual machine; when the virtual private cloud to which the virtual machine belongs is not detected, the VLAN IDs of the virtual local area networks corresponding to the virtual ports of different virtual private clouds are different, so that the virtual local area network is allocated to the virtual private cloud to which the virtual machine belongs.
In an implementation manner of this embodiment, as shown in fig. 8, after determining a target computing node corresponding to the virtual machine based on a virtual local area network weight value and a computing resource weight corresponding to each candidate computing node, and allocating the target computing node to the virtual machine, the method includes;
configuring configuration information of a virtual private cloud to which the virtual machine belongs to a switch, and configuring a VLAN ID of a virtual local area network accessed by the virtual machine to a downlink of the switch for connecting a computing node;
and acquiring the equipment information of the interactive machine, generating switch configuration by the acquired equipment information, and configuring the switch to the interactive machine.
Specifically, after the VM is ensured to be allocated with the VLAN ID accessed to the VPC, the VLAN ID accessed to the VPC is allocated to the VM; and acquiring a computing node to be scheduled by the VM from the port information, inquiring VPC and VLAN ID records in a database, distributing VLAN IDs accessed to the VPCs from the rest VLANs of the computing node, and storing a processing result in the database. In addition, VXLAN VNI (Virtual Network ID, VNI encapsulated in VXLAN header, 24-bi, supporting 16,000,000 logic Network.) of VPC is configured to the hardware switch bridge, VLAN ID accessed by VM is configured to the downlink of Leaf switch connection computing node, and cloud platform event and Virtual resource data are notified to the control center. Certainly, in practical application, when the cloud platform receives a newly-built VM, the VM is associated to a VPC network, and the neutron creates a logical port for the VM, and the logical port is bound to the VPC; and Neutron transfers VM port data to the control center through the bind _ port interface.
The control center queries the topology data through the name of the computing node, acquires information such as a management address, an equipment manufacturer and a downlink of a Leaf switch (distributed switch), converts the cloud platform adding/deleting event into an adding/deleting event of equipment resources, and sends the adding/deleting event to the configuration center. The configuration center generates configuration information corresponding to the switch according to the command of the control center, and the configuration information is configured on the switch in a netconf/openflow/cmd mode and the like.
In an implementation manner, an implementation process of the scheduling method based on the hierarchical mechanism of the neutron provided by this embodiment may be as shown in fig. 8, where a network-pcl module implements the hierarchical binding mechanism, provides a call interface for the neutron, allocates network resources for network events such as VPC, vRouter, Port, and the like, and processes a data synchronization database; the control center is a controller master scheduling center, converts virtual resources such as VPC (virtual private network) and the like into real physical resources in the data center, exchanges data with the topology module and the configuration center module to realize configuration and sends the configuration to the hardware switch; the topology module is used for automatically collecting the data center network topology and providing topology query; the configuration center is a hardware switch configuration library and generates configuration information according to the cloud platform network event and the switch model; the device mapping module is abstract mapping of the hardware switch and is used for configuring the physical switch by managing the device mapping; resource monitoring: and periodically reporting the resource residual condition of the VLAN ID of the computing node so as to avoid the condition that the VLAN ID distributed by the computing node reaches the maximum value and the cloud platform still schedules the VM to the computing node.
The functions and data structures of the interface shown in fig. 8 may be:
interface a 1: hierarchical binding API
For binding a VM to a VPC, which is equivalent to creating a logical port for the VM and binding the logical port to the VPC to allocate a VLAN for accessing the VPC, the interface to the neutron of interface A1 is bind _ port (context)
Figure BDA0002775503480000141
Interface a 2: assigning VLANs
Function of assignment of VLAN to VPC: allocate _ dynamic _ segment, input: network id and target computing node
Figure BDA0002775503480000142
The VLAN ID allocated for the VM is returned:
Figure BDA0002775503480000143
and calling a continue _ binding method to configure the VLAN value to the corresponding equipment.
Interface a 3: resource issuing control center
And transferring the resources to the controller, wherein the interface data is as follows:
Figure BDA0002775503480000144
top _ segmentation: the VNI of VXLAN is recorded and the controller will configure the bridge-domian and VTEP of the switch.
bottom _ segmentation: the VM is accessed to the VLAN ID of the VPC, the controller finds the switch downlink port according to the network topology, creates a sub-interface and configures the conversion relation between the VLAN and the VNI.
Interface a 4: configuration switch
The configuration of the generated configuration file is as follows, wherein VID 2095, namely the network-pcl allocates VLAN for the VM, 10GE1/0/20.2095 is a physical interface obtained by inquiring from the network topology, and the configuration is issued to the corresponding switch in a netconf mode and the like.
Figure BDA0002775503480000151
Interface B1: interface for reporting resource surplus condition by controller
The controller will periodically report the resource residual situation of the VLAN distributed and available for distribution on the computing node, and the data interface is as follows:
Figure BDA0002775503480000152
wherein resource _ tracker is an established RPC connection channel
Data structure D1: distribution of VNI and VID of VPC on computing nodes
Figure BDA0002775503480000161
network _ id: network unique labeling of VPCs
Id 3c95f281-9460-4d89-8117-d56702847e78 mark the allocation of VXALN resources on leaf switches:
VXLAN, representing the tenant network type as VXLAN
segment _ id VNI, vxlan bridge-domain represented by VNI is global variable
id _ dynamic:0, representing no dynamic allocation
3e1a80bc-a5da-4e10-9240-e9d5af8ca681 marks the VLAN resource of the computing node;
VLAN is the network _ type, and the mode of accessing the VPC is VLAN
segment _ id VNI, because each compute node is dynamically allocated, compute2 is recorded on the node,
id _ dynamic:1, representing controller dynamic Allocation
Data structure D2: data center network topology
Figure BDA0002775503480000162
In the network topology, the mac of the network card of the computing node is used as a key value, the key information of the hardware switch can be obtained through the computing node, wherein the peer _ mac is a bridge mac, the peer _ interface is a downlink, the peer _ system is an equipment manufacturer, the address is a management address of the switch, and the hardware switch can be managed through the key information above the switch.
In summary, this embodiment provides a scheduling method based on a neutron hierarchical mechanism, where the method includes determining a plurality of candidate computing nodes based on the number of remaining virtual local area networks corresponding to each computing node in a plurality of computing nodes when a virtual machine of a computing node to be allocated is acquired; acquiring computing resource weights corresponding to the candidate computing nodes, and determining virtual local area network weight values corresponding to the candidate computing nodes based on the number of the residual virtual local area networks corresponding to the candidate computing nodes; and determining a target computing node corresponding to the virtual machine based on the virtual local area network weight value and the computing resource weight corresponding to each candidate computing node, and distributing the target computing node to the virtual machine. The scheduling method provided by this embodiment has a characteristic of strong extensibility, and supports that the number of VPCs increases with the increase of computing nodes, and the maximum value is N (the number of computing nodes) × 4K (the maximum value of VLAN ID). Meanwhile, the computing nodes without VLAN resources are filtered, the problem that creation fails due to the fact that the VM is still scheduled to the computing nodes, and further the VPC number cannot reach N x 4K is avoided, and the waste of other computing resources due to the fact that VLAN is allocated prematurely is avoided by optimizing a VM scheduling algorithm in a nonlinear weighting mode. When the VLAN is sufficient, the interference to the original scheduling algorithm is avoided; when the VLAN is exhausted, the voting weight is increased, the VLAN is screened based on the number of the residual virtual local area networks, the computing nodes with the distributed VLAN resources are removed, and the problem of scheduling failure is avoided.
Based on the scheduling method based on the neutron hierarchical mechanism, the embodiment provides a computer-readable storage medium, where one or more programs are stored, and the one or more programs are executable by one or more processors to implement the steps in the scheduling method based on the neutron hierarchical mechanism as described in the foregoing embodiment.
Based on the scheduling method based on the neutron hierarchical mechanism, the present application further provides a scheduling apparatus, as shown in fig. 9, which includes at least one processor (processor) 20; a display screen 21; and a memory (memory)22, and may further include a communication Interface (Communications Interface)23 and a bus 24. The processor 20, the display 21, the memory 22 and the communication interface 23 can communicate with each other through the bus 24. The display screen 21 is configured to display a user guidance interface preset in the initial setting mode. The communication interface 23 may transmit information. The processor 20 may call logic instructions in the memory 22 to perform the methods in the embodiments described above.
Furthermore, the logic instructions in the memory 22 may be implemented in software functional units and stored in a computer readable storage medium when sold or used as a stand-alone product.
The memory 22, which is a computer-readable storage medium, may be configured to store a software program, a computer-executable program, such as program instructions or modules corresponding to the methods in the embodiments of the present disclosure. The processor 20 executes the functional application and data processing, i.e. implements the method in the above-described embodiments, by executing the software program, instructions or modules stored in the memory 22.
The memory 22 may include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required for at least one function; the storage data area may store data created according to the use of the scheduling apparatus, and the like. Further, the memory 22 may include a high speed random access memory and may also include a non-volatile memory. For example, a variety of media that can store program codes, such as a usb disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk, or an optical disk, may also be transient storage media.
In addition, the specific processes loaded and executed by the instruction processors in the storage medium and the scheduling device are described in detail in the method, and are not stated herein.
Finally, it should be noted that: the above embodiments are only used to illustrate the technical solutions of the present application, and not to limit the same; although the present application has been described in detail with reference to the foregoing embodiments, it should be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; and such modifications or substitutions do not depart from the spirit and scope of the corresponding technical solutions in the embodiments of the present application.

Claims (10)

1. A scheduling method based on a neutron hierarchical mechanism is characterized by comprising the following steps:
when a virtual machine of a computing node to be distributed is obtained, determining a plurality of candidate computing nodes based on the number of the remaining virtual local area networks corresponding to the computing nodes in the plurality of computing nodes;
acquiring computing resource weights corresponding to the candidate computing nodes, and determining virtual local area network weight values corresponding to the candidate computing nodes based on the number of the residual virtual local area networks corresponding to the candidate computing nodes;
and determining a target computing node corresponding to the virtual machine based on the virtual local area network weight value and the computing resource weight corresponding to each candidate computing node, and distributing the target computing node to the virtual machine, wherein the target computing node is determined based on a target weight value corresponding to each candidate computing node, and the target weight value is the minimum value of the virtual local area network weight value and the computing resource weight corresponding to the candidate computing node.
2. The neutron layering mechanism-based scheduling method of claim 1, wherein each of the plurality of compute nodes is configured with a plurality of virtual local area networks; for each computing node, the VLAN IDs of the virtual local area networks corresponding to the virtual ports belonging to the same virtual private cloud in the computing node are the same, and the VLAN IDs of the virtual local area networks corresponding to the virtual ports belonging to different virtual private clouds are different.
3. The dispatch method based on the neutron hierarchical mechanism according to claim 1, wherein when the virtual machine of the compute node to be allocated is obtained, the determining the number of candidate compute nodes based on the number of remaining virtual local area networks corresponding to each of the compute nodes specifically comprises:
when a virtual machine of a computing node to be distributed is obtained, the number of the remaining virtual local area networks corresponding to each computing node in a plurality of computing nodes is obtained;
and selecting the computing nodes with the number of the remaining virtual local area networks larger than the preset number threshold value as candidate computing nodes to obtain a plurality of candidate computing nodes.
4. The method according to claim 3, wherein after the selecting the computing nodes with the number of the remaining VLANs greater than the threshold value of the preset number as the candidate computing nodes to obtain a plurality of candidate computing nodes, the method further comprises:
acquiring resource information corresponding to the virtual machine;
and filtering the candidate computing nodes based on the resource information, and taking the filtered candidate computing nodes as the candidate computing nodes corresponding to the virtual machine.
5. The dispatch method based on the neutron hierarchical mechanism of claim 1, wherein the formula for calculating the weight value of the vlan may be:
virtual local area network weight value 1-ex-n
Wherein x represents the number of remaining virtual local area networks and n represents the maximum number of remaining virtual local area networks of the compute node.
6. The method according to claim 1, wherein the determining a target computing node corresponding to the virtual machine based on the virtual local area network weight value and the computing resource weight corresponding to each candidate computing node and assigning the target computing node to the virtual machine entity comprises:
selecting a target computing node corresponding to the virtual machine from a plurality of candidate computing nodes based on a target weight, wherein the target computing node is the candidate computing node with the maximum target weight in the candidate computing nodes;
and allocating the selected target computing node to the virtual machine.
7. The method for scheduling based on a neutron hierarchical mechanism according to any one of claims 1 to 6, wherein after determining a target computing node corresponding to the virtual machine based on the virtual local area network weight value and the computing resource weight corresponding to each candidate computing node and allocating the target computing node to the virtual machine, the method comprises:
detecting whether a virtual private cloud to which the virtual machine belongs is configured in the target computing node;
if the virtual private cloud to which the virtual machine belongs is detected, distributing a virtual local area network corresponding to the virtual private cloud to the virtual machine;
and if the virtual private cloud to which the virtual machine belongs is not detected, distributing a virtual local area network for the virtual private cloud to which the virtual machine belongs.
8. The method according to claim 7, wherein after determining a target computing node corresponding to the virtual machine based on the virtual local area network weight value and the computing resource weight corresponding to each candidate computing node and allocating the target computing node to the virtual machine, the method includes;
configuring configuration information of a virtual private cloud to which the virtual machine belongs to a switch, and configuring a VLAN ID of a virtual local area network accessed by the virtual machine to a downlink of the switch for connecting a computing node;
and acquiring the equipment information of the switch, generating switch configuration from the acquired equipment information, and configuring the switch in the switch.
9. A computer readable storage medium storing one or more programs, the one or more programs being executable by one or more processors for implementing the steps in the method for scheduler based on a neutron hierarchical mechanism as claimed in any one of claims 1 to 8.
10. A scheduling apparatus, comprising: a processor, a memory, and a communication bus; the memory has stored thereon a computer readable program executable by the processor;
the communication bus realizes connection communication between the processor and the memory;
the processor, when executing the computer readable program, implements the steps in the neutron hierarchical mechanism based scheduling method according to any of claims 1-8.
CN202011263902.6A 2020-11-12 2020-11-12 Scheduling method based on neutron layering mechanism Active CN112468458B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011263902.6A CN112468458B (en) 2020-11-12 2020-11-12 Scheduling method based on neutron layering mechanism

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011263902.6A CN112468458B (en) 2020-11-12 2020-11-12 Scheduling method based on neutron layering mechanism

Publications (2)

Publication Number Publication Date
CN112468458A CN112468458A (en) 2021-03-09
CN112468458B true CN112468458B (en) 2022-04-12

Family

ID=74826167

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011263902.6A Active CN112468458B (en) 2020-11-12 2020-11-12 Scheduling method based on neutron layering mechanism

Country Status (1)

Country Link
CN (1) CN112468458B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113395183B (en) * 2021-08-18 2021-12-07 南京赛宁信息技术有限公司 Virtual node scheduling method and system for network simulation platform VLAN interconnection

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9864640B2 (en) * 2015-08-14 2018-01-09 International Business Machines Corporation Controlling virtual machine density and placement distribution in a converged infrastructure resource pool
CN106209677A (en) * 2016-07-15 2016-12-07 深圳市永达电子信息股份有限公司 The method that neutron based on Openstack realizes network QOS
CN109976870A (en) * 2017-12-28 2019-07-05 ***通信集团重庆有限公司 Creation method, device, equipment and the medium of virtual machine
JP6957431B2 (en) * 2018-09-27 2021-11-02 株式会社日立製作所 VM / container and volume allocation determination method and storage system in HCI environment
CN109981493B (en) * 2019-04-09 2020-05-01 苏州浪潮智能科技有限公司 Method and device for configuring virtual machine network

Also Published As

Publication number Publication date
CN112468458A (en) 2021-03-09

Similar Documents

Publication Publication Date Title
US10701139B2 (en) Life cycle management method and apparatus
EP3761170B1 (en) Virtual machine creation method and apparatus
EP3281359B1 (en) Application driven and adaptive unified resource management for data centers with multi-resource schedulable unit (mrsu)
CN109313564B (en) Server computer management system for highly available virtual desktops supporting multiple different tenants
EP1323037B1 (en) Method and apparatus for controlling an extensible computing system
US9338228B1 (en) I/O scheduling and load balancing across the multiple nodes of a clustered environment utilizing data volume based scheduling priorities
EP3163797B1 (en) Service orchestration method and apparatus in software-defined networking, and storage medium
CN108924268B (en) Container cloud service system and pod creation method and device
US8104038B1 (en) Matching descriptions of resources with workload requirements
CN107222531B (en) Container cloud resource scheduling method
US20110213886A1 (en) Intelligent and Elastic Resource Pools for Heterogeneous Datacenter Environments
CN110098946B (en) Method and device for deploying virtualized network element equipment
CN110741352B (en) Virtual network function management system, virtual network function management method and computer readable storage device
CN105159775A (en) Load balancer based management system and management method for cloud computing data center
CN102082692A (en) Method and equipment for migrating virtual machines based on network data flow direction, and cluster system
EP3905588A1 (en) Cloud platform deployment method and apparatus, server and storage medium
CN110221920B (en) Deployment method, device, storage medium and system
CN110838939B (en) Scheduling method based on lightweight container and edge Internet of things management platform
US11093288B2 (en) Systems and methods for cluster resource balancing in a hyper-converged infrastructure
CN110086726A (en) A method of automatically switching Kubernetes host node
CN112468458B (en) Scheduling method based on neutron layering mechanism
CN110795202B (en) Resource allocation method and device of virtualized cluster resource management system
CN116724543A (en) Container cluster management method and device
CN107562510B (en) Management method and management equipment for application instances
JP6207463B2 (en) Abstraction method and resource management method of server performance in IT system

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant