CN113301068A - Method, system, device, cluster and medium for managing cluster resources - Google Patents

Method, system, device, cluster and medium for managing cluster resources Download PDF

Info

Publication number
CN113301068A
CN113301068A CN202010266288.2A CN202010266288A CN113301068A CN 113301068 A CN113301068 A CN 113301068A CN 202010266288 A CN202010266288 A CN 202010266288A CN 113301068 A CN113301068 A CN 113301068A
Authority
CN
China
Prior art keywords
resource
definition
constraint
cluster
resources
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.)
Pending
Application number
CN202010266288.2A
Other languages
Chinese (zh)
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.)
Alibaba Group Holding Ltd
Original Assignee
Alibaba Group Holding 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 Alibaba Group Holding Ltd filed Critical Alibaba Group Holding Ltd
Priority to CN202010266288.2A priority Critical patent/CN113301068A/en
Publication of CN113301068A publication Critical patent/CN113301068A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • 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
    • 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
    • H04L67/1001Protocols in which an application is distributed across nodes in the network for accessing one among a plurality of replicated servers
    • 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
    • H04L67/104Peer-to-peer [P2P] networks
    • H04L67/1074Peer-to-peer [P2P] networks for supporting data block transmission mechanisms
    • 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
    • H04L67/1097Protocols in which an application is distributed across nodes in the network for distributed storage of data in networks, e.g. transport arrangements for network file system [NFS], storage area networks [SAN] or network attached storage [NAS]

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The embodiment of the specification discloses a method, a system, equipment, a cluster and a medium for managing cluster resources. The method comprises the following steps: collecting actual states of resources in a cluster; checking whether the actual state of the resource in the cluster is in conflict with the resource attribute definition in the resource attribute definition information base and the resource constraint definition in the resource constraint definition information base; in the event of a conflict, the actual state of the resource is repaired to eliminate the conflict.

Description

