CN111625338B - Affinity rule scheduling method and device and related equipment - Google Patents

Affinity rule scheduling method and device and related equipment Download PDF

Info

Publication number
CN111625338B
CN111625338B CN202010469816.4A CN202010469816A CN111625338B CN 111625338 B CN111625338 B CN 111625338B CN 202010469816 A CN202010469816 A CN 202010469816A CN 111625338 B CN111625338 B CN 111625338B
Authority
CN
China
Prior art keywords
rule
affinity
affinity rule
target
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.)
Active
Application number
CN202010469816.4A
Other languages
Chinese (zh)
Other versions
CN111625338A (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

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

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 using 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; performing rule scheduling by utilizing the target affinity rule passing the detection; the affinity rule scheduling method can effectively improve the affinity rule deployment success rate, realize more efficient affinity rule scheduling and avoid resource waste. The application also discloses an affinity rule scheduling device, affinity rule scheduling equipment and a computer-readable storage medium, which have the beneficial effects.

Description

Affinity rule scheduling method and device and related equipment
Technical Field
The present disclosure relates to the field of cloud computing technologies, and in particular, to an affinity rule scheduling method, and also relates to an affinity rule scheduling apparatus, a device, and a computer-readable storage medium.
Background
kubernetes is an open-source application for managing containerization on multiple hosts in a cloud platform, with the goal of making deploying containerized applications simple and efficient, providing a mechanism for application deployment, planning, updating, and maintenance.
In cloud platforms based on Kubernetes, affinity scheduling has replaced the original directional scheduling mechanism as the deployment frequency of the cloud platforms increases. However, affinity scheduling has many problems, for example, affinity scheduling rules set by users may conflict with existing rules, resulting in scheduling failure and affecting use of users; users often blindly deploy Pod without knowing that the scheduling rules are unreasonable, wait for deployment for a long time, and finally fail to deploy, thereby wasting resources and affecting 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 affinity scheduling rules, realize more efficient affinity scheduling rules, and avoid resource waste is a problem to be solved by those skilled in the art.
Disclosure of Invention
The purpose of the application is to provide an affinity rule scheduling method, which can effectively improve the success rate of deploying affinity rule, realize more efficient affinity rule scheduling and avoid resource waste; it is another object of the present application to provide an affinity rule scheduling device, apparatus and computer-readable storage medium, which also have the above-mentioned advantageous effects.
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 using 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 utilizing the target affinity rule passing the detection.
Preferably, the detecting the target affinity rule using a preset affinity rule base includes:
performing type recognition 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 policy to obtain a target affinity rule passing detection includes:
node screening is carried out according to preset screening rules, and deployable nodes are obtained;
deploying the target affinity rules in each deployable node in turn, and detecting the target affinity rules by using the preset affinity rule base until the detection passes, so as 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.
Preferably, the node screening according to a preset screening rule to obtain a deployable node includes:
ordering the nodes according to the order of the priority of the affinity rule from high to low;
and selecting the node with the affinity rule priority lower than a preset level as the deployable node.
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 limit rule or not;
if yes, modifying the strong limit rule into a soft limit rule, and returning to the step of detecting the target affinity rule by using a preset affinity rule base.
Preferably, the affinity rule scheduling method further includes:
and storing the detected target affinity rules into 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 using 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, so as to obtain the target affinity rule passing the detection;
and the rule scheduling module is used for performing rule scheduling by utilizing the target affinity rule passing the detection.
In a third aspect, the present application also 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 which when executed by a processor is adapted to carry out the steps of any of the affinity rule scheduling methods described above.
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 using 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 utilizing the target affinity rule passing the detection.
Therefore, the affinity rule scheduling method provided by the application is firstly checked and automatically modified before affinity rule deployment is carried out, so that the problem of deployment failure caused by unreasonable set affinity rules or conflict with the existing scheduling rules is avoided, the probability of successful deployment is improved, resource waste is avoided, affinity rule scheduling efficiency is improved, deployment time is saved for users, and user experience is improved.
The affinity rule scheduling device, the affinity rule scheduling device and the affinity rule scheduling device have the beneficial effects and are not described in detail herein.
Drawings
In order to more clearly illustrate the prior art and the technical solutions in the embodiments of the present application, the following will briefly describe the drawings that need to be used in the description of the prior art and the embodiments of the present application. Of course, the following figures related to the embodiments of the present application are only some of the embodiments of the present application, and it is obvious to those skilled in the art that other figures can be obtained from the provided figures without any inventive effort, and the obtained other figures also belong to the protection scope of the present application.
FIG. 1 is a flow chart of an affinity rule scheduling method provided in the present application;
FIG. 2 is a flow chart of another affinity rule scheduling method provided in the present application;
FIG. 3 is a schematic diagram of an affinity rule scheduler according to the present application;
fig. 4 is a schematic structural diagram of an affinity rule scheduling device 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 rule, realize more efficient affinity rule scheduling and avoid resource waste; another core of the present application is to provide an affinity rule scheduling device, apparatus and computer-readable storage medium, which also have the above-mentioned advantageous effects.
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 will be apparent that the described embodiments are only some, but not all, of the embodiments of the present application. All other embodiments, which can be made by one of ordinary skill in the art without undue burden from the present disclosure, are within the scope of the present disclosure.
kubernetes is an open-source application for managing containerization on multiple hosts in a cloud platform, with the goal of making deploying containerized applications simple and efficient, providing a mechanism for application deployment, planning, updating, and maintenance.
In cloud platforms based on Kubernetes, affinity scheduling has replaced the original directional scheduling mechanism as the deployment frequency of the cloud platforms increases. However, affinity scheduling has many problems, for example, affinity scheduling rules set by users may conflict with existing rules, resulting in scheduling failure and affecting use of users; users often blindly deploy Pod without knowing that the scheduling rules are unreasonable, wait for deployment for a long time, and finally fail to deploy, thereby wasting resources and affecting 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 technical problems, the application provides an affinity rule scheduling method, which can effectively improve the success rate of deploying affinity rule, realize more efficient affinity rule scheduling and avoid resource waste.
Referring to fig. 1, fig. 1 is a flow chart of an affinity rule scheduling method provided in the present application, which includes:
s101: determining a target affinity rule according to the received deployment information;
the step aims at realizing the determination of a target affinity rule, namely, an affinity rule needing rule scheduling. Specifically, when a user deploys an affinity rule, the system receives deployment information corresponding to the affinity rule, and the system can parse the deployment information to determine a target affinity rule.
S102: detecting target affinity rules by using a preset affinity rule base;
this step aims at implementing target affinity rule detection to determine if there is an error in the deployment of the target affinity rule. Specifically, the method can detect the affinity rule by using a preset affinity rule base, wherein the preset affinity rule base is a preset database storing a large number of correct affinity rules, and the database is stored in a preset storage space and can be directly called; the correct affinity rules may be acquired in advance, or may be affinity rules that have been deployed and legally operated, which is not limited in this application. Further, when the target affinity rule needs to be detected, each correct affinity rule stored in the preset affinity rule library can be utilized to sequentially carry out comparison analysis on the target affinity rule, if the affinity rule which is the same as the target affinity rule exists, the detection is passed, otherwise, the detection is failed, and thus, the rule detection is completed.
As a preferred embodiment, the detecting the target affinity rule using the preset affinity rule base may include: performing type recognition on the target affinity rule to obtain a rule type; and detecting the target affinity rule by the affinity rule base corresponding to the calling rule type.
The preferred embodiment provides a more specific target affinity rule detection method. Specifically, in order to realize rapid detection of affinity rules, different rule bases can be created according to partitionable types of affinity rules, so that when rule detection is performed, firstly, type identification is performed on a target affinity rule, the type of the target affinity rule is determined, namely, the rule type is determined, and further, the affinity rule base corresponding to the rule type is called to detect the target affinity rule. It can be understood that the specific division type of the above affinity rule does not affect implementation of the technical solution, which is not limited in the present application, and the finer the type division is, 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 affinity rule type dividing method, namely, affinity rules are divided into Pod affinity rules and inter-node affinity rules, and correspondingly, the preset affinity rule base can comprise 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 tag on a Pod that has been operated; inter-Node affinity refers to a constraint that allows a user to specify that some Pod be scheduled between nodes (nodes).
The Pod is the smallest unit capable of being created and deployed in the Kubernetes, is an application instance in the Kubernetes cluster, is always deployed on the same node (a host machine which the Pod really operates on, may be a physical machine or a virtual machine), comprises one or more containers, supports multiple container environments, and further comprises 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 method aims at realizing rule repair after the rule detection failure, specifically, when the target affinity rule fails to detect, the target affinity rule is indicated to have errors, at the moment, a preset repair strategy can be called to repair the target affinity rule, and detection is repeated until the target affinity rule passing through detection is obtained, so that subsequent rule scheduling can be realized by utilizing the target affinity rule passing through detection. Therefore, before affinity rule scheduling is carried out, correctness detection and automatic repair are carried out on the affinity rule scheduling, so that the probability of successful rule deployment is effectively ensured, and the rule scheduling efficiency is further improved.
As a preferred embodiment, repairing the target affinity rule by using the preset repairing policy to obtain the target affinity rule passing the detection may include: node screening is carried out according to preset screening rules, and deployable nodes are obtained; deploying the target affinity rules in each deployable node in turn, and detecting the target affinity rules by using a preset affinity rule library until the detection passes, so as to obtain a target deployment node; and deploying the target affinity rule at the target deployment node to obtain the target affinity rule passing detection.
The preferred embodiment provides a specific affinity rule repairing method, namely a specific preset repairing strategy. Specifically, the affinity rule is deployed in the cloud platform cluster node, so node screening can be performed according to a certain screening rule to obtain deployable nodes, and the number of the deployable nodes is not unique, so that deployment conditions are satisfied; further, rule deployment is attempted on each deployable node in sequence, a preset affinity rule base is utilized to detect target affinity rules in the deployment process, and the deployable node passing through the detection is used as a target deployment node, so that the target affinity rules can be deployed on the target deployment node, and the target affinity rules passing through the detection can be obtained after the deployment is completed.
As a preferred embodiment, the node screening according to the preset screening rule to obtain the deployable node may include: ordering the nodes according to the order of the priority of the affinity rule from high to low; and selecting the nodes with affinity rule priority lower than a preset level as the deployable nodes.
The preferred embodiment provides a specific type of preset screening rule to achieve the screening of the deployable nodes. Specifically, for each node in the cluster, the nodes can be firstly sequenced according to the sequence from high priority to low priority of the affinity rule deployed by the nodes, so that the node with the priority lower than the preset level is obtained as the deployable node, namely, the bottom node in the cluster is screened as the 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 affinity rule priority, the nodes can be sorted according to deployment time, and the nodes relatively close to the current time are selected as the deployable nodes, because the nodes with earlier deployment time may be in a normal running state, and the influence on the normal running 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 limit rule or not; if yes, modifying the strong limit rule into a soft limit rule, and returning to the step of detecting the target affinity rule by using the preset affinity rule base.
Although the nodes in the cluster are numerous, there may still be a situation that the target deployment node cannot be queried, in order to solve the problem, the target affinity rule itself may be modified, and the strong constraint rule which cannot meet the requirement is modified into the soft constraint rule, so as to query more deployable nodes, and further query the target deployment node in the numerous deployable nodes.
S104: and carrying out rule scheduling by utilizing the detected target affinity rule.
The method aims at realizing rule scheduling, and after the rule detection is completed and passed, the rule scheduling is directly carried out by utilizing the target affinity rule passed by the detection, 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 detected target affinity rules into a preset affinity rule base.
The preferred embodiment provides another specific affinity rule scheduling method, which can realize the update of the preset affinity rule base and improve the integrity of data in the base. Specifically, the target affinity rule passing through the detection is stored in the preset affinity rule base.
Therefore, the affinity rule scheduling method provided by the application is firstly checked and automatically modified before affinity rule deployment is carried out, so that the problem of deployment failure caused by unreasonable set affinity rules or conflict with the existing scheduling rules is avoided, the probability of successful deployment is improved, resource waste is avoided, affinity rule scheduling efficiency is improved, deployment time is saved for users, and user experience is improved.
On the basis of the foregoing embodiments, the embodiments of the present application provide a more specific affinity rule scheduling method, please refer to fig. 2, fig. 2 is a flow chart of another affinity rule scheduling method provided by the present application, and the specific implementation flow chart is as follows:
1. the user sets affinity rules of Pod, and the system performs type recognition on the affinity rules:
(1) If the Pod affinity rule is the Pod affinity rule, calling a Pod affinity rule base to check;
(2) If the rule is the inter-node affinity rule, calling the inter-node affinity rule base to check;
2. detection affinity rules:
(1) If the detection is passed, the current affinity rule is recorded and put in storage, and the scheduling is completed according to the original scheduling rule;
(2) If the detection is not passed, entering an automatic affinity modification rule link;
when detecting Pod affinity rules, acquiring all related rules from a Pod affinity rule base, traversing all strong limit rules in sequence, if the rules have no conflict, checking, otherwise, entering an automatic affinity rule modification link; when the affinity rules among the nodes are detected, all the rules are acquired from an affinity rule base among the nodes, all the rules are traversed in sequence, if the rules have no conflict, the rules pass the inspection, and otherwise, an automatic affinity rule modification link is entered.
3. Automatically modifying affinity rules:
the cluster nodes are ordered according to the deployment time and/or the priority, so that the normal operation of the Pod scheduled in the cluster is guaranteed preferentially, the nodes at the bottom layer can be traversed automatically, and the scheduling is tried on the basis that the normal operation of the original Pod is not influenced; and if the nodes meeting the conditions are not found in all the nodes at the bottom layer, modifying the strong limit rule which cannot meet the conditions into a soft limit rule, 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 as to avoid the problem of deployment failure caused by unreasonable set affinity rules or conflict with the existing scheduling rules, thereby not only improving the probability of successful deployment, avoiding resource waste, but also improving the affinity rule scheduling efficiency, saving the deployment time for users and improving the user experience.
In order to solve the above technical problem, the present application further provides an affinity rule scheduling device, please refer to fig. 3, fig. 3 is a schematic structural diagram of the affinity rule scheduling device provided in the present application, including:
a rule determining module 1 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 using 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, so as to obtain the target affinity rule passing the detection;
and the rule scheduling module 4 is used for performing rule scheduling by utilizing the detected target affinity rule.
Therefore, the affinity rule scheduling device provided by the embodiment of the application checks and automatically modifies the affinity rule before deploying the affinity rule, so that the problem of deployment failure caused by unreasonable set affinity rules or conflict with the existing scheduling rules is avoided, the probability of successful deployment is improved, resource waste is avoided, affinity rule scheduling efficiency is improved, deployment time is saved for users, and user experience is improved.
As a preferred embodiment, the rule detection 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 preset screening rules to obtain deployable nodes;
the detection unit is used for deploying the target affinity rules in each deployable node in sequence, detecting the target affinity rules by using a preset affinity rule base until the detection passes, and obtaining 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 above screening unit may be specifically configured to sort the nodes in order of priority of affinity rule from high to low; and selecting the nodes with affinity rule priority lower than a preset level 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; if yes, modifying the strong limit rule into a soft limit rule, and returning to the step of detecting the target affinity rule by using the preset affinity rule base.
As a preferred embodiment, the affinity rule scheduling device may further comprise a rule storage module for storing the detected target affinity rule into a preset affinity rule base.
For the description of the apparatus provided in the present application, reference is made to the above method embodiments, and the description is omitted herein.
In order to solve the above technical problem, the present application further provides an affinity rule scheduling device, please refer to fig. 4, fig. 4 is a schematic structural diagram of an affinity rule scheduling device provided in the present application, and the affinity rule scheduling device may include:
a memory 10 for storing a computer program;
the processor 20 is configured to implement the steps of any of the affinity rule scheduling methods described above when executing a computer program.
For the description of the apparatus provided in the present application, reference is made to the above method embodiments, and the description is omitted herein.
To solve the above-mentioned problem, the present application further provides a computer readable storage medium, on which a computer program is stored, which when executed by a processor, can implement the steps of any of the affinity rule scheduling methods described above.
The computer readable storage medium may include: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a random access Memory (Random Access Memory, RAM), a magnetic disk, or an optical disk, or other various media capable of storing program codes.
For the description of the computer-readable storage medium provided in the present application, reference is made to the above method embodiments, and the description is omitted herein.
In the description, each embodiment is described in a progressive manner, and each embodiment is mainly described by the differences from other embodiments, so that the same similar parts among the embodiments are mutually referred. For the device disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant points refer to the description of the method section.
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 elements and steps are described above generally in terms of functionality in order to clearly illustrate the 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 solution. 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. The software modules may be disposed 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 scheme provided by the application is described in detail. Specific examples are set forth herein to illustrate the principles and embodiments of the present application, and the description of the examples above is only intended to assist in understanding the methods of the present application and their core ideas. It should be noted that it would be obvious to those skilled in the art that various improvements and modifications can be made to the present application without departing from the principles of the present application, and such improvements and modifications fall within the scope of the present application.

Claims (5)

1. An affinity rule scheduling method, comprising:
determining a target affinity rule according to the received deployment information;
detecting the target affinity rule by using a preset affinity rule base; the preset affinity rule base is used for storing standard affinity rules;
if the detection fails, repairing the target affinity rule by using a preset repairing strategy to obtain a target affinity rule passing the detection;
performing rule scheduling by utilizing the target affinity rule passing the detection;
wherein the detecting the target affinity rule by using a preset affinity rule base includes: performing type recognition on the target affinity rule to obtain a rule type; invoking an affinity rule base corresponding to the rule type to detect the target affinity rule; the preset affinity rule base comprises a Pod affinity rule base and an inter-node affinity rule base;
repairing the target affinity rule by using a preset repairing strategy to obtain a target affinity rule passing detection, wherein the repairing step comprises the following steps: node screening is carried out according to preset screening rules, and deployable nodes are obtained; deploying the target affinity rules in each deployable node in turn, and detecting the target affinity rules by using the preset affinity rule base until the detection passes, so as to obtain a target deployment node; deploying the target affinity rule at the target deployment node to obtain the target affinity rule passing the detection; when the target deployment node cannot be obtained based on the deployable node, judging whether the target affinity rule is a strong limit rule, if so, modifying the strong limit rule into a soft limit rule, and returning to the step of detecting the target affinity rule by using a preset affinity rule library;
the node screening is performed according to a preset screening rule to obtain a deployable node, which comprises the following steps: ordering the nodes according to the order of the priority of the affinity rule from high to low; and selecting the node with the affinity rule priority lower than a preset level as the deployable node.
2. The affinity rule scheduling method of claim 1, further comprising:
and storing the detected target affinity rules into the preset affinity rule base.
3. An affinity rule scheduling device, 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 using a preset affinity rule base; the preset affinity rule base is used for storing standard affinity rules;
the rule repairing module is used for repairing the target affinity rule by using a preset repairing strategy if the detection fails, so as to obtain the target affinity rule passing the detection;
the rule scheduling module is used for performing rule scheduling by utilizing the target affinity rule passing the detection;
the rule detection module is specifically configured to perform type recognition on the target affinity rule to obtain a rule type; invoking an affinity rule base corresponding to the rule type to detect the target affinity rule; the preset affinity rule base comprises a Pod affinity rule base and an inter-node affinity rule base;
the rule repairing module is specifically used for carrying out node screening according to preset screening rules to obtain deployable nodes; deploying the target affinity rules in each deployable node in turn, and detecting the target affinity rules by using the preset affinity rule base until the detection passes, so as to obtain a target deployment node; deploying the target affinity rule at the target deployment node to obtain the target affinity rule passing the detection; when the target deployment node cannot be obtained based on the deployable node, judging whether the target affinity rule is a strong limit rule, if so, modifying the strong limit rule into a soft limit rule, and returning to the step of detecting the target affinity rule by using a preset affinity rule library;
the rule repairing module is specifically configured to sort the nodes according to the order of the affinity rule priority from high to low; and selecting the node with the affinity rule priority lower than a preset level as the deployable node.
4. An affinity rule scheduling device, comprising:
a memory for storing a computer program;
a processor for executing the computer program to implement the steps of the affinity rule scheduling method of claim 1 or 2.
5. A computer readable storage medium, characterized in that the computer readable storage medium has stored therein a computer program which, when executed by a processor, is adapted to carry out the steps of the affinity rule scheduling method according to claim 1 or 2.
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 CN111625338A (en) 2020-09-04
CN111625338B true 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)

