CN111625338A - Affinity rule scheduling method, device and related equipment - Google Patents

Affinity rule scheduling method, device and related equipment Download PDF

Info

Publication number
CN111625338A
CN111625338A CN202010469816.4A CN202010469816A CN111625338A CN 111625338 A CN111625338 A CN 111625338A CN 202010469816 A CN202010469816 A CN 202010469816A CN 111625338 A CN111625338 A CN 111625338A
Authority
CN
China
Prior art keywords
rule
affinity rule
target
affinity
preset
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.)
Granted
Application number
CN202010469816.4A
Other languages
Chinese (zh)
Other versions
CN111625338B (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.)
Guangdong Inspur Smart Computing Technology Co Ltd
Original Assignee
Guangdong Inspur Big Data Research Co Ltd
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 Guangdong Inspur Big Data Research Co Ltd filed Critical Guangdong Inspur Big Data Research Co Ltd
Priority to CN202010469816.4A priority Critical patent/CN111625338B/en
Publication of CN111625338A publication Critical patent/CN111625338A/en
Application granted granted Critical
Publication of CN111625338B publication Critical patent/CN111625338B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/48Program initiating; Program switching, e.g. by interrupt
    • G06F9/4806Task transfer initiation or dispatching
    • G06F9/4843Task transfer initiation or dispatching by program, e.g. task dispatcher, supervisor, operating system
    • G06F9/4881Scheduling strategies for dispatcher, e.g. round robin, multi-level priority queues
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45533Hypervisors; Virtual machine monitors
    • G06F9/45558Hypervisor-specific management and integration aspects
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45533Hypervisors; Virtual machine monitors
    • G06F9/45558Hypervisor-specific management and integration aspects
    • G06F2009/45595Network integration; Enabling network access in virtual machine instances

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Mobile Radio Communication Systems (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

The application discloses an affinity rule scheduling method, which comprises the steps of determining a target affinity rule according to received deployment information; detecting the target affinity rule by utilizing a preset affinity rule base; if the detection fails, repairing the target affinity rule by using a preset repairing strategy to obtain a target affinity rule passing the detection; carrying out rule scheduling by using the target affinity rule passed by the detection; the affinity rule scheduling method can effectively improve the success rate of deploying the affinity scheduling rules, realize more efficient affinity rule scheduling and avoid resource waste. The application also discloses an affinity rule scheduling device, equipment and a computer readable storage medium, which have the beneficial effects.

Description

Affinity rule scheduling method, device and related equipment
Technical Field
The present application relates to the field of cloud computing technologies, and in particular, to an affinity rule scheduling method, and further, to an affinity rule scheduling apparatus, a device, and a computer-readable storage medium.
Background
kubernets is an open-source application for managing containerization on multiple hosts in a cloud platform, with the goal of making deploying containerization applications simple and efficient, providing a mechanism for application deployment, planning, updating, and maintenance.
In a cloud platform based on Kubernetes, along with the increasing frequency of cloud platform deployment application, affinity scheduling has replaced the original directional scheduling mechanism. However, affinity scheduling has many problems, for example, an affinity scheduling rule set by a user may conflict with an existing rule, which causes scheduling failure and affects the use of the user; often, a user blindly deploys the Pod without knowing that the scheduling rule is unreasonable, and finally the deployment fails after waiting for the deployment for a long time, which wastes resources and affects the deployment progress. Therefore, the existing affinity rule scheduling has the defects of resource waste and time waste, and the realization efficiency is extremely low.
Therefore, how to effectively improve the success rate of deploying the affinity scheduling rules, achieve more efficient affinity rule scheduling, and avoid resource waste is a problem to be solved urgently by those skilled in the art.
Disclosure of Invention
The method can effectively improve the success rate of deploying the affinity scheduling rules, realize more efficient affinity rule scheduling and avoid resource waste; it is another object of the present application to provide an affinity rule scheduling apparatus, device and computer-readable storage medium, which also have the above-mentioned advantages.
In order to solve the above technical problem, in a first aspect, the present application provides an affinity rule scheduling method, including:
determining a target affinity rule according to the received deployment information;
detecting the target affinity rule by utilizing a preset affinity rule base;
if the detection fails, repairing the target affinity rule by using a preset repairing strategy to obtain a target affinity rule passing the detection;
and carrying out rule scheduling by using the target affinity rule passed by the detection.
Preferably, the detecting the target affinity rule by using a preset affinity rule base includes:
performing type identification on the target affinity rule to obtain a rule type;
and calling an affinity rule base corresponding to the rule type to detect the target affinity rule.
Preferably, the preset affinity rule base includes a Pod affinity rule base and an inter-node affinity rule base.
Preferably, the repairing the target affinity rule by using a preset repairing strategy to obtain a target affinity rule passing the detection includes:
carrying out node screening according to a preset screening rule to obtain a deployable node;
deploying the target affinity rule in each deployable node in sequence, and detecting the target affinity rule by using the preset affinity rule base until the detection is passed to obtain a target deployment node;
and deploying the target affinity rule at the target deployment node to obtain the target affinity rule which passes the detection.
Preferably, the node screening according to the preset screening rule to obtain the deployable node includes:
sequencing the nodes according to the priority of the affinity rule from high to low;
and selecting the nodes with the priority lower than the preset level of the affinity rule as the deployable nodes.
Preferably, the affinity rule scheduling method further includes:
when the target deployment node cannot be obtained based on the deployable node, judging whether the target affinity rule is a strong restriction rule;
and if so, modifying the strong restriction rule into a soft restriction rule, and returning to the step of detecting the target affinity rule by utilizing a preset affinity rule base.
Preferably, the affinity rule scheduling method further includes:
and storing the target affinity rule passing the detection to the preset affinity rule base.
In a second aspect, the present application further provides an affinity rule scheduling apparatus, including:
the rule determining module is used for determining a target affinity rule according to the received deployment information;
the rule detection module is used for detecting the target affinity rule by utilizing a preset affinity rule base;
the rule repairing module is used for repairing the target affinity rule by using a preset repairing strategy if the detection fails to obtain the target affinity rule passing the detection;
and the rule scheduling module is used for performing rule scheduling by using the target affinity rule passed by the detection.
In a third aspect, the present application further discloses an affinity rule scheduling device, including:
a memory for storing a computer program;
a processor for executing the computer program to implement the steps of any of the affinity rule scheduling methods described above.
In a fourth aspect, the present application also discloses a computer readable storage medium having stored therein a computer program for implementing the steps of any one of the affinity rule scheduling methods as described above when executed by a processor.
The affinity rule scheduling method comprises the steps of determining a target affinity rule according to received deployment information; detecting the target affinity rule by utilizing a preset affinity rule base; if the detection fails, repairing the target affinity rule by using a preset repairing strategy to obtain a target affinity rule passing the detection; and carrying out rule scheduling by using the target affinity rule passed by the detection.
Therefore, the affinity rule scheduling method provided by the application checks and automatically modifies the affinity rule before deployment of the affinity rule, so that the problem of deployment failure caused by unreasonable set affinity rules or conflict with the existing scheduling rules is solved, the successful deployment probability is improved, the resource waste is avoided, the affinity rule scheduling efficiency is improved, the deployment time is saved for users, and the user experience is improved.
The affinity rule scheduling device, and the computer-readable storage medium provided by the present application all have the above beneficial effects, and are not described herein again.
Drawings
In order to more clearly illustrate the technical solutions in the prior art and the embodiments of the present application, the drawings that are needed to be used in the description of the prior art and the embodiments of the present application will be briefly described below. Of course, the following description of the drawings related to the embodiments of the present application is only a part of the embodiments of the present application, and it will be obvious to those skilled in the art that other drawings can be obtained from the provided drawings without any creative effort, and the obtained other drawings also belong to the protection scope of the present application.
Fig. 1 is a schematic flowchart of an affinity rule scheduling method provided in the present application;
FIG. 2 is a schematic flow chart of another affinity rule scheduling method provided in the present application;
fig. 3 is a schematic structural diagram of an affinity rule scheduling apparatus provided in the present application;
fig. 4 is a schematic structural diagram of an affinity rule scheduling apparatus provided in the present application.
Detailed Description
The core of the application is to provide an affinity rule scheduling method, which can effectively improve the success rate of deploying affinity scheduling rules, realize more efficient affinity rule scheduling and avoid resource waste; another core of the present application is to provide an affinity rule scheduling apparatus, device and computer-readable storage medium, which also have the above-mentioned advantages.
In order to more clearly and completely describe the technical solutions in the embodiments of the present application, the technical solutions in the embodiments of the present application will be described below with reference to the drawings in the embodiments of the present application. It is to be understood that the embodiments described are only a few embodiments of the present application and not all embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
kubernets is an open-source application for managing containerization on multiple hosts in a cloud platform, with the goal of making deploying containerization applications simple and efficient, providing a mechanism for application deployment, planning, updating, and maintenance.
In a cloud platform based on Kubernetes, along with the increasing frequency of cloud platform deployment application, affinity scheduling has replaced the original directional scheduling mechanism. However, affinity scheduling has many problems, for example, an affinity scheduling rule set by a user may conflict with an existing rule, which causes scheduling failure and affects the use of the user; often, a user blindly deploys the Pod without knowing that the scheduling rule is unreasonable, and finally the deployment fails after waiting for the deployment for a long time, which wastes resources and affects the deployment progress. Therefore, the existing affinity rule scheduling has the defects of resource waste and time waste, and the realization efficiency is extremely low. Therefore, in order to solve the above technical problems, the present application provides an affinity rule scheduling method, which can effectively improve the affinity scheduling rule deployment success rate, achieve more efficient affinity rule scheduling, and avoid resource waste.
Referring to fig. 1, fig. 1 is a schematic flowchart of an affinity rule scheduling method provided in the present application, including:
s101: determining a target affinity rule according to the received deployment information;
this step aims to achieve the determination of the target affinity rule, which is the affinity rule that needs to be regularly scheduled. Specifically, when the user deploys the affinity rule, the system receives deployment information corresponding to the affinity rule, and thus, the system can analyze the deployment information to determine the target affinity rule.
S102: detecting the target affinity rule by using a preset affinity rule base;
this step is intended to implement target affinity rule detection to determine if there is an error in the deployment of the target affinity rule. Specifically, the method can be detected by using a preset affinity rule base, wherein the preset affinity rule base is a preset database which stores a large number of correct affinity rules, is stored in a preset storage space and can be directly called; each correct affinity rule may be acquired in advance, or may be an affinity rule that has been deployed and legally run, which is not limited in the present application. Further, when the target affinity rule needs to be detected, each correct affinity rule stored in the preset affinity rule base can be used for sequentially carrying out comparison analysis on the target affinity rule, if the affinity rule identical to the target affinity rule exists, the detection is passed, otherwise, the detection is failed, and the rule detection is completed.
As a preferred embodiment, the detecting the target affinity rule by using the preset affinity rule base may include: performing type identification on the target affinity rule to obtain a rule type; and calling an affinity rule base corresponding to the rule type to detect the target affinity rule.
The preferred embodiment provides a more specific method for detecting the target affinity rule. Specifically, affinity rules are divided into multiple types, and in order to realize rapid detection of affinity rules, different rule bases can be created according to the divisible types of the affinity rules, so that when rule detection is performed, type identification is performed on a target affinity rule first, the type to which the target affinity rule belongs, namely the rule type, is determined, and further, the affinity rule base corresponding to the rule type is called to perform detection on the target affinity rule. It can be understood that the specific partition type of the affinity rule does not affect the implementation of the technical solution, and the application does not limit this, and the more the type partition is refined, the higher the detection efficiency is.
As a preferred embodiment, the preset affinity rule base may include a Pod affinity rule base and an inter-node affinity rule base.
The preferred embodiment provides a more specific method for partitioning the type of the affinity rule, that is, the affinity rule is partitioned into a Pod affinity rule and an inter-node affinity rule, and correspondingly, the preset affinity rule base may include a Pod affinity rule base and an inter-node affinity rule base. Wherein Pod affinity refers to allowing a user to decide a scheduling policy through a label on a Pod that has already been run; inter-Node affinity refers to a constraint that allows a user to specify the scheduling of some Pod between nodes.
The Pod is a minimum unit that can be created and deployed in kubernets, is an application instance in a kubernets cluster, is always deployed on the same node (a host that the Pod really runs on, and may be a physical machine or a virtual machine), and includes one or more containers, supports various container environments, and also includes resources shared by various containers such as storage, network, and the like.
S103: if the detection fails, repairing the target affinity rule by using a preset repairing strategy to obtain a target affinity rule passing the detection;
the step aims to realize rule restoration after rule detection failure, specifically, when the target affinity rule is failed to be detected, the target affinity rule is indicated to have errors, at the moment, a preset restoration strategy can be called to restore the target affinity rule, and detection is carried out again until the target affinity rule passing detection is obtained, so that subsequent rule scheduling can be realized by using the target affinity rule passing detection. Therefore, before affinity rule scheduling, correctness detection and automatic repair are performed on the affinity rule, the probability of successful rule deployment is effectively ensured, and the rule scheduling efficiency is further improved.
As a preferred embodiment, the repairing the target affinity rule by using the preset repairing policy to obtain the target affinity rule passing the detection may include: carrying out node screening according to a preset screening rule to obtain a deployable node; deploying the target affinity rule in each deployable node in sequence, and detecting the target affinity rule by using a preset affinity rule base until the detection is passed to obtain a target deployment node; and deploying the target affinity rule at the target deployment node to obtain the target affinity rule passing the detection.
The preferred embodiment provides a more specific affinity rule repairing method, i.e., a more specific preset repairing strategy. Specifically, the affinity rule is deployed in the cloud platform cluster node, so that the node screening can be performed according to a certain screening rule to obtain a deployable node, and of course, the number of the deployable nodes is not unique and meets the deployment condition; further, rule deployment is tried on each deployable node in sequence, the target affinity rule is detected by using a preset affinity rule base in the deployment process, the deployable node passing the detection is used as the target deployment node, therefore, the target affinity rule can be deployed on the target deployment node, and the target affinity rule passing the detection can be obtained after the deployment is completed.
As a preferred embodiment, the performing node screening according to the preset screening rule to obtain a deployable node may include: sequencing the nodes according to the priority of the affinity rule from high to low; and selecting the nodes with the priority lower than the preset level of the affinity rule as the deployable nodes.
The preferred embodiment provides a specific type of preset screening rule to implement the screening of deployable nodes. Specifically, for each node in the cluster, the nodes with the priority lower than the preset level are obtained as deployable nodes by sequencing according to the priority of the affinity rule deployed by the node from high to low, that is, the bottom-layer node in the cluster is screened as a deployable node, so that the normal operation of the Pod scheduled in the cluster is effectively ensured. Of course, besides the screening method based on the priority of the affinity rule, the nodes can be sorted according to the deployment time, and the nodes relatively close to the current time are selected as the deployable nodes, because the nodes with earlier deployment time are likely to be already in a normal operation state, the influence on the normal operation of the original Pod can be avoided.
As a preferred embodiment, the affinity rule scheduling method may further include: when the target deployment node cannot be obtained based on the deployable node, judging whether the target affinity rule is a strong restriction rule; and if so, modifying the strong restriction rule into a soft restriction rule, and returning to the step of detecting the target affinity rule by utilizing the preset affinity rule base.
Although the nodes in the cluster are numerous, the situation that the target deployment node cannot be queried still exists, and in order to solve the problem, the target affinity rule can be modified, and the strong restriction rule which cannot meet the requirement is modified into the soft restriction rule, so that more deployable nodes can be queried, and the target deployment node can be queried in the numerous deployable nodes.
S104: and carrying out rule scheduling by using the target affinity rule passing the detection.
The method aims to realize rule scheduling, and after the rule is detected and is passed, the target affinity rule which is passed through the detection is directly utilized to carry out the rule scheduling, so that the resource waste caused by the failure of rule deployment is avoided.
As a preferred embodiment, the affinity rule scheduling method may further include: and storing the target affinity rule passing the detection to a preset affinity rule base.
The preferred embodiment provides another specific affinity rule scheduling method, which can update the preset affinity rule base and improve the integrity of data in the base. Specifically, the detected target affinity rule is stored in the preset affinity rule library.
Therefore, the affinity rule scheduling method provided by the application checks and automatically modifies the affinity rule before deployment of the affinity rule, so that the problem of deployment failure caused by unreasonable set affinity rules or conflict with the existing scheduling rules is solved, the successful deployment probability is improved, the resource waste is avoided, the affinity rule scheduling efficiency is improved, the deployment time is saved for users, and the user experience is improved.
On the basis of the foregoing embodiments, a more specific affinity rule scheduling method is provided in the embodiments of the present application, please refer to fig. 2, where fig. 2 is a schematic flow chart of another affinity rule scheduling method provided in the present application, and a specific implementation flow of the method is as follows:
1. the user sets the affinity rule of Pod, and the system identifies the type of the affinity rule:
(1) if the result is a Pod affinity rule, calling a Pod affinity rule base for checking;
(2) if the rule is an inter-node affinity rule, calling an inter-node affinity rule base for checking;
2. detection of affinity rules:
(1) if the detection is passed, recording the current affinity rule into a warehouse, and finishing scheduling according to the original scheduling rule;
(2) if the detection is not passed, entering a link of automatically modifying the affinity rule;
when detecting the Pod affinity rule, acquiring all related rules from a Pod affinity rule base, sequentially traversing all strong restriction rules, if the rules have no conflict, passing the inspection, otherwise, entering a link of automatically modifying the affinity rule; when the inter-node affinity rules are detected, all the rules are obtained from the inter-node affinity rule base, all the rules are traversed in sequence, if the rules have no conflict, the check is passed, and if not, the link of automatically modifying the affinity rules is entered.
3. Automatically modifying affinity rules:
the cluster nodes are sorted according to deployment time and/or priority levels, in order to preferentially ensure the normal operation of the Pod which is already scheduled in the cluster, the nodes at the bottom layer can be automatically traversed, and scheduling is attempted on the basis of not influencing the normal operation of the original Pod; if the nodes meeting the conditions are not found in all the nodes at the bottom layer, modifying the strong restriction rules which can not meet the conditions into soft restriction rules, and returning to the step 2.
The affinity rule scheduling method provided by the embodiment of the application checks and automatically modifies the affinity rule before the affinity rule is deployed, so that the problem of deployment failure caused by unreasonable set affinity rules or conflict with the existing scheduling rules is solved, the successful deployment probability is improved, the resource waste is avoided, the affinity rule scheduling efficiency is improved, the deployment time is saved for users, and the user experience is improved.
To solve the above technical problem, the present application further provides an affinity rule scheduling apparatus, please refer to fig. 3, where fig. 3 is a schematic structural diagram of the affinity rule scheduling apparatus provided in the present application, including:
the rule determining module 1 is used for determining a target affinity rule according to the received deployment information;
the rule detection module 2 is used for detecting the target affinity rule by utilizing a preset affinity rule base;
the rule repairing module 3 is used for repairing the target affinity rule by using a preset repairing strategy if the detection fails to obtain the target affinity rule passing the detection;
and the rule scheduling module 4 is used for performing rule scheduling by using the target affinity rule passing the detection.
Therefore, the affinity rule scheduling device provided in the embodiment of the application checks and automatically modifies the affinity rule before the affinity rule is deployed, so as to avoid the problem of deployment failure caused by unreasonable set affinity rules or conflict with existing scheduling rules, improve the deployment success probability, avoid resource waste, improve the affinity rule scheduling efficiency, save the deployment time for users, and improve the user experience.
As a preferred embodiment, the rule detecting module 2 may include:
the identification unit is used for carrying out type identification on the target affinity rule to obtain a rule type;
and the calling unit is used for calling the affinity rule base corresponding to the rule type to detect the target affinity rule.
As a preferred embodiment, the rule repairing module 3 may include:
the screening unit is used for screening the nodes according to a preset screening rule to obtain deployable nodes;
the detection unit is used for deploying the target affinity rule in each deployable node in sequence, detecting the target affinity rule by using a preset affinity rule base until the detection is passed, and acquiring a target deployment node;
and the deployment unit is used for deploying the target affinity rule at the target deployment node to obtain the target affinity rule passing the detection.
As a preferred embodiment, the screening unit may be specifically configured to sort the nodes in order of the priority of the affinity rule from high to low; and selecting the nodes with the priority lower than the preset level of the affinity rule as the deployable nodes.
As a preferred embodiment, the rule repairing module 3 may further include a modifying unit, configured to determine whether the target affinity rule is a strong constraint rule when the target deployment node cannot be obtained based on the deployable node; and if so, modifying the strong restriction rule into a soft restriction rule, and returning to the step of detecting the target affinity rule by utilizing the preset affinity rule base.
As a preferred embodiment, the affinity rule scheduling apparatus may further include a rule storage module, configured to store the target affinity rule passing the detection to a preset affinity rule base.
For the introduction of the apparatus provided in the present application, please refer to the above method embodiments, which are not described herein again.
To solve the above technical problem, the present application further provides an affinity rule scheduling apparatus, please refer to fig. 4, where fig. 4 is a schematic structural diagram of the affinity rule scheduling apparatus provided in the present application, and the affinity scheduling apparatus may include:
a memory 10 for storing a computer program;
the processor 20, when executing the computer program, may implement the steps of any of the affinity rule scheduling methods described above.
For the introduction of the device provided in the present application, please refer to the above method embodiment, which is not described herein again.
To solve the above problem, the present application further provides a computer-readable storage medium, on which a computer program is stored, and the computer program, when executed by a processor, can implement the steps of any one of the affinity rule scheduling methods described above.
The computer-readable storage medium may include: various media capable of storing 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.
For the introduction of the computer-readable storage medium provided in the present application, please refer to the above method embodiments, which are not described herein again.
The embodiments are described in a progressive manner in the specification, each embodiment focuses on differences from other embodiments, and the same and similar parts among the embodiments are referred to each other. The device disclosed by the embodiment corresponds to the method disclosed by the embodiment, so that the description is simple, and the relevant points can be referred to the method part for description.
Those of skill would further appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware, computer software, or combinations of both, and that the various illustrative components and steps have been described above generally in terms of their functionality in order to clearly illustrate this interchangeability of hardware and software. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present application.
The steps of a method or algorithm described in connection with the embodiments disclosed herein may be embodied directly in hardware, in a software module executed by a processor, or in a combination of the two. A software module may reside in Random Access Memory (RAM), memory, Read Only Memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.
The technical solutions provided by the present application are described in detail above. The principles and embodiments of the present application are explained herein using specific examples, which are provided only to help understand the method and the core idea of the present application. It should be noted that, for those skilled in the art, without departing from the principle of the present application, several improvements and modifications can be made to the present application, and these improvements and modifications also fall into the protection scope of the present application.

Claims (10)

1. An affinity rule scheduling method, comprising:
determining a target affinity rule according to the received deployment information;
detecting the target affinity rule by utilizing a preset affinity rule base;
if the detection fails, repairing the target affinity rule by using a preset repairing strategy to obtain a target affinity rule passing the detection;
and carrying out rule scheduling by using the target affinity rule passed by the detection.
2. The method according to claim 1, wherein the detecting the target affinity rule by using the preset affinity rule base comprises:
performing type identification on the target affinity rule to obtain a rule type;
and calling an affinity rule base corresponding to the rule type to detect the target affinity rule.
3. The method according to claim 2, wherein the preset affinity rule base comprises a Pod affinity rule base and an inter-node affinity rule base.
4. The method according to any one of claims 1 to 3, wherein the repairing the target affinity rule by using a preset repairing policy to obtain a target affinity rule passing detection comprises:
carrying out node screening according to a preset screening rule to obtain a deployable node;
deploying the target affinity rule in each deployable node in sequence, and detecting the target affinity rule by using the preset affinity rule base until the detection is passed to obtain a target deployment node;
and deploying the target affinity rule at the target deployment node to obtain the target affinity rule which passes the detection.
5. The affinity rule scheduling method according to claim 4, wherein the performing node screening according to the preset screening rule to obtain deployable nodes comprises:
sequencing the nodes according to the priority of the affinity rule from high to low;
and selecting the nodes with the priority lower than the preset level of the affinity rule as the deployable nodes.
6. The affinity rule scheduling method of claim 5, further comprising:
when the target deployment node cannot be obtained based on the deployable node, judging whether the target affinity rule is a strong restriction rule;
and if so, modifying the strong restriction rule into a soft restriction rule, and returning to the step of detecting the target affinity rule by utilizing a preset affinity rule base.
7. The affinity rule scheduling method of claim 1, further comprising:
and storing the target affinity rule passing the detection to the preset affinity rule base.
8. An affinity rule scheduling apparatus, comprising:
the rule determining module is used for determining a target affinity rule according to the received deployment information;
the rule detection module is used for detecting the target affinity rule by utilizing a preset affinity rule base;
the rule repairing module is used for repairing the target affinity rule by using a preset repairing strategy if the detection fails to obtain the target affinity rule passing the detection;
and the rule scheduling module is used for performing rule scheduling by using the target affinity rule passed by the detection.
9. An affinity rule scheduling apparatus, comprising:
a memory for storing a computer program;
a processor for executing the computer program for implementing the steps of the affinity rule scheduling method according to any of claims 1 to 7.
10. A computer-readable storage medium, in which a computer program is stored which, when being executed by a processor, is adapted to carry out the steps of the affinity rule scheduling method according to any one of claims 1 to 7.
CN202010469816.4A 2020-05-28 2020-05-28 Affinity rule scheduling method and device and related equipment Active CN111625338B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010469816.4A CN111625338B (en) 2020-05-28 2020-05-28 Affinity rule scheduling method and device and related equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010469816.4A CN111625338B (en) 2020-05-28 2020-05-28 Affinity rule scheduling method and device and related equipment

Publications (2)

Publication Number Publication Date
CN111625338A true CN111625338A (en) 2020-09-04
CN111625338B CN111625338B (en) 2024-01-19

Family

ID=72260238

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010469816.4A Active CN111625338B (en) 2020-05-28 2020-05-28 Affinity rule scheduling method and device and related equipment

Country Status (1)

Country Link
CN (1) CN111625338B (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112363816A (en) * 2020-11-26 2021-02-12 华东计算技术研究所(中国电子科技集团公司第三十二研究所) Deterministic scheduling method, system and medium for embedded multi-core operating system
CN112835645A (en) * 2021-02-05 2021-05-25 杭州迪普科技股份有限公司 Rule configuration method and device

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20020120744A1 (en) * 2001-02-28 2002-08-29 Chellis Eugene C. System and method for describing and automatically managing resources
CN105550036A (en) * 2015-12-09 2016-05-04 浪潮电子信息产业股份有限公司 Cloud computing based admission control algorithm
CN106462538A (en) * 2014-06-25 2017-02-22 华为技术有限公司 System and method for affinity-based network configuration
CN106471470A (en) * 2014-11-10 2017-03-01 华为技术有限公司 A kind of method and apparatus of the network function based on affinity of model-driven
CN107885579A (en) * 2017-11-13 2018-04-06 郑州云海信息技术有限公司 The load-balancing method and computer-readable recording medium of virtual machine
CN109189556A (en) * 2018-08-29 2019-01-11 郑州云海信息技术有限公司 A kind of compatibility rule conflict monitoring method and device based on load balancing
CN109254829A (en) * 2018-08-29 2019-01-22 郑州云海信息技术有限公司 A kind of compatibility rule verification method and device based on load balancing
CN111124619A (en) * 2019-12-25 2020-05-08 浙江大学 Container scheduling method for secondary scheduling

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20020120744A1 (en) * 2001-02-28 2002-08-29 Chellis Eugene C. System and method for describing and automatically managing resources
CN106462538A (en) * 2014-06-25 2017-02-22 华为技术有限公司 System and method for affinity-based network configuration
CN106471470A (en) * 2014-11-10 2017-03-01 华为技术有限公司 A kind of method and apparatus of the network function based on affinity of model-driven
CN105550036A (en) * 2015-12-09 2016-05-04 浪潮电子信息产业股份有限公司 Cloud computing based admission control algorithm
CN107885579A (en) * 2017-11-13 2018-04-06 郑州云海信息技术有限公司 The load-balancing method and computer-readable recording medium of virtual machine
CN109189556A (en) * 2018-08-29 2019-01-11 郑州云海信息技术有限公司 A kind of compatibility rule conflict monitoring method and device based on load balancing
CN109254829A (en) * 2018-08-29 2019-01-22 郑州云海信息技术有限公司 A kind of compatibility rule verification method and device based on load balancing
CN111124619A (en) * 2019-12-25 2020-05-08 浙江大学 Container scheduling method for secondary scheduling

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112363816A (en) * 2020-11-26 2021-02-12 华东计算技术研究所(中国电子科技集团公司第三十二研究所) Deterministic scheduling method, system and medium for embedded multi-core operating system
CN112363816B (en) * 2020-11-26 2022-08-16 华东计算技术研究所(中国电子科技集团公司第三十二研究所) Deterministic scheduling method, system and medium for embedded multi-core operating system
CN112835645A (en) * 2021-02-05 2021-05-25 杭州迪普科技股份有限公司 Rule configuration method and device
CN112835645B (en) * 2021-02-05 2022-09-30 杭州迪普科技股份有限公司 Rule configuration method and device

Also Published As

Publication number Publication date
CN111625338B (en) 2024-01-19

Similar Documents

Publication Publication Date Title
US8850393B2 (en) Method and apparatus for testing software
US8181173B2 (en) Determining priority for installing a patch into multiple patch recipients of a network
US7987146B2 (en) System and method for matching multi-node software system provisioning requirements and capabilities using rough set theory
US11218386B2 (en) Service ticket escalation based on interaction patterns
US10761816B2 (en) Method and system for determining interface compatibility based on component model
US20070220509A1 (en) System and method for deploying software based on matching provisioning requirements and capabilities
CN111625338B (en) Affinity rule scheduling method and device and related equipment
CN113672273B (en) Data processing method, system and equipment
CN112685275A (en) Algorithm strategy searching method and device, electronic equipment and storage medium
CN115576903B (en) File system construction method, computing device and storage medium
CN110674038A (en) Method and device for classifying error information in software test
CN112000539A (en) Inspection method and device
RU128741U1 (en) SYSTEM FOR FORMING SOLVING PROBLEMS OF FUNCTIONING COMPUTER SYSTEMS
CN113626044A (en) Service management method and device
CN110515852A (en) A kind of application update test method and relevant apparatus based on agile development
US12007881B2 (en) Method for populating spanner databases in test environments
CN111159006A (en) Automatic testing method and device
CN115617489B (en) Operating system migration method, migration application and migration application deployment method
CN111404715B (en) Network service instantiation method and device, electronic equipment and storage medium
US20230195605A1 (en) Method For Populating Spanner Databases In Test Environments
CN114217950B (en) Node scheduling state control method and system
CN115145691A (en) Container scheduling system and method based on kubernets multiple clusters
CN109409040B (en) Method and device for judging time reliability of operating system
CN107124331B (en) Large-scale server monitoring method and device based on mesh interconnection structure
CN114238080A (en) Software project quality prediction method, prediction system and medium

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