Method, system, device, cluster and medium for managing cluster resources
Technical Field
This description relates to computer clustering technology and, more particularly, to methods and systems, devices, clusters, and media for managing cluster resources.
Background
A cluster is a collection of logically grouped computer resources that operate as a unit, possibly an independent physical cluster, or a logical cluster group that contains multiple physical clusters. The resources of the cluster refer to various physical and logical resources of the computer required for forming the cluster, including infrastructure resources of the bottom layer, such as hardware, virtual machines, and the like, and also including security groups, virtual network groups, and the like. The kubernets cluster (referred to as K8s cluster in the industry for short) is a cluster built based on an open-source kubernets container orchestration engine.
The resources of a cluster are diverse, and particularly for a kubernets cluster, it depends more on complex and diverse resources, including, for example, a physical machine or a virtual machine for running control plane and data plane components, a load balancer required for providing externally exposed services or API (Application Programming Interface) servers required for managing the cluster, a physical or logical security group for network isolation, and the like.
In order to form a fully operational cluster, the attributes of the resources are generally required to be set, and the resources often have a relatively complex constraint relationship with each other, for example, a load balancer associated with an externally exposed service provided in the cluster often cannot be the same as a load balancer required by an API server required for managing the cluster, otherwise, a port collision or the like is caused. Attribute definitions and constraint relationships of resources in a cluster are easily configured incorrectly or deleted incorrectly, and therefore, there is a need to provide a method for uniformly managing cluster resources to better and more flexibly manage and coordinate the cluster resources.
Disclosure of Invention
The invention aims to provide a technical scheme for managing cluster resources so as to better coordinate the cluster resources.
According to a first aspect of the present disclosure, there is provided a method of managing cluster resources, comprising the steps of:
collecting actual states of resources in a cluster;
checking whether the actual state of the resource in the cluster is in conflict with the resource attribute definition in the resource attribute definition information base and the resource constraint definition in the resource constraint definition information base;
in the event of a conflict, the actual state of the resource is repaired to eliminate the conflict.
Optionally, the method further comprises:
receiving resource attribute definitions defined by a user based on a declarative manner and storing the resource attribute definitions into a resource attribute definition information base;
resource constraint definitions defined by a user based on a declarative manner are received and stored in a resource constraint definition information base.
Optionally, the resource constraint definition comprises a definition of a constraint relationship between the resource attribute constraint definition and the resource.
Optionally, the resources include physical devices required for cluster operation and logical functional unit components on which cluster operation depends.
Optionally, the storing the resource attribute definition in a resource attribute definition information base includes: and carrying out deduplication processing on the resource attribute definition.
Optionally, the storing the resource constraint definition in a resource constraint definition information base includes: and merging and de-duplicating the resource constraint definition.
Optionally, the collecting the actual state of the resource in the cluster comprises:
the actual status of the resources in the cluster is collected in a round robin fashion.
Optionally, before performing the inspection, the method further comprises: and summarizing the actual state of the resources in the cluster, wherein the summarizing comprises the de-duplication processing and the grouping processing.
Optionally, the method further comprises: providing a constraint definition template and a constraint definition engine for parsing the constraint definition template; the constraint definition template is for invocation by a user to generate the resource constraint definition.
Optionally, the constraint definition engine is configured to be pluggable.
According to a second aspect of the present disclosure, there is provided a system for managing cluster resources, comprising:
a resource status collection unit for collecting actual status of resources in the cluster;
the monitoring unit is used for checking whether conflicts exist among the actual state of the resources in the cluster, the resource attribute definitions in the resource attribute definition information base and the resource constraint definitions in the resource constraint definition information base; and controlling the resource state repairing unit to repair the actual state of the resource to eliminate the conflict if the conflict exists.
Optionally, the system further comprises:
the resource definition processing unit is used for receiving the resource attribute definition defined by the user based on the declarative mode and storing the resource attribute definition into the resource attribute definition information base;
and the constraint definition processing unit is used for receiving the resource constraint definition defined by the user based on the declarative mode and storing the resource constraint definition into the resource constraint definition information base.
Optionally, the resource constraint definition comprises a definition of a constraint relationship between the resource attribute constraint definition and the resource.
Optionally, the resources include physical devices required for cluster operation and logical functional unit components on which cluster operation depends.
Optionally, the storing the resource attribute definition in a resource attribute definition information base includes: and carrying out deduplication processing on the resource attribute definition.
Optionally, the storing the resource constraint definition in a resource constraint definition information base includes: and merging and de-duplicating the resource constraint definition.
Optionally, the collecting the actual state of the resource in the cluster comprises:
the actual status of the resources in the cluster is collected in a round robin fashion.
Optionally, a resource status aggregation unit;
and the resource state aggregation unit is used for summarizing the actual states of the resources collected by the resource state collection unit so as to facilitate the inspection of the monitoring unit, and the summarizing process comprises deduplication processing and grouping processing.
Optionally, the system further comprises: a constraint definition template and a constraint definition engine for parsing the constraint definition template; the constraint definition template is for invocation by a user to generate the resource constraint definition.
Optionally, the constraint definition engine is configured to be pluggable.
Optionally, the monitoring unit is configured in a pluggable mode.
According to a third aspect disclosed herein, there is provided an apparatus for managing cluster resources, comprising a processor and a memory; the memory has stored therein computer instructions which, when executed by the processor, implement the method disclosed in the first aspect of the invention.
According to a fourth aspect disclosed in the present specification, there is provided a cluster comprising the system disclosed in the second aspect of the present invention or the apparatus disclosed in the third aspect of the present invention.
According to a fifth aspect disclosed in the present specification, there is provided a computer readable storage medium having stored thereon computer instructions which, when executed by a processor, implement the method disclosed in the first aspect of the present invention.
Features of embodiments of the present specification and advantages thereof will become apparent from the following detailed description of exemplary embodiments thereof, which proceeds with reference to the accompanying drawings.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments of the specification and together with the description, serve to explain the principles of the embodiments of the specification.
FIG. 1 is a flow chart of a method for managing cluster resources provided by an embodiment of the present specification;
FIG. 2 is a schematic diagram of a system for managing cluster resources provided by embodiments of the present specification;
fig. 3 is a block diagram of an apparatus for managing a cluster resource according to an embodiment of the present specification.
Detailed Description
Various exemplary embodiments of the present specification will now be described in detail with reference to the accompanying drawings.
The following description of at least one exemplary embodiment is merely illustrative in nature and is in no way intended to limit the embodiments, their application, or uses.
It should be noted that: like reference numbers and letters refer to like items in the following figures, and thus, once an item is defined in one figure, further discussion thereof is not required in subsequent figures.
Traditional cluster resource coordination management mechanisms, such as KubeVirt plug-in based resource management for kubernets clusters, may provide users with the same capabilities for managing traditional virtual machine workloads as container workloads. These conventional cluster resource coordination management mechanisms have the following disadvantages:
there is no unified way to define various resources that the cluster depends on and the constraint relationship between these resources, and often a hard coding way is adopted to embed the resource attribute definition and the resource constraint relationship in the management and control logic, which has no flexibility.
The inspection policies for inspecting the resource attributes and their constraint relationships are tightly coupled with the resource management and control logic, resulting in the inability to flexibly define and modify the inspection policies, and once the inspection policies change, the resource management and control logic needs to be completely redeployed.
The resource is defined by using a flow command type definition mode, the mode cannot record the process state in execution and the expected final state, the process state and the expected final state cannot be compared with the actual state of the resource, and the actual state of the resource cannot be repaired under the condition that the definition is not effective.
Flexible resource attribute definition and resource constraint definition cannot be realized, and flexible resource operation coordination cannot be realized.
The embodiment of the invention aims to provide a method for uniformly managing cluster resources so as to manage and coordinate the cluster resources more flexibly.
< method for managing cluster resources >
The resources referred to in the embodiments of the present invention include physical devices required for cluster operation and logical functional unit components on which cluster operation depends.
Referring to fig. 1, an embodiment of the present invention provides a method for managing cluster resources, where the method includes the following steps:
s102, receiving the resource attribute definition defined by the user based on the declarative mode and storing the resource attribute definition into the resource attribute definition information base.
That is, the embodiment of the present invention defines the attribute information of the resource by using the custom resource description file.
In embodiments of the present invention, the format of the resource attribute definition implementation includes, but is not limited to, YAML format or JSON format commonly used in the kubernets field.
Two specific examples of resource attribute definitions are given below:
example one: for the load balancer, the resource definition implemented by using YAML format is specifically as follows:
Figure BDA0002441378720000051
Figure BDA0002441378720000061
the API version number is an API version number used to indicate to which API group and version the resource currently to be defined belongs.
king indicates the resource type, which in example one is a load balancer (LoadBalancer).
metadata is metadata that indicates the general attributes of the resource of that category. Name under metadata is the name of this type of resource.
spec is the personalized attribute of the resource. Id under spec is the unique identifier of the resource, zone is the domain supported by the resource, and bandwidth is the bandwidth allocated to the resource.
The master under the zone is a master domain supported by the resource, and the slave is a slave domain supported by the resource.
Example two: for a certain Kubernetes service, the resource definition realized by using the JSON format is specifically as follows:
Figure BDA0002441378720000062
Figure BDA0002441378720000071
the API version number is an API version number used to indicate to which API group and version the resource currently to be defined belongs.
And king indicates the category of the resource.
metadata is metadata that indicates the general attributes of the resource of that category. Name under metadata is the name of this type of resource.
spec is the personalized attribute of the resource. Id under spec is the unique identifier of the resource, name is the name of the resource, and ports are the ports corresponding to the resource.
The name under the port is the name corresponding to the port, the protocol is the protocol type supported by the port, and the port is a specific port number.
The same user or different users may submit a plurality of resource attribute definitions that are partially the same or all the same, and the resource attribute definitions may be deduplicated when stored in the resource attribute definition information base in step 102.
In the embodiment of the present invention, the implementation manner of the resource attribute definition information base may include, but is not limited to, distributed data storage.
And S104, receiving the resource constraint definition defined by the user based on the declarative mode and storing the resource constraint definition into a resource constraint definition information base.
That is, the embodiment of the present invention defines the resource constraint definition by using the custom resource description file.
In an embodiment of the present invention, a resource constraint definition may be a definition of a constraint on an attribute of a single resource. For example, a prefix specifying a resource name in the constraint definition should comply with certain rules. In the embodiment of the invention, the constraint of the attribute of a single resource can be defined more complexly according to the actual requirement. In the embodiment of the invention, the attribute of a single resource in a specific time period can be restricted.
In the embodiment of the present invention, the resource constraint definition may be a definition of a constraint relationship between multiple resources. For example, a load balancer that defines a cluster critical component in the constraint definition can only be used by one component and not by multiple components simultaneously. In the embodiment of the invention, the constraint relation among a plurality of resources can be defined more complexly according to actual requirements. In the embodiment of the present invention, the attribute of a certain type of resource or a certain type of resource at a specific time point may be restricted, and the attribute of a certain type of resource or a certain type of resource within a specific time period may be restricted.
In embodiments of the present invention, the format of the resource constraint definition implementation includes, but is not limited to, YAML format or JSON format commonly used in the kubernets field.
Two specific examples of resource constraint definitions are given below:
example three: for a Kubernetes service, to ensure that the service follows a specific protocol during use, a constraint definition needs to be performed on its name, and its name prefix must begin with a grpc. The resource definition implemented using the JSON format is specifically as follows:
Figure BDA0002441378720000081
the API version number is used to indicate to which API group and version the constraint currently to be defined belongs.
And king indicates the category of the constraint, and the third example is the name constraint of the service port.
metadata is metadata that indicates the general attributes of the constraints for that category. The name under Metadata is the name of the constraint for that category.
spec is the personalized attribute of the constraint. Match under Spec indicates the resource for which the constraint is directed, resource followed by the name of the resource, which in example three is a certain kubernets service.
rules is a specific constraint rule for the constraint. Name under rules is the name of the rule, context is the context in which the rule works, alert indicates the specific rule content, and the rule content in example three is: the naming convention for this resource is that it needs to start with "grpc".
Example four: among the multiple component resources, it is guaranteed that the load balancer cannot be multiplexed. The definition implemented using the YAML format is specifically as follows:
Figure BDA0002441378720000091
the API version number is used to indicate to which API group and version the constraint currently to be defined belongs.
And king indicates the category of the constraint, and the example four is a single resource use constraint.
metadata is metadata that indicates the general attributes of the constraints for that category. Name under Metadata is the name of the constraint for that class, and example four is that the load balancer can only be used by one component.
spec is the personalized attribute of the constraint. Match under Spec indicates the resource for which the constraint is directed, resource is used to indicate the resource object, which in example four is the load balancer.
rules is a specific constraint rule for the constraint. Name under rules is the name of the rule, context is the context in which the rule works, alert indicates the specific rule content, and the rule content in example four is: the load balancer can only be used by one component.
The same user or different users may submit a plurality of partially identical or completely identical resource constraint definitions, and the resource constraint definitions may be deduplicated when stored in the resource constraint definition information base in step 104.
In step 104, when the resource constraint definitions are stored in the resource constraint definition information base, the resource constraint definitions may be merged. For example, if a first resource constraint definition constrains the A1 attribute of resource A and a second resource constraint definition constrains the A2 attribute of resource A, then the two resource constraint definitions can be combined for ease of management and lookup.
In the embodiment of the present invention, the manner of implementing the resource constraint definition information base may include, but is not limited to, distributed data storage.
Based on step S102 and step S104, the embodiment of the present invention provides an declarative method for defining various resources relied on by a cluster and a constraint relationship between the resources.
In one specific example, a constraint definition template and a constraint definition engine for parsing the constraint definition template are provided. The constraint definition template can provide the expected input parameters and the context required for enforcing the constraint rule, and the user can rapidly generate the resource constraint definition by calling the constraint definition template.
The constraint definition engine can be realized in a pluggable mode to support constraint definition under different systems. Based on the constraint definition engine, a user can define different constraint definition strategies and execution rules to form a constraint definition template, so that the user can conveniently and quickly generate the resource constraint definition by subsequently calling the constraint definition template.
A specific example of a constraint definition template is given below, which is implemented using the YAML format:
Figure BDA0002441378720000101
Figure BDA0002441378720000111
the API version number is used to indicate to which API group and version the constraint currently to be defined belongs. crd are custom resource definitions and targets are targets. target indicates target correspondence and alert indicates specific rule content. listkid is a form, Plural is a plurality, singular is singular, validation is verification, openAPIV3Schema is an openapi-3.0 functional component, properties is a class, items is an entry, type is a data type, name is a name, and match indicates a matching object.
S106, collecting the actual state of the resources in the cluster.
In a specific example, in step S106, the actual status of the resources in the cluster is collected in a polling manner. The actual state of the resource includes a real-time value, a statistical value, etc. of the actual state of the resource.
The statistics of the actual state of the resource may include statistics of the actual state of the individual resource over a particular time period. Such as an average, maximum, minimum, variance, etc. of the actual state of a resource over a period of time. For example, the average, maximum, minimum, etc. of the CPU resource usage consumed by a particular container over a certain period of time.
The statistics of the actual state of the resource may include statistics of the actual state of a certain type of resource or of certain resources at a particular point in time. Such as an average, a maximum, a minimum, etc. of the actual state of a certain class of resources or of certain resources at a certain point in time. For example, the CPU resource usage consumed by a certain group of containers with name or APP tags may be an average, a maximum, a minimum, or the like at a certain point in time.
The statistics of the actual state of the resource may include statistics of the actual state of a certain type of resource or a certain type of resource over a certain period of time. Such as a certain class of resources or an overall average of certain resources over a certain time period, etc. For example, the CPU resource usage consumed by a certain group of containers with name or APP tags may be an average, maximum, minimum, etc. over a certain period of time.
In one specific example, step S106 includes steps S1061-S1062.
S1061, collecting the actual state of the resources in the cluster in a polling mode.
S1062, summarizing the actual states of the resources in the cluster, wherein the summarizing comprises the duplicate removal processing and the grouping processing. The grouping process may be, for example, grouping the actual states of the same type of resource to facilitate the subsequent verification alignment process.
S108, checking whether the actual state of the resource in the cluster is in conflict with the resource attribute definition in the resource attribute definition information base and the resource constraint definition in the resource constraint definition information base.
In a specific example, when the resource attribute definition in the resource attribute definition information base and the resource constraint definition in the resource constraint definition information base are updated, the actual state of the resource involved in the change is filtered from the collected data, and whether the actual state of the resource meets the definition requirement or not can be checked.
And S110, under the condition that the conflict exists, repairing the actual state of the resource to eliminate the conflict.
And repairing the actual state of the resource to eliminate the conflict, namely modifying the actual state of the resource according to the resource attribute definition in the resource attribute definition information base and the resource constraint definition in the resource constraint definition information base, so that the conflict does not exist between the actual state of the resource in the cluster and the resource attribute definition in the resource attribute definition information base and the resource constraint definition in the resource constraint definition information base.
Based on steps S108 to S110, the embodiment of the present invention provides a resource management scheme capable of self-repairing, which can correct the actual state of a resource according to the definition stated by a user, so that a cluster has a self-repairing capability in both the resource attribute and the constraint relationship.
The embodiment of the invention provides a self-adaptive coordination cluster resource and a constraint method thereof, which support the management of the whole life cycle of the cluster resource in a unified mode, and comprise the attribute definition of the cluster resource, the attribute constraint of the resource, the dependency constraint among the resources and the like.
The cluster involved in the method for managing cluster resources provided by the embodiment of the present invention may be a Kubernetes cluster.
< System for managing Cluster resources >
Fig. 2 is a block diagram of a system for managing cluster resources provided by embodiments of the present specification. As shown in fig. 2, the system 100 for managing cluster resources comprises:
a resource status collection unit 111 for collecting the actual status of the resources in the cluster. Alternatively, the resource status collection unit 111 collects the actual status of the resources in the cluster in a polling manner.
And the resource state aggregation unit 110 is configured to aggregate the actual states of the resources collected by the resource state collection unit 111 so as to be checked by the monitoring unit 103. Optionally, the aggregation processing includes deduplication processing and grouping processing.
A monitoring unit 103, configured to check whether there is a conflict between the actual state of the resource in the cluster and the resource attribute definition in the resource attribute definition information base 105 and the resource constraint definition in the resource constraint definition information base 107. The monitoring unit 103 controls the resource status repair unit 112 to repair the actual status of the resource to eliminate the conflict, in case there is a conflict.
The system 100 for managing cluster resources further comprises: a constraint definition template 109 and a constraint definition engine 108 for parsing the constraint definition template 109. The constraint definition template 109 is used for invocation by a user to generate a resource constraint definition.
In one example, the system 100 for managing cluster resources may further include:
a resource definition processing unit 104, configured to receive the resource attribute definition 101 defined by the user based on the declarative manner and store the resource attribute definition 101 in the resource attribute definition information base 105. Alternatively, the resource definition processing unit 104 performs deduplication processing on the resource attribute definitions 101 when storing the resource attribute definitions 101 in the resource attribute definition information base 105.
A constraint definition processing unit 106, configured to receive the resource constraint definition 103 defined by the user based on the declarative manner and store the resource constraint definition 103 in the resource constraint definition information base 107. Optionally, the constraint definition processing unit 106 performs merging and deduplication processing on the resource constraint definitions 102 when storing the resource constraint definitions 102 in the resource constraint definition information base 107.
Optionally, the resource constraint definition comprises a definition of a constraint relationship between the resource attribute constraint definition and the resource.
Optionally, the resources include physical devices required for cluster operation and logical functional unit components on which the cluster operates.
In the embodiment of the present invention, the monitoring unit 103 may control the resource definition processing unit 104 and the constraint definition processing unit 106, and through the monitoring unit 103, a user may set a specific combination manner of the constraint definition processing unit 106 for the resource constraint definition.
In embodiments of the present invention, the constraint definition engine 108 and the monitoring unit 103 may be configured in a pluggable mode.
The cluster involved in the system for managing cluster resources provided by the embodiment of the present invention may be a Kubernetes cluster.
< apparatus for managing cluster resources >
Referring to fig. 3, an embodiment of the present invention provides an apparatus for managing cluster resources, which includes a processor 31 and a memory 32. The memory 32 stores computer instructions, which when executed by the processor 31 implement the cluster resource management method disclosed in any of the foregoing embodiments.
The cluster involved in the device for managing cluster resources provided by the embodiment of the present invention may be a Kubernetes cluster.
< clustering >
The embodiment of the invention provides a cluster, which comprises the system for managing cluster resources disclosed by any one of the embodiments.
An embodiment of the present invention provides a cluster, including the device for managing cluster resources disclosed in any of the foregoing embodiments.
The cluster related to the embodiment of the invention can be a Kubernetes cluster.
< group of computer-readable storage media >
An embodiment of the present invention provides a computer-readable storage medium, on which computer instructions are stored, and when the computer instructions are executed by a processor, the cluster resource management method disclosed in any of the foregoing embodiments is implemented.
The embodiments in the present specification are described in a progressive manner, and the same and similar parts among the embodiments are referred to each other, and each embodiment focuses on the differences from the other embodiments. In particular, as for the system and apparatus embodiments, since they are substantially similar to the method embodiments, the description is relatively simple, and reference may be made to some descriptions of the method embodiments for relevant points.
The foregoing description has been directed to specific embodiments of this disclosure. Other embodiments are within the scope of the following claims. In some cases, the actions or steps recited in the claims may be performed in a different order than in the embodiments and still achieve desirable results. In addition, the processes depicted in the accompanying figures do not necessarily require the particular order shown, or sequential order, to achieve desirable results. In some embodiments, multitasking and parallel processing may also be possible or may be advantageous.
Embodiments of the present description may be systems, methods, and/or computer program products. The computer program product may include a computer-readable storage medium having computer-readable program instructions embodied thereon for causing a processor to implement aspects of embodiments of the specification.
The computer readable storage medium may be a tangible device that can hold and store the instructions for use by the instruction execution device. The computer readable storage medium may be, for example, but not limited to, an electronic memory device, a magnetic memory device, an optical memory device, an electromagnetic memory device, a semiconductor memory device, or any suitable combination of the foregoing. More specific examples (a non-exhaustive list) of the computer readable storage medium would include the following: a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), a Static Random Access Memory (SRAM), a portable compact disc read-only memory (CD-ROM), a Digital Versatile Disc (DVD), a memory stick, a floppy disk, a mechanical coding device, such as punch cards or in-groove projection structures having instructions stored thereon, and any suitable combination of the foregoing. Computer-readable storage media as used herein is not to be construed as transitory signals per se, such as radio waves or other freely propagating electromagnetic waves, electromagnetic waves propagating through a waveguide or other transmission medium (e.g., optical pulses through a fiber optic cable), or electrical signals transmitted through electrical wires.
The computer-readable program instructions described herein may be downloaded from a computer-readable storage medium to a respective computing/processing device, or to an external computer or external storage device via a network, such as the internet, a local area network, a wide area network, and/or a wireless network. The network may include copper transmission cables, fiber optic transmission, wireless transmission, routers, firewalls, switches, gateway computers and/or edge servers. The network adapter card or network interface in each computing/processing device receives computer-readable program instructions from the network and forwards the computer-readable program instructions for storage in a computer-readable storage medium in the respective computing/processing device.
Computer program instructions for carrying out operations for embodiments of the present description may be assembly instructions, Instruction Set Architecture (ISA) instructions, machine related instructions, microcode, firmware instructions, state setting data, or source code or object code written in any combination of one or more programming languages, including an object oriented programming language such as Smalltalk, C + + or the like and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The computer-readable program instructions may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or the connection may be made to an external computer (for example, through the Internet using an Internet service provider). In some embodiments, an electronic circuit, such as a programmable logic circuit, a Field Programmable Gate Array (FPGA), or a Programmable Logic Array (PLA), can execute computer-readable program instructions to implement various aspects of embodiments of the present specification by utilizing state information of the computer-readable program instructions to personalize the electronic circuit.
Aspects of embodiments of the present specification are described herein with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems) and computer program products according to embodiments of the specification. It will be understood that each block of the flowchart illustrations and/or block diagrams, and combinations of blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer-readable program instructions.
These computer-readable program instructions may be provided to a processor of a general purpose computer, special purpose computer, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions/acts specified in the flowchart and/or block diagram block or blocks. These computer-readable program instructions may also be stored in a computer-readable storage medium that can direct a computer, programmable data processing apparatus, and/or other devices to function in a particular manner, such that the computer-readable medium storing the instructions comprises an article of manufacture including instructions which implement the function/act specified in the flowchart and/or block diagram block or blocks.
The computer readable program instructions may also be loaded onto a computer, other programmable data processing apparatus, or other devices to cause a series of operational steps to be performed on the computer, other programmable apparatus or other devices to produce a computer implemented process such that the instructions which execute on the computer, other programmable apparatus or other devices implement the functions/acts specified in the flowchart and/or block diagram block or blocks.
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present description. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of instructions, which comprises one or more executable instructions for implementing the specified logical function(s). In some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions. It is well known to those skilled in the art that implementation by hardware, by software, and by a combination of software and hardware are equivalent.
The foregoing description of the embodiments of the present specification has been presented for purposes of illustration and description, but is not intended to be exhaustive or limited to the embodiments disclosed. Many modifications and variations will be apparent to those of ordinary skill in the art without departing from the scope of the described embodiments. The terms used herein were chosen in order to best explain the principles of the embodiments, the practical application, or technical improvements to the techniques in the marketplace, or to enable others of ordinary skill in the art to understand the embodiments disclosed herein.