Families Citing this family (2)

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

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
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

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6901446B2 (en) * 2001-02-28 2005-05-31 Microsoft Corp. System and method for describing and automatically managing resources

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
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

Also Published As

Publication number Publication date
CN111625338A (en) 2020-09-04

Similar Documents

Publication Publication Date Title
US9069903B2 (en) Multi-platform test automation enhancement
US20080168436A1 (en) System and method for matching multi-node software system provisioning requirements and capabilities using rough set theory
CN111625338B (en) Affinity rule scheduling method and device and related equipment
US20080229284A1 (en) Method and Apparatus for Testing Software
US10761816B2 (en) Method and system for determining interface compatibility based on component model
US20080270515A1 (en) Method and apparatus for migrating the system environment on which the applications depend
CN110046029A (en) Data processing method and device applied to multi-level buffer in cluster
US20050120344A1 (en) Optimal component installation
CN107589951A (en) A kind of cluster upgrade method and device
CN106095483A (en) The Automation arranging method of service and device
CN115576903B (en) File system construction method, computing device and storage medium
CN110674038A (en) Method and device for classifying error information in software test
CN113672273B (en) Data processing method, system and equipment
RU128741U1 (en) SYSTEM FOR FORMING SOLVING PROBLEMS OF FUNCTIONING COMPUTER SYSTEMS
CN113672337B (en) Application migration method, device, equipment and computer readable storage medium
CN113076248A (en) Application processing method, device and equipment and readable storage medium
CN114217950B (en) Node scheduling state control method and system
CN115617489B (en) Operating system migration method, migration application and migration application deployment method
CN111159006A (en) Automatic testing method and device
CN115145691A (en) Container scheduling system and method based on kubernets multiple clusters
CN111464580B (en) Method and device for selecting main server
CN115643196A (en) Service cloud high-availability network access evaluation method and device and computing equipment
CN117033214A (en) Regression testing method, regression testing device, electronic equipment and storage medium
CN114238080A (en) Software project quality prediction method, prediction system and medium
WO2023122082A1 (en) Method for populating spanner databases in test environments

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