Claims (24)

1. A method of managing cluster resources, comprising the steps of:
collecting actual states of resources in a cluster;
checking whether the actual state of the resource in the cluster is in conflict with the resource attribute definition in the resource attribute definition information base and the resource constraint definition in the resource constraint definition information base;
in the event of a conflict, the actual state of the resource is repaired to eliminate the conflict.
2. The method of claim 1, further comprising:
receiving resource attribute definitions defined by a user based on a declarative manner and storing the resource attribute definitions into a resource attribute definition information base;
resource constraint definitions defined by a user based on a declarative manner are received and stored in a resource constraint definition information base.
3. The method of claim 1, the resource constraint definition comprising a definition of a constraint relationship between a resource attribute constraint definition and a resource.
4. The method of claim 1, the resources comprising physical devices required for cluster operation and logical functional unit components on which the cluster operates.
5. The method of claim 2, the storing the resource attribute definition in a resource attribute definition information base, comprising: and carrying out deduplication processing on the resource attribute definition.
6. The method of claim 2, the storing resource constraint definitions in a resource constraint definition information base, comprising: and merging and de-duplicating the resource constraint definitions.
7. The method of claim 1, the collecting actual states of resources in a cluster, comprising:
the actual status of the resources in the cluster is collected in a round robin fashion.
8. The method of claim 1, further comprising, prior to performing the inspection:
and summarizing the actual state of the resources in the cluster, wherein the summarizing comprises the de-duplication processing and the grouping processing.
9. The method of claim 2, further comprising: providing a constraint definition template and a constraint definition engine for parsing the constraint definition template; the constraint definition template is for invocation by a user to generate a resource constraint definition.
10. The method of claim 9, the constraint definition engine configured to be pluggable.
11. A system for managing cluster resources, comprising:
a resource status collection unit for collecting actual status of resources in the cluster;
the monitoring unit is used for checking whether conflicts exist among the actual state of the resources in the cluster, the resource attribute definitions in the resource attribute definition information base and the resource constraint definitions in the resource constraint definition information base; and controlling the resource state repairing unit to repair the actual state of the resource to eliminate the conflict if the conflict exists.
12. The system of claim 11, further comprising:
the resource definition processing unit is used for receiving the resource attribute definition defined by the user based on the declarative mode and storing the resource attribute definition into the resource attribute definition information base;
and the constraint definition processing unit is used for receiving the resource constraint definition defined by the user based on the declarative mode and storing the resource constraint definition into the resource constraint definition information base.
13. The system of claim 11, the resource constraint definition comprising a definition of a constraint relationship between a resource attribute constraint definition and a resource.
14. The system of claim 11, the resources comprising physical devices required for cluster operation and logical functional unit components upon which the cluster operates.
15. The system of claim 12, the storing the resource attribute definition in a resource attribute definition information base, comprising: and carrying out deduplication processing on the resource attribute definition.
16. The system of claim 12, said storing resource constraint definitions in a resource constraint definition information base, comprising: and merging and de-duplicating the resource constraint definitions.
17. The system of claim 11, the collecting actual states of resources in a cluster, comprising:
the actual status of the resources in the cluster is collected in a round robin fashion.
18. The system of claim 11, further comprising: a resource state aggregation unit;
and the resource state aggregation unit is used for summarizing the actual states of the resources collected by the resource state collection unit, and the summarizing process comprises a deduplication process and a grouping process.
19. The system of claim 12, further comprising: a constraint definition template and a constraint definition engine for parsing the constraint definition template;
the constraint definition template is for invocation by a user to generate a resource constraint definition.
20. The system of claim 19, the constraint definition engine configured to be pluggable.
21. The system of claim 11, the monitoring unit configured in a pluggable mode.
22. An apparatus for managing cluster resources, comprising a processor and a memory; the memory has stored therein computer instructions which, when executed by the processor, implement the method of any one of claims 1-10.
23. A cluster comprising the system of any one of claims 11-21 or the apparatus of claim 22.
24. A computer-readable storage medium having computer instructions stored thereon, wherein the computer instructions, when executed by a processor, implement the method of any one of claims 1-10.
CN202010266288.2A 2020-04-07 2020-04-07 Method, system, device, cluster and medium for managing cluster resources Pending CN113301068A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010266288.2A CN113301068A (en) 2020-04-07 2020-04-07 Method, system, device, cluster and medium for managing cluster resources

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010266288.2A CN113301068A (en) 2020-04-07 2020-04-07 Method, system, device, cluster and medium for managing cluster resources

Publications (1)

Publication Number Publication Date
CN113301068A true CN113301068A (en) 2021-08-24

Family

ID=77317867

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010266288.2A Pending CN113301068A (en) 2020-04-07 2020-04-07 Method, system, device, cluster and medium for managing cluster resources

Country Status (1)

Country Link
CN (1) CN113301068A (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20050091352A1 (en) * 2003-09-30 2005-04-28 International Business Machines Corporation Policy driven autonomic computing-specifying relationships
CN108519911A (en) * 2018-03-23 2018-09-11 上饶市中科院云计算中心大数据研究院 The dispatching method and device of resource in a kind of cluster management system based on container
CN108574712A (en) * 2017-03-13 2018-09-25 阿里巴巴集团控股有限公司 A kind of creation method and device of container service cluster
CN108964968A (en) * 2018-03-27 2018-12-07 深圳市康拓普信息技术有限公司 Service access management method and system under a kind of container cloud environment
CN110768833A (en) * 2019-10-25 2020-02-07 北京宝兰德软件股份有限公司 Application arrangement and deployment method and device based on kubernets
CN110837407A (en) * 2018-08-15 2020-02-25 阿里巴巴集团控股有限公司 Server-free cloud service system, resource management method thereof and electronic equipment

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20050091352A1 (en) * 2003-09-30 2005-04-28 International Business Machines Corporation Policy driven autonomic computing-specifying relationships
CN108574712A (en) * 2017-03-13 2018-09-25 阿里巴巴集团控股有限公司 A kind of creation method and device of container service cluster
CN108519911A (en) * 2018-03-23 2018-09-11 上饶市中科院云计算中心大数据研究院 The dispatching method and device of resource in a kind of cluster management system based on container
CN108964968A (en) * 2018-03-27 2018-12-07 深圳市康拓普信息技术有限公司 Service access management method and system under a kind of container cloud environment
CN110837407A (en) * 2018-08-15 2020-02-25 阿里巴巴集团控股有限公司 Server-free cloud service system, resource management method thereof and electronic equipment
CN110768833A (en) * 2019-10-25 2020-02-07 北京宝兰德软件股份有限公司 Application arrangement and deployment method and device based on kubernets

Similar Documents

Publication Publication Date Title
CN112866333B (en) Cloud-native-based micro-service scene optimization method, system, device and medium
CN107003906B (en) Type-to-type analysis of cloud computing technology components
US11902174B2 (en) Network slice configuration
US9813423B2 (en) Trust-based computing resource authorization in a networked computing environment
CN108874558B (en) Message subscription method of distributed transaction, electronic device and readable storage medium
US10063427B1 (en) Visualizing and interacting with resources of an infrastructure provisioned in a network
US10324754B2 (en) Managing virtual machine patterns
CN103490941B (en) A kind of cloud computing environment monitors Configuration Online method in real time
CN109117252B (en) Method and system for task processing based on container and container cluster management system
US9912760B2 (en) Dynamically generating solution stacks
US10007682B2 (en) Dynamically maintaining data structures driven by heterogeneous clients in a distributed data collection system
US10630399B2 (en) Testing distributed applications that have an established exchange in an advanced message queuing protocol (AMQP) message broker
CN108595316A (en) Life cycle management method, manager, equipment and the medium of Distributed Application
US20200186619A1 (en) Extraction and Distribution of Content Packages in a Digital Services Framework
CN113361838A (en) Business wind control method and device, electronic equipment and storage medium
CN108737499A (en) server configuration method and device
US20120102075A1 (en) Management of configuration data structures in multi-layer data models
US11288232B2 (en) Database deployment objects and deterministic locking models
EP4024761A1 (en) Communication method and apparatus for multiple management domains
US11635948B2 (en) Systems and methods for mapping software applications interdependencies
US20190188185A1 (en) Defining Software Infrastructure Using a Picture
CN112204527A (en) Method and system for processing engineering data in a multi-engineering system environment
CN113301068A (en) Method, system, device, cluster and medium for managing cluster resources
CN110868330A (en) Evaluation method, device and evaluation system for CPU resources which can be divided by cloud platform
US20220365944A1 (en) Multitenant database instance view aggregation

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
REG Reference to a national code

Ref country code: HK

Ref legal event code: DE

Ref document number: 40057548

Country of ref document: HK