CN118170491A - Method and device for detecting container management platform, computing equipment and storage medium - Google Patents

Method and device for detecting container management platform, computing equipment and storage medium Download PDF

Info

Publication number
CN118170491A
CN118170491A CN202211572244.8A CN202211572244A CN118170491A CN 118170491 A CN118170491 A CN 118170491A CN 202211572244 A CN202211572244 A CN 202211572244A CN 118170491 A CN118170491 A CN 118170491A
Authority
CN
China
Prior art keywords
target
container
information
change
management platform
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
CN202211572244.8A
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.)
Shenzhen Tencent Computer Systems Co Ltd
Original Assignee
Shenzhen Tencent Computer Systems 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 Shenzhen Tencent Computer Systems Co Ltd filed Critical Shenzhen Tencent Computer Systems Co Ltd
Priority to CN202211572244.8A priority Critical patent/CN118170491A/en
Publication of CN118170491A publication Critical patent/CN118170491A/en
Pending legal-status Critical Current

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/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
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/0703Error or fault processing not based on redundancy, i.e. by taking additional measures to deal with the error or fault not making use of redundancy in operation, in hardware, or in data representation
    • G06F11/079Root cause analysis, i.e. error or fault diagnosis
    • 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/54Interprogram communication
    • G06F9/547Remote procedure calls [RPC]; Web services
    • 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/45591Monitoring or debugging support

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Software Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Health & Medical Sciences (AREA)
  • Biomedical Technology (AREA)
  • Quality & Reliability (AREA)
  • Stored Programmes (AREA)

Abstract

The application discloses a method for detecting a container management platform. The method first sends a change request related to a target resource object to a container management platform, wherein the change request related to the target resource object includes at least configuration information of the target resource object and changed content, the configuration information of the target resource object includes a detection identifier, the changed content indicates an operation to be performed on the target resource object, and the detection identifier is used for uniquely identifying the change request related to the target resource object. Then acquiring target change information in a preset time period from the container management platform according to the detection identifier, wherein the target change information is generated by the container management platform according to a change request related to a target resource object by changing the target resource object in each stage from the beginning to the ending of the change; and finally, determining a detection result related to the container management platform at least according to the target change information. The method can automatically detect various faults of the container management platform.

Description

Method and device for detecting container management platform, computing equipment and storage medium
Technical Field
The present application relates to the field of computer technology, and in particular, to a method and apparatus for detecting a container management platform, a computing device, and a computer readable storage medium.
Background
When a technician uses the container management platform to change the target resource object through changing actions such as adding, deleting, changing, checking and the like, the technician can only obtain the final state of the resource object, such as the successful or failed state of the container creation, the running state of the target container, and the successful or failed state of the target container modification. If the failure occurs while changing the target resource object, it cannot be known which link in the middle has an error, or which module of the container management platform has a problem, which cannot provide any help for detecting the problem of the container management platform.
In the related art, technicians often manually check the work logs of the control server and the node server through a remote connection tool to determine which link has an error. For example, technicians often manually establish a telnet session with a node server according to a Secure Shell (SSH), input various query instructions in the session to retrieve a local work log of the connected node server, and manually analyze the work log to check specific problems, which has low detection efficiency and high detection cost.
Disclosure of Invention
In view of the above, the present application provides a method and apparatus, computing device, computer-readable storage medium, and computer program product for detecting a container management platform that desirably mitigates or overcomes some or all of the above-mentioned and other possible disadvantages.
According to a first aspect of the present application, there is provided a method of inspecting a container management platform, comprising: transmitting a change request related to a target resource object to the container management platform, wherein the target resource object is one of at least one container management service of a target type provided by the container management platform, the change request related to the target resource object at least comprising configuration information of the target resource object and changed content, the configuration information of the target resource object comprising a detection identifier indicating an operation to be performed with respect to the target resource object, the detection identifier being used to uniquely identify the change request related to the target resource object; acquiring target change information in a preset time period from the container management platform according to the detection identifier, wherein the target change information is generated by the container management platform according to the change request related to the target resource object, wherein the change request is generated by changing the target resource object in each stage from the beginning to the ending of the change; and determining a detection result related to the container management platform at least according to the target change information.
In some embodiments of the method for detecting a container management platform according to the present application, obtaining target change information within a preset period of time from the container management platform according to the detection identifier includes: acquiring a plurality of change information related to the resource object of the target type from the container management platform, wherein the resource object of the target type is a container management service with the same type as the target resource object; and selecting the target change information from the plurality of change information related to the resource objects of the target type according to the detection identifier.
In some embodiments of methods of detecting a container management platform according to the present application, a plurality of change information related to resource objects of the target type are stored in series as stored data in the container management platform; and obtaining from the container management platform a plurality of change information related to the resource object of the target type, comprising: obtaining, from the container management platform, stored data indicative of the plurality of change information pertaining to the resource object of the target type; and performing deserialization processing on the stored data to obtain the plurality of change information related to the resource object of the target type.
In some embodiments of the method for inspecting a container management platform according to the present application, determining an inspection result regarding the container management platform based at least on the target change information includes: and in response to the target change information including change error information, determining the change error information as the first detection result of the container management platform.
In some embodiments of the method for inspecting a container management platform according to the present application, determining an inspection result regarding the container management platform based at least on the target change information includes: determining final change result information according to the detection identifier; and verifying the expected change result information and the final change result information to determine a second detection result about the container management platform, wherein the expected change result information is determined according to the change request related to the target resource object.
In some embodiments of the method of inspecting a container management platform according to the present application, determining a second inspection result with respect to the container management platform based on the expected change result information and the final change result information includes: and in response to the expected change result information and the final change result information not being consistent, determining the final change result information and the target change information as the second detection result about the container management platform.
In some embodiments of the method of detecting a container management platform according to the present application, the change request related to a target resource object further includes a container index for establishing a target container and expected environment information of the target container, the target container is configured with a preset detection tool that is automatically operated when the target container is established and is used to detect the environment information of the target container, the environment information indicates an execution environment provided by the target container, and the method further includes: acquiring environment information of the target container; and verifying the environment information of the target container expected in the change request related to the target resource object and the environment information of the target container to determine a third detection result about the container management platform.
In some embodiments of the method of inspecting a container management platform according to the present application, the preset inspection tool includes a network inspection tool for providing a network access interface and transmitting configuration information of a network configured in the target container to an access requester in response to receiving a network access request; and acquiring environmental information of the target container, including: sending a network access request to a network access interface of the target container; configuration information of a network configured in the target container is received from the target container as at least part of environment information of the target container.
In some embodiments of the method of inspecting a container management platform according to the present application, the preset inspection tool includes a memory inspection tool for inspecting memory information allocated to the target container; and acquiring environmental information of the target container, including: and acquiring memory information allocated to the target container as at least part of environment information of the target container.
In some embodiments of the method of inspecting a container management platform according to the present application, the preset inspection tool further comprises a storage device inspection tool for inspecting whether a storage device is accessible in the target container; and acquiring environmental information of the target container, including: information whether a storage device is accessible in the target container is acquired as at least part of the environment information of the target container.
According to a second aspect of the present application, there is provided an apparatus for inspecting a container management platform, the apparatus for inspecting a container management platform comprising: a request module configured to send a change request related to a target resource object to the container management platform, wherein the target resource object is one of at least one container management service of a target type provided by the container management platform, the change request related to the target resource object including at least configuration information of the target resource object and changed content, the configuration information of the target resource object including a detection identifier indicating an operation to be performed with respect to the target resource object, the detection identifier being used to uniquely identify the change request related to the target resource object; a first acquisition module configured to acquire target change information within a preset period of time from the container management platform according to the detection identifier, wherein the target change information is information generated by the container management platform by changing the target resource object in each stage from start to end of the change according to the change request related to the target resource object; and the first detection module is configured to determine a detection result related to the container management platform at least according to the target change information.
In the apparatus for detecting a container management platform according to some embodiments of the present application, the change request related to a target resource object sent by a requesting apparatus further includes a container index for establishing a target container and expected environment information of the target container, the target container is configured to have a preset detecting tool that is automatically operated when the target container is established and is used for detecting the environment information of the target container, the environment information indicates an execution environment provided by the target container, the apparatus further includes: a second acquisition module configured to acquire environmental information of the target container; and a second detection module configured to determine a second detection result regarding the container management platform according to the environmental information of the target container and the environmental information of the target container expected in the change request related to the target resource object.
According to a third aspect of the present application there is provided a computing device comprising a memory and a processor, wherein the memory has stored therein a computer program which, when executed by the processor, causes the processor to perform the steps of a method of detecting a container management platform according to some embodiments of the present application.
According to a fourth aspect of the present application, there is provided a computer readable storage medium having stored thereon computer readable instructions which, when executed, implement a method of inspecting a container management platform according to some embodiments of the present application.
According to a fifth aspect of the present application, there is provided a computer program product comprising computer instructions which, when executed by a processor, implement a method of detecting a container management platform according to some embodiments of the present application.
In the method and the device for detecting the container management platform according to some embodiments of the present application, a change request related to a target resource object is sent to the container management platform, so that the container management platform invokes each module of the container management platform to complete the change request, and meanwhile, in the process of completing the change request, because a detection identifier is added in configuration information of the target resource object, and the configuration information is always kept by the container management platform during changing, the change information related to the target resource object generated by the container management platform is attached with the detection identifier, so that change information generated by the container management platform for completing the change request can be obtained by automatically screening the change information attached with the detection identifier from various change information, and a control server or a node server does not need to be manually screened from a large amount of change information, and therefore, the detection efficiency can be significantly improved, and the detection cost can be reduced.
These and other advantages of the present application will become apparent from and elucidated with reference to the embodiments described hereinafter.
Drawings
Embodiments of the application will now be described in more detail and with reference to the accompanying drawings, in which:
FIG. 1 is a flow chart of a related art change of resource objects in a container management platform;
FIG. 2 is an exemplary application scenario of a method of detecting a container management platform according to some embodiments of the application;
FIG. 3 is a schematic diagram of an architecture of an application system 300 of a method of inspecting a container management platform according to some embodiments of the application;
FIG. 4 is a flow chart of a method of detecting a container management platform according to some embodiments of the application;
FIG. 5 is a schematic diagram of acquiring target change information according to some embodiments of the application;
FIG. 6 is a flow chart of determining a third test result according to some embodiments of the application;
FIG. 7 is a schematic diagram of determining a third test result according to some embodiments of the application;
FIG. 8 is a schematic diagram of a detection of a container management platform by a detection module in the container management platform according to some embodiments of the application;
FIG. 9 is an exemplary block diagram of an apparatus for inspecting a container management platform according to further embodiments of the application;
FIG. 10 illustrates an example system including an example computing device that represents one or more systems and/or devices that can implement the various methods described herein.
Detailed Description
Example embodiments will now be described more fully with reference to the accompanying drawings. However, the exemplary embodiments can be embodied in many forms and should not be construed as limited to the embodiments set forth herein; rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the concept of the example embodiments to those skilled in the art. The same reference numerals in the drawings denote the same or similar parts, and thus a repetitive description thereof will be omitted.
Furthermore, the described features, structures, or characteristics may be combined in any suitable manner in one or more embodiments. In the following description, numerous specific details are provided to give a thorough understanding of embodiments of the application. One skilled in the relevant art will recognize, however, that the application can be practiced without one or more of the specific details, or with other methods, components, devices, steps, etc. In other instances, well-known methods, devices, implementations, or operations are not shown or described in detail to avoid obscuring aspects of the application.
The block diagrams shown in the figures are merely functional entities and do not necessarily correspond to physically separate entities. That is, the functional entities may be implemented in software, or in one or more hardware modules or integrated circuits, or in different networks and/or processor devices and/or microcontroller devices.
The flow diagrams depicted in the figures are exemplary only, and do not necessarily include all of the elements and operations/steps, nor must they be performed in the order described. For example, some operations/steps may be decomposed, and some operations/steps may be combined or partially combined, so that the order of actual execution may be changed according to actual situations.
It will be understood that, although the terms first, second, third, etc. may be used herein to describe various components, these components should not be limited by these terms. These terms are used to distinguish one element from another element. Accordingly, a first component discussed below could be termed a second component without departing from the teachings of the present inventive concept. As used herein, the term "and/or" and similar terms include all combinations of any, many, and all of the associated listed items.
Those skilled in the art will appreciate that the drawings are schematic representations of example embodiments and that the modules or flows in the drawings are not necessarily required to practice the application and therefore should not be taken to limit the scope of the application.
Before describing embodiments of the present application in detail, some related concepts will be explained first for clarity.
Cloud computing (closed computing): the computing mode distributes computing tasks on a resource pool formed by a large number of computers, so that various application systems can acquire computing power, storage space and information service according to requirements. The network that provides the resources is referred to as the "cloud". Resources in the cloud are infinitely expandable in the sense of users, and can be acquired at any time, used as needed, expanded at any time and paid for use as needed. As a basic capability provider of cloud computing, a cloud computing resource pool platform is established, and multiple types of virtual resources are deployed in a resource pool for external clients to select.
A container: is a standard software unit that packages code and all its dependencies so that an application runs quickly and reliably from one computing environment to another. Most containers are embodied as lightweight, stand-alone, executable software packages, including everything required to run an application: code, runtime, system tools, system libraries, and settings. The container technology can load the operating system image and the application program into the memory at the same time, and can also load the operating system image and the application program from the network disk, because starting tens of images at the same time does not bring great load to the network and the storage.
A container management platform: the container management platform is used for adding, deleting, modifying, checking and the like container management services for resource objects, is often applied to cloud computing environments and is used for managing computing resources of a large number of node servers.
Kubernetes (K8 s): the system is an open source platform for automatically deploying, expanding and managing the containerized application program, and belongs to a specific container management platform. In the Kubernetes platform, there are typically included modules of a storage module (Etcd), a Scheduler manager (Scheduler-manager), a Controller manager (Controller-manager), an Application Programming Interface Server (APISERVER), kubelet, docker, an interface plug-in for container networks (CNI-plug in), etc., which are commonly used to provide various container management services.
Pod: pod is a combined multi-container operating unit, also a basic unit in Kubernetes. The Pod includes a main container and a plurality of auxiliary containers which together perform a specific function. A Pod is formed when multiple processes (the container is also an isolated process) are packaged in a namespace.
Resource object: in the present application, persistent entities in the Kubernetes platform are referred to. Kubernetes uses these persistent entities to represent the state of a cluster of node servers. When the Kubernetes platform creates a resource object with Yaml files, the following fields need to be configured: apiVersion: creating a version of the Kubernetes API used by the resource object; kined: creating a type of the resource object; metadata (metadata): data that helps identify the uniqueness of the resource object. Types of common resource objects include deployment (Deployment), service (Service), pod, namespace (Namespace), and so forth.
Metadata (metadata): containing a set of attributes defined by different names, is data describing the resource object, including tags (Label), notes, namespaces (Namespace), etc.
Label (Label): is metadata having identification. A label may be viewed as a set of keys/values associated with a resource object. The tags may be determined directly at the time of creating a resource object, and each resource object may have multiple tags.
Application Programming Interface Server (APISERVER): the Application Programming Interface Server (APISERVER) is a key component in the Kubernetes platform and provides internal and external interfaces to Kubernetes, each module requiring communication through the Application Programming Interface Server (APISERVER).
Kubelet: is a module in the Kubernetes platform, kubelet is responsible for the running state of each node, i.e., ensuring that all containers on the node are functioning properly. Kubelet handle start, stop and maintenance containers as directed by the control panel.
Interface plug-in (Container Network Interface Plugin, CNI-plug in) of the container network: is the interface in the Kubernetes platform that invokes the network implementation. Kubelet implement different network configurations through the interface plug-in of the container network.
Dock: the application container engine refers to an open source, so that a developer can package corresponding applications and rely on packages to a portable container and then issue the packages to any popular machine of a Linux operating system, and virtualization can be realized without any interface between the applications.
Controller-manager: as a management control center in the platform, the management of nodes (nodes), pod copies, service endpoints (end points), namespaces (Namespace) and service accounts (ServiceAccount) in the platform is responsible, and when a certain Node is accidentally down, a Controller manager (Controller-manager) can timely discover and execute an automatic repair flow, so that the platform is ensured to be always in an expected working state.
Copy setter (ReplicaSet): the Controller is a copy Controller in a Controller manager (Controller-manager), and is mainly used for controlling the Pod managed by a copy setter (ReplicaSet) so that the number of Pod copies is always maintained at a preset number.
Scheduler manager (Scheduler-manager): the method is one of core components of the Kubernetes platform, is mainly responsible for the scheduling function of the whole cluster resource, and schedules Pod to the optimal node server according to a specific scheduling algorithm and strategy, so that the node resource of the platform is more reasonably and fully utilized.
Memory module (Etcd): is a database of the Kubernetes platform, and all relevant data of the Kubernetes platform are stored in a storage module (Etcd).
Service (Service): is a resource object in the Kubernetes platform that provides our ability to access single or multiple container applications. Each service has a fixed IP address and port during its life cycle.
Deployment (Deployment): is a resource object in Kubernetes, and deployments (Deployment) provide declarative updates for Pod and replica controllers. The target states of the Pod and replica controllers may be described in the deployment (Deployment).
Yaml (YAML Ain't a Markup Language) profile: yaml is a powerful language, the design of which refers to JSON/XML, SDL and other languages, emphasizes data-centric simplicity, readability, simplicity in writing and commonly used as configuration files for container management platforms.
Namespaces (namespaces): is a resource object in Kubernetes that is used to create multiple virtual clusters. The Namespace (Namespace) provides an abstract logical scope for names.
Fig. 1 is a flowchart of changing resource objects in a container management platform in the related art. In this embodiment, the container management platform is exemplified by the Kubernetes platform. In the Kubernetes platform, the flow of changing the resource object is various, which mainly depends on the specific mode of changing (such as adding, deleting, changing, searching, expanding, rolling back, etc.) and the type of the resource object, wherein the flow of creating the resource object of the deployment (Deployment) type is comprehensive, the comprehensive effect of various modules is covered, and other changing modes are often part of the creation flow. Thus, in this embodiment, description will be given taking as an example creating a resource object of the deployment (Deployment) type.
First, user 108 initiates a change request to create a resource object of the deployment (Deployment) type and sends it to Application Programming Interface Server (APISERVER) 101. The Application Programming Interface Server (APISERVER) 101 first informs the storage module (Etcd) 102 of information about the resource object of the type deployed (Deployment) in the change request. The storage module (Etcd) 102 stores information about the resource object of the deployment (Deployment) type locally as change information and confirms the change request with the Application Programming Interface Server (APISERVER) 101.
The Controller manager 103 may remain connected to the Application Programming Interface Server (APISERVER) 101 at all times (via LIST AND WATCH functions) to learn about various resource objects and change information in the storage module (Etcd) 102. The storage module (Etcd) 102 will inform the resource object of the type of deployment (Deployment) to be created through the Application Programming Interface Server (APISERVER) 101, and the Controller manager (Controller-manager) 103 is informed of the resource object of the type of deployment (Deployment) to be created. After learning that the resource object of the deployment (Deployment) type is to be created, the Controller manager (Controller-manager) 103 creates a Pod using the copy setter Controller (REPLICASET CONTROLLER) according to information (e.g., the number of copies of the newly created Pod, template content, etc.) about creating the resource object of the deployment (Deployment) type in the change request, and notifies the creation information to the storage module (Etcd) 102 through the Application Programming Interface Server (APISERVER) 101. The storage module (Etcd) 102 stores the creation information, i.e., the change information generated by the Controller-manager (Controller) 103, locally as change information.
During the recording process, the Scheduler manager (Scheduler-manager) 104 may remain connected to the Application Programming Interface Server (APISERVER) 101 at all times, and learn (via LIST AND WATCH functions) about various resource objects and change information in the storage module (Etcd) 102. The storage module (Etcd) 102 will inform the newly created Pod and its associated information via the Application Programming Interface Server (APISERVER) 101. The Scheduler manager (Scheduler-manager) 104, knowing these newly created Pod and its related information, allocates node servers for these Pod so that these Pod are bound into a specific node server and run. The Scheduler manager (Scheduler-manager) 104 finally informs the Application Programming Interface Server (APISERVER) 101 of the binding information. The storage module (Etcd) 102 obtains the binding information from the Application Programming Interface Server (APISERVER) 101 and stores the binding information locally as change information.
Kubelet105 on that particular node server remains connected to the Application Programming Interface Server (APISERVER) 101 and looks up the Pod and its associated information bound to that node server from the storage module (Etcd) 102 upon request from the Application Programming Interface Server (APISERVER) 101. Kubelet105 then informs Docker 106 to create a sandboxed environment based on the Pod's relevant information for the node server. Dock 106 creates a sandboxed environment using a container network's interface plug in (CNI-plug in) 107 plug-in and informs Kubelet of the completion of creation. Kubelet105 finally, the Application Programming Interface Server (APISERVER) 101 is informed of whether or not the creation of Pod at the node server is successful as a status of Pod. The storage module (Etcd) 102 obtains these change information from the Application Programming Interface Server (APISERVER) 101 and stores them locally.
In this embodiment, each module 102-105 communicates through an Application Programming Interface Server (APISERVER) 101 and obtains the information needed by the module to develop work. Although the change information generated by each module is fully described in the storage module (Etcd) 102, in the related art, the user 108 cannot automatically acquire the change information from the storage module (Etcd) 102 to detect the container management platform, and the container management platform can only inform the user 108 whether the change request is achieved or not. This can result in: if the resource object is changed and fails, the specific link and module cannot be known. In addition, since the container management platform generates a large amount of change information from time to time, it is also a very difficult problem how to obtain change information corresponding to a change request of the user 108 from the change information.
Fig. 2 is an exemplary application scenario 200 of a method of detecting a container management platform according to some embodiments of the application. The application scenario 200 may include a user 201, a detection end 202, a network 203, a container management platform 204, and a server cluster 205, where the container management platform 204 is communicatively coupled to the detection end 202 via the network 203, and where the container management platform 204 may be in communication with the server cluster 205. In this embodiment, the Kubernetes platform is taken as an example of the container management platform 204 to illustrate the application scenario. Inside the container management platform 204, a plurality of modules are included: the storage modules (Etcd) 2041, controller manager 2042, application Programming Interface Server (APISERVER) 2043, scheduler manager 2044, kubelet2045, kubelet2045 are arranged on a particular node server, each module being connected to Application Programming Interface Server (APISERVER) 2043, and other modules running on the node server are not shown for simplicity. The modules 2041-2045 together serve to perform the tasks of the change request, and communication between each module is required through an Application Programming Interface Server (APISERVER) 2043.
In this embodiment, the user 201 controls the detection terminal 202 to perform detection on the container management platform 204. The detection end 202 is the execution subject of the method of detecting a container management platform according to the present application. The container management platform 204 is an execution subject for completing a change request in the server cluster 205 according to the change request from the detection end 202, and manages the server cluster 205. The detection end 202 also obtains a plurality of change information from the container management platform 204 after sending the change request, and screens the target change information therefrom to determine the detection result about the container management platform 204.
Specifically, the detecting end 202 sends a change request related to a target resource object to the container management platform 204, where the target resource object is one of at least one container management service of a target type provided by the container management platform, and the change request related to the target resource object includes at least configuration information of the target resource object and content of the change, where the configuration information of the target resource object includes a detection identifier, and the content of the change indicates an operation to be performed on the target resource object, and the detection identifier is used to uniquely identify the change request related to the target resource object. After receiving the change request related to the target resource object, the container management platform 204 invokes the modules 2041-2045 to change according to the configuration information of the target resource object and the content of the change. The change information generated by each module during operation is stored in the memory module (Etcd) 2041.
The detection end 202 then acquires, from the container management platform 204, target change information within a preset period of time according to the detection identifier, wherein the target change information is information generated by the container management platform to change the target resource object in each stage from the start to the end of the change according to a change request related to the target resource object. Because the change information generated by each module during the operation is stored in the storage module (Etcd) 2041, and the communication between each module needs to be implemented through the Application Programming Interface Server (APISERVER) 2043, the detection end 202 can obtain the target change information from the storage module (Etcd) 2041 through the Application Programming Interface Server (APISERVER) 2043 according to the detection identifier.
Finally, the detection end 202 determines a detection result about the container management platform 204 at least according to the target change information. This step may be accomplished locally at the detection end 202.
Because in the Kubernetes platform the interface for communicating with the outside is the Application Programming Interface Server (APISERVER) 2043, the communication between the client 202 and the container management platform 204 (arrows 1-2) can be considered at the technical level as a communication between the client 202 and the Application Programming Interface Server (APISERVER) 2043 in the container management platform 204. The client 202 only needs to communicate with the Application Programming Interface Server (APISERVER) 2043 to detect the container management platform 204, and the target change information can be obtained from the storage module (Etcd) 2041 by the Application Programming Interface Server (APISERVER) 2043.
In the application scenario shown in fig. 2, the method of detecting a container management platform according to some embodiments of the present application is implemented on the detection end 202, but this is merely illustrative and not limiting, and the method of detecting a container management platform according to some embodiments of the present application may also be implemented on other subjects having sufficient computing resources and computing capabilities, for example, on the container management platform 204 having sufficient computing resources and computing capabilities, or the like. Of course, it may be implemented partly on the container management platform 204 and partly on the detection end 202, which is not limiting.
As understood by those of ordinary skill in the art, the container management platform 204 and the server cluster 205 may be separate physical servers, or may be a server cluster or a distributed system formed by a plurality of physical servers, or may be a cloud server that provides cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, CDNs, and basic cloud computing services such as big data and artificial intelligence platforms. The servers may be directly or indirectly connected via wired or wireless communication, and the application is not limited in this regard.
The detection end 202 may be any type of mobile computing device, including a mobile computer (e.g., personal Digital Assistant (PDA), laptop computer, notebook computer, tablet computer, netbook, etc.), mobile phone (e.g., cellular phone, smart phone, etc.), wearable computing device (e.g., smart watch, head mounted device, including smart glasses, etc.), or other type of mobile device. In some embodiments, the detection end 202 may also be a stationary computing device, such as a desktop computer, a gaming machine, a smart television, or the like. In addition, the detection end 202 may also be a separate physical server.
As shown in fig. 2, the detection end 202 may include a display screen and a terminal application that may interact with an end user via the display screen. The terminal application may be a local application, a Web page (Web) application, or an applet (Lite App, e.g., a cell phone applet, a WeChat applet) as a lightweight application. In the case where the terminal application is a local application program that needs to be installed, the terminal application may be installed at the detection end 202. In the case where the terminal application is a Web application, the terminal application may be accessed through a browser. In the case that the terminal application is an applet, the terminal application may be directly opened on the detection end 202 by searching for related information of the terminal application (such as a name of the terminal application, etc.), scanning a graphic code of the terminal application (such as a bar code, a two-dimensional code, etc.), and the like, without installing the terminal application.
Fig. 3 is a schematic diagram of an architecture of an application system 300 of a method of detecting a container management platform according to some embodiments of the application.
Inside the container management platform 300, a plurality of modules are included: an Application Programming Interface Server (APISERVER) 301, a storage module (Etcd) 302, a Controller manager (Controller-manager) 303, a Scheduler manager (Scheduler-manager) 304, detection modules 305, kubelet, 306, kubelet 306 are arranged at a particular node server, each module being connected to the Application Programming Interface Server (APISERVER) 301, and other modules running on the node server are not shown for simplicity. In this embodiment, the manner in which the embodiment of the method according to the application is implemented is similar to that of fig. 2, except that the subject matter of the detection step according to the application is implemented. In fig. 2 the detection end 202 implementing the detection step according to the application is a separate body outside the container management platform, and in fig. 3 the detection step according to the application is implemented as a module embedded in the container management platform.
Specifically, the detection module 305 sends a change request related to a target resource object to the Application Programming Interface Server (APISERVER) 301, where the target resource object is one of at least one container management service of a target type provided by the container management platform, the change request related to the target resource object including at least configuration information of the target resource object and content of the change, the configuration information of the target resource object including a detection identifier indicating an operation to be performed with respect to the target resource object, the detection identifier being used to uniquely identify the change request related to the target resource object. The Application Programming Interface Server (APISERVER) 301, upon receiving a change request associated with a target resource object, invokes the modules 302-304 to make the change based on the configuration information of the target resource object and the contents of the change. The change information generated by each module during operation is stored in the storage module (Etcd) 302.
The detection module 305 then obtains, from the storage module (Etcd) 302, target change information for a preset period of time according to the detection identifier, where the target change information is information generated by the container management platform to change the target resource object in each stage from start to end of the change according to a change request related to the target resource object.
Finally, the detection module 305 determines a detection result regarding the container management platform 300 at least according to the target modification information.
FIG. 4 is a flow chart of a method of detecting a container management platform according to some embodiments of the application. The illustrated method 400 may be implemented on a client (e.g., may be on the client 202 illustrated in fig. 2). In some embodiments, where the container management platform 204 has sufficient computing resources and computing power, methods of detecting the container management platform according to some embodiments of the application may be performed directly on the container management platform 204. In other embodiments, methods of inspecting container management platforms according to some embodiments of the present application may also be performed by container management platform 204, inspection end 202 in combination. As shown in fig. 4, a method of inspecting a container management platform according to some embodiments of the present application may include steps S401-S403.
In step S401, a change request related to a target resource object is sent to the container management platform, where the target resource object is one of at least one container management service of a target type provided by the container management platform, the change request related to the target resource object includes at least configuration information of the target resource object and content of the change, the configuration information of the target resource object includes a detection identifier, the content of the change indicates an operation to be performed for the target resource object, and the detection identifier is used to uniquely identify the change request related to the target resource object.
The container management platform herein may be the container management platform shown in fig. 1-2, or the Application Programming Interface Server (APISERVER) 301 in the container management platform shown in fig. 3. That is, the main body of the method for detecting the container management platform provided by the application can be a single main body or a module embedded into the detected container management platform. As an example, the container management platform may be a Kubernetes platform. In step, a change request is initiated, which is similar to a conventional change request, so that the container management platform can complete the change request in a conventional manner to implement detection of the container management platform. It is necessary to specify configuration information of the target resource object and contents of the change in the change request. The content of the change includes, but is not limited to, adding, deleting, modifying, searching and the like. For example, a change request may be initiated to create a resource object of the deployment (Deployment) type as shown in fig. 1. However, unlike a conventional change request, a detection identifier needs to be added to the configuration information of the target resource object of the change request, so that the change information generated based on the change request contains the detection identifier. Since the detection identifier is unique, the change information that can be generated based on the change request is also uniquely identified without being mixed with other change information. The configuration information for the target resource object is typically represented as Yaml files. As an example, the detection identifier may be added to a tag (label) field of metadata attribute (metadata) of Yaml profiles. If a detection identifier is added in the Label field of the metadata attribute of Yaml files, then during the next change, each module of the container management platform copies Yaml file to local, and each module obtains information that may be used to complete the change request from Yaml file as needed. Although the detection identifier does not relate to a specific change instruction, it is still reserved by the respective module, which allows the change information generated according to the container management platform to include the detection identifier.
In step S402, target change information within a preset period of time is acquired from the container management platform according to the detection identifier, wherein the target change information is information generated by the container management platform to change the target resource object in each stage from the start to the end of the change according to the change request related to the target resource object. In general, a large amount of change information is generated at every moment in the container management platform, but since a detection identifier is added to a change request for detecting the container management platform, the change information can be easily screened to acquire the change information generated based on the change request. The target change information may be acquired from the storage module (Etcd) 2041 shown in fig. 2, for example. Because the container management platform needs a certain time to complete the change request related to the target resource object and does not provide any report after completing the request or having a fault, the container management platform can acquire the target change information in a preset time period, so as to avoid waiting all the time in the detection process.
In step S403, a detection result regarding the container management platform is determined at least based on the target change information. Since the target change information records details of the specific situation when the target resource object is changed, according to whichever link is problematic, it can be determined which link of which module the container management platform is problematic by analyzing the target change information.
In the method for detecting the container management platform according to some embodiments of the present application, a change request related to a target resource object is sent to the container management platform, so that the container management platform invokes each module of itself to complete the change request, and in the process of completing the change request, because a detection identifier is added to configuration information of the target resource object, and the container management platform always retains the configuration information when changing, the change information related to the target resource object generated by the container management platform is attached with the detection identifier, so that change information generated by the container management platform when completing the change request can be obtained by automatically screening change information attached with the detection identifier from various change information, without manually logging in a control server or a node server, or manually screening change information generated by the container management platform when completing the change request from a large amount of change information, therefore, the detection efficiency can be significantly improved, and the detection cost can be reduced.
FIG. 5 is a schematic diagram of acquiring object change information, according to some embodiments of the application, including a storage module (Etcd) 502, an Application Programming Interface Server (APISERVER) 503, a probe 504 for a resource object of the deployment (Deployment) type, a probe 505 for a resource object of the Namespace (Namespace) type, a probe 506 for a resource object of the Service (Service) type, a filter 507, a database 508, probes corresponding to other types of resource objects omitted, which may be implemented with reference to probes 504-506, the storage module (Etcd) 502 and the Application Programming Interface Server (APISERVER) 503 being internal modules of the container management platform 501.
In this embodiment, probes corresponding to respective types of resource objects are provided for acquiring target change information from the storage module (Etcd) 502 through the Application Programming Interface Server (APISERVER) 503 in cooperation with the filter 507, respectively. The steps of acquiring the target change information in the preset time period by each detector are consistent.
First, a plurality of change information related to a resource object of a target type, which is a container management service of the same type as the target resource object, within a preset period of time is acquired from a container management platform. In this step, all the change information generated in the container management platform is initially screened, and the change information related to the resource object of the target type is selected, that is, the selection is performed according to the type. Taking the resource object of the deployment (Deployment) type as an example, the detector 504 of the resource object of the deployment (Deployment) type acquires all change information related to the resource object of the deployment (Deployment) type in a preset period from the storage module (Etcd) 502 through the Application Programming Interface Server (APISERVER) 503, and then sends the change information to the filter 507 for filtering.
Then, based on the detection identifier, target change information is selected from a plurality of change information related to the resource object of the target type. In this step, the target change information is selected from all the resource objects of the same type. Taking the resource object of the deployment (Deployment) type as an example, since the change information generated based on other change requests has no detection identifier, only the change information generated based on the change request related to the target resource object has a detection identifier, the filter 507 can screen the change information including the detection identifier from the change information related to the resource object of the deployment (Deployment) type as target change information. The filter 507 may temporarily store the filtered data in the memory 508 for use in subsequent steps.
In some embodiments, the container management platform may store the plurality of change information related to the resource object of the target type as storage data in a serialization manner, and the obtaining the plurality of change information related to the resource object of the target type from the container management platform includes: obtaining storage data from a container management platform, the storage data indicating a plurality of change information, the plurality of change information relating to a resource object of a target type; and performing deserialization processing on the stored data to obtain a plurality of change information related to the resource object of the target type.
Serialization is to convert information into byte stream for easy storage in database; the inverse serialization, the inverse process, is restored from the byte stream to information. Files stored in series are generally not directly readable and analyzable and cannot be used directly. For example, in the K8s platform, various change information is included as a change event in the files generated by the various modules, which are then stored in a memory module (Etcd) in series. Therefore, in order to obtain these change information, it is necessary to perform a deserialization process on these files to analyze the change events therein.
Because in some container management platforms, when one of the modules fails to operate, an error flag or alarm flag may be marked in the generated change information and then saved to a database (e.g., a storage module (Etcd)) of the container management platform. Thus, in an embodiment of the inspection container management platform according to the present application, since various kinds of change information in the database have been obtained, these change information containing the error flag or the warning flag have also been obtained, when the inspection result with respect to the container management platform is determined based on at least the target change information, it is possible to determine the information of the change error as the first inspection result with respect to the container management platform in response to the information of the change error included in the target change information. The information of the change error can be understood broadly herein to include both information containing the error identification and information containing the alarm identification, as well as other types of non-conventional information.
In other cases, when one of the modules in the container management platform fails to operate, it may not be marked with any identification, but rather is identified as normal change information. In this case, since the work for the change request has been in error, the subsequent link will not be executed, resulting in failure of execution of the entire change request. For example, suppose that 3 Pods are requested to be created in a change request, and Kubelet may fail to create when creating a sandboxed environment for a Pod bound to the node server, but the report fed back to the Application Programming Interface Server (APISERVER) is a successful creation. The change information stored in the storage module (Etcd) at this time is successful creation, but the actual situation is that the sandbox environment creation fails. That is, the identity of whether the change information is erroneous cannot be relied upon. In this case, however, the present node server may inform that the number of Pod actually provided is 0.
To address this issue, in some embodiments, determining a detection result for the container management platform based at least on the target change information includes: firstly, determining final change result information according to a detection identifier; the expected change result information, which is determined from the change request associated with the target resource object, and the final change result information are then checked to determine a second detection result for the container management platform.
Since the detection identifier is added to the configuration information of the target resource object of the change request in advance, the information generated by the container management platform to change the target resource object in each stage from the start to the end of the change according to the change request related to the target resource object includes the detection identifier, and even the container related to the target resource object which is finally run on the node server includes the detection identifier, all the related containers can be found according to the detection identifier. The operation states of the containers are final change result information, the number of containers reflected by the configuration information of the target resource object of the change request is expected change result information, and whether the current change is wrong or not can be determined by checking the two. For example, a request in a change request to create 3 copies of the target deployment (Depolyment), 2 containers in each copy, the expected result is 6 containers, which may be recorded in the configuration information of target Depolyment. If only 2 containers are found to be finally created based on the detection identifier, the verification result may be determined as a second detection result and the client may be informed. In this embodiment, the number of containers is only one example, and there may be different verification objects according to the content of the change.
In this embodiment, even if each module reports a successful execution process to the container management platform, faults which are not easy to find (i.e., faults which are not explicitly reported) in the changing process can be automatically found, so that the container management platform is comprehensively detected.
Above this, in some embodiments, to be able to easily find these hard-to-find faults, determining a second test result with respect to the container management platform based on the expected change result information and the final change result information includes: in response to the expected change result information and the final change result information not being consistent, the final change result information and the target change information are determined as a second detection result with respect to the container management platform.
The final change result can determine that a fault exists in the container management platform, the target change information is generated by the container management platform according to the change request related to the target resource object when the target resource object is changed in each stage from the beginning to the ending of the change, and the automatic presentation of the target change information can help technicians to easily check the fault without manually logging in each module or node server to query logs, so that the checking efficiency can be remarkably improved, and the detection cost can be reduced.
The foregoing embodiments describe in various aspects how to detect a container management platform from a change process, and mainly depend on information generated by the container management platform to change a target resource object in each stage from the start to the end of the change according to a change request related to the target resource object, that is, change information, to achieve a detection result at the container management platform level. The inventors have further appreciated that the creation of a particular container may be included in the change request, with a detection application pre-embedded in the particular container, to enable detection of the container level of the container management platform in the following manner.
Fig. 6 is a flow chart of determining a third test result according to some embodiments of the application. In the embodiment shown in fig. 6, the change request related to the target resource object further includes a container index for establishing a target container configured with a preset detection tool that is automatically operated upon establishment of the target container and for detecting the environment information of the target container, the environment information indicating an execution environment provided by the target container, and the environment information of the intended target container, and the method further includes the steps of.
In step S601, environmental information of a target container is acquired. Because the environment information of the target container is included in the change request related to the target resource object, the container management platform should normally allocate resources according to the included environment information of the target container. The environmental information may be, for example, information such as a memory size, the number of processors, and a storage space size. In this step, the acquired environmental information of the target container is the environmental information to which the target container is actually allocated after the change request relating to the target resource object is finally completed.
In step S602, the environmental information of the target container and the environmental information of the target container expected in the change request related to the target resource object are checked to determine a third detection result regarding the container management platform. The step is similar to determining the second detection result, and the expected result and the actual result are checked to determine whether the container management platform has faults which are not easy to find.
In this embodiment, by creating the target container with the inspection tool in the container management platform, the inspection of the container level can be performed on the container management platform according to the inspection content of the inspection tool, and the inspection is performed automatically, without manually logging in the created container and manually inspecting the environmental information of the container, the inspection efficiency can be improved, and the inspection cost can be reduced.
Fig. 7 is a schematic diagram of determining a third detection result according to some embodiments of the application. In this embodiment, taking the Kubernetes platform as an example, other Kubernetes-based platforms may refer to the schematic diagram in fig. 7 to determine the third detection result.
As shown in fig. 7, the container management platform 701 transmits a change request for creating a target container to the node server 702 according to a change request related to a target resource object, and Kubelet 7021 of the node server 702 receives the change request and calls the Docker 7022 to create a sandbox environment, and an environment component for creating the sandbox environment is downloaded by the node server 702 from the mirror warehouse 703 according to an index of the target container, so that the target container 7023 is obtained in the node server 702. The target container has embedded therein a preset detection tool 70231. After the creation of the target container 7023 is successful, the detection tool 70231 will automatically run in the target container 7023 of the node server 702 and detect the environmental information of the target container 7023. After the detection is completed, the detection tool 70231 may verify the environmental information of the target container and the environmental information of the target container expected in the change request related to the target resource object to determine a third detection result related to the container management platform, and transmit the third detection result to the detection end 704 for a technician to view.
Optionally, in some embodiments, the preset detecting means includes a network detecting means, where the network detecting means is configured to provide a network access interface and send configuration information of a network configured in the target container to the access requester in response to receiving the network access request, and the implementation manner of obtaining the environment information of the target container includes: firstly, sending a network access request to a network access interface of a target container; configuration information of a network configured in the target container is then received from the target container as at least part of the environmental information of the target container.
Since the target container can be accessed through the network, it must be determined by actually connecting to the target container through the network, and no self-determination cannot be made inside the target container, in this embodiment, after the network access interface is provided by the network detection tool in the target container, the detection of network communication of the target container can be easily implemented, which is a container-level detection. The target container can be configured with the configuration information of the specific network, and after the target container is accessed by the detection end, the network detection tool of the target container informs the detection end of the configuration information of the specific network, and at the moment, it can be determined that each container configured with the configuration information of the network is normal in the whole container management platform.
Optionally, in some embodiments, the preset detecting means includes a memory detecting means, where the memory detecting means is configured to detect memory information allocated to the target container, and the implementation manner of obtaining the environmental information of the target container includes: memory information assigned to the target container is obtained as at least part of the environmental information of the target container.
For example, the change request related to the target resource object sets the memory of the target container to 4 gigabytes, and after the detection of the memory detection tool of the target container, the finally created target container is only allocated with 1 gigabyte of memory, and after verification, the container management platform can be indicated to have a fault.
Optionally, in some embodiments, the preset detecting means further includes a storage device detecting means, where the storage device detecting means is configured to detect whether the storage device is accessible in the target container, and acquire the environmental information of the target container, including: information is obtained as to whether the storage device is accessible in the target container as at least part of the environmental information of the target container.
On a node server, individual containers may share a directory or file (also referred to as a "data volume") in the node server and use it as a store for persistent data, and on a node server, the contents of the data volume may be modified, which may be visible between the container or containers sharing the data volume. In this embodiment, after the target container is created, the storage device detection tool may automatically run and detect whether the storage device in the target container is accessible, and if so, indicate that all containers sharing the data volume may access the data volume, otherwise indicate that a portion of the containers may not be able to access the data volume, i.e., that the creation of a portion of the containers has failed, thereby enabling container level detection.
The foregoing embodiments may be implemented either in the case where the container management platform and the method execution subject are different subjects, or in the case where the method execution subject is embedded in the container management platform as a part.
FIG. 8 is a schematic diagram of a detection of a container management platform by a detection module in the container management platform according to some embodiments of the application. In this embodiment, a Kubernetes platform is exemplified.
The storage module (Etcd) 803 and the Application Programming Interface Server (APISERVER) 802 as shown in fig. 8 are existing modules of the Kubernetes platform, and the detection module 814, indicated by the dashed box, is an embedded module that performs a method of detecting a container management platform according to some embodiments of the application. The detection module 814 includes a plurality of processing modules 804-806, each processing module learning and processing change information related to a particular type of resource object, and the detection module 814 further includes a filtering module 807, a plurality of event parsing modules 809-810, a log retrieval module 808, a log filtering module 811, a database 812, and a determination module 813.
First the user 801 sends a change request related to the target resource object to the Application Programming Interface Server (APISERVER) 802 and then sends a detection request to the determination module 813. The Application Programming Interface Server (APISERVER) 802 coordinates the completion of the change request associated with the target resource object by the other modules and stores the target change information generated by each module in the storage module (Etcd) 803. Processing modules associated with various types of resource objects may each request that the Application Programming Interface Server (APISERVER) 802 communicate change information associated with the corresponding type of resource object, which is often stored in a serialized manner in the storage module (Etcd) 803. In this embodiment, the change information refers to Delta (Delta) Delta information stored in a serialization manner, and the Delta information stored in a serialization manner mainly includes instances of each resource object and corresponding change events, where the change events are more accurate change information, and details a certain change operation of a corresponding module. After the processing modules related to various types of resource objects acquire the change information, reverse sequence processing is carried out on the change information to obtain processable change information. Information with clear semantics, such as the name, type, change event, detection identifier and the like of the resource object corresponding to the change information, can be read from the processable change information, so that subsequent filtering processing is facilitated.
As an example, the processing module 805 associated with a Namespace (Namespace) type resource object requests the Application Programming Interface Server (APISERVER) 802 to transmit Delta information associated with the Namespace (Namespace) type resource object. The storage module (Etcd) 803 then communicates the requested Delta (Delta) Delta information to the processing module 805 associated with the Namespace (Namespace) type resource object. The processing module 805 associated with the Namespace (Namespace) type resource object then deserializes the Delta information, delta (Delta) Delta information is obtained relating to a Namespace (Namespace) type resource object that can be processed.
Each processing module then transmits the processable change information to the filtering module 807, and the filtering module 807 reads the specific content of the change information and filters the change information having the detection identifier from each processable change information as target change information. In this case, the target change information is data in an unknown format, so in order to make the target change information more recognizable, the target change information needs to be parsed according to the type of the resource object (which is known), so as to extract the change event therein, and store the change event in the database 812 for the determination module 813 to poll.
It should be noted that the target change information related to the resource object of the deployment (Deployment) type still cannot be filtered out, because the target change information related to the resource object of the deployment (Deployment) type does not contain a detection identifier, and the detailed log corresponding to the change event included in the target information only includes the identifier, so it is necessary to index the corresponding log according to the change event included in the target change information and filter the log according to the detection identifier, so as to obtain the most accurate change information. In FIG. 8, change information relating to a resource object of the deployment (Deployment) type, after being formatted as data, is passed to a log filter module 811 relating to a resource object of the deployment (Deployment) type to obtain a log containing the detection identifier, which is then saved in a database 812 for polling by a determination module 813.
The determination module 813 may continually poll the database 812 for a predetermined period of time (e.g., 10 minutes) to obtain processed explicit change information. For these change information, if it is judged to correspond to the first detection result, the determination module 813 may directly present it to the user 801, and if it is judged to correspond to the second detection result, the determination module 813 may then check the expected change result information and the final change result information to determine the second detection result regarding the container management platform and present it to the user 801 after determining the expected change result according to the change request related to the target resource object.
Fig. 9 is an exemplary block diagram of an apparatus 900 for inspecting a container management platform according to some embodiments of the application. The apparatus 900 includes: a request module 901, a first acquisition module 902, a first detection module 903. The request module 901 is configured to send a change request related to a target resource object to the container management platform, wherein the target resource object is one of at least one container management service of a target type provided by the container management platform, the change request related to the target resource object at least comprising configuration information of the target resource object and content of the change, the configuration information of the target resource object comprising a detection identifier indicating an operation to be performed for the target resource object, the detection identifier being used to uniquely identify the change request related to the target resource object. The first obtaining module 902 is configured to obtain, from the container management platform, target change information within a preset period of time according to the detection identifier, wherein the target change information is information generated by the container management platform to change the target resource object in each stage from start to end of the change according to a change request related to the target resource object. The first detection module 903 is configured to determine a detection result regarding the container management platform based at least on the target change information.
It should be noted that the various modules described above may be implemented in software or hardware or a combination of both. The different modules may be implemented in the same software or hardware structure or one module may be implemented by different software or hardware structures.
According to the device for detecting the container management platform, according to some embodiments of the present application, a change request related to a target resource object is sent to the container management platform, so that the container management platform invokes each module of the container management platform to complete the change request, and meanwhile, in the process of completing the change request, because a detection identifier is added in configuration information of the target resource object, and the configuration information is always reserved by the container management platform during changing, the change information related to the target resource object generated by the container management platform is attached with the detection identifier, so that change information generated by the container management platform for completing the change request can be obtained by automatically screening the change information attached with the detection identifier from various change information, and a control server or a node server does not need to be manually screened, and the change information generated by the container management platform for completing the change request does not need to be manually screened from a large amount of change information, so that the detection efficiency can be significantly improved, and the detection cost can be reduced.
In some embodiments, the change request related to the target resource object sent by the requesting device further includes a container index for establishing a target container and environmental information of an expected target container, the target container is configured to have a preset detecting tool, the preset detecting tool is automatically operated when the target container is established and is used for detecting the environmental information of the target container, the environmental information indicates an execution environment provided by the target container, the device of the detecting container management platform further includes a second obtaining module and a second detecting module, the second obtaining module is configured to obtain the environmental information of the target container, and the second detecting module is configured to determine a second detection result related to the container management platform according to the environmental information of the expected target container and the environmental information of the target container in the change request related to the target resource object.
FIG. 10 illustrates an example system 1000 that includes an example computing device 1010 that represents one or more systems and/or devices that can implement the various methods described herein. Computing device 1010 may be, for example, a server of a service provider, a device associated with a server, a system-on-chip, and/or any other suitable computing device or computing system. The apparatus 900 of detecting a container management platform described above with reference to fig. 9 may take the form of a computing device 1010. Alternatively, the apparatus 900 for detecting a container management platform may be implemented as a computer program in the form of an application 1016.
The example computing device 1010 as illustrated includes a processing system 1011, one or more computer-readable media 1012, and one or more I/O interfaces 1013 communicatively coupled to each other. Although not shown, computing device 1010 may also include a system bus or other data and command transfer system that couples the various components to one another. The system bus may include any one or combination of different bus structures, such as a memory bus or memory controller, a peripheral bus, a universal serial bus, and/or a processor or local bus that utilizes any of a variety of bus architectures. Various other examples are also contemplated, such as control and data lines.
The processing system 1011 represents functionality that performs one or more operations using hardware. Thus, the processing system 1011 is illustrated as including hardware elements 1014 that may be configured as processors, functional blocks, and the like. This may include implementation in hardware as application specific integrated circuits or other logic devices formed using one or more semiconductors. The hardware elements 1014 are not limited by the materials from which they are formed or the processing mechanisms employed therein. For example, the processor may be comprised of semiconductor(s) and/or transistors (e.g., electronic Integrated Circuits (ICs)). In such a context, the processor-executable instructions may be electronically-executable instructions.
Computer-readable medium 1012 is illustrated as including memory/storage 1015. Memory/storage 1015 represents memory/storage capacity associated with one or more computer-readable media. Memory/storage 1015 may include volatile media such as Random Access Memory (RAM) and/or nonvolatile media such as Read Only Memory (ROM), flash memory, optical disks, magnetic disks, and so forth. The memory/storage 1015 may include fixed media (e.g., RAM, ROM, a fixed hard drive, etc.) and removable media (e.g., flash memory, a removable hard drive, an optical disk, and so forth). The computer-readable medium 1012 may be configured in a variety of other ways as described further below.
The one or more I/O interfaces 1013 represent functions that allow a user to input commands and information to the computing device 1010 using various input devices, and optionally also allow information to be presented to the user and/or other components or devices using various output devices. Examples of input devices include keyboards, cursor control devices (e.g., mice), microphones (e.g., for voice input), scanners, touch functions (e.g., capacitive or other sensors configured to detect physical touches), cameras (e.g., motion that does not involve touches may be detected as gestures using visible or invisible wavelengths such as infrared frequencies), and so forth. Examples of output devices include a display device, speakers, printer, network card, haptic response device, and the like. Accordingly, computing device 1010 may be configured in a variety of ways to support user interaction as described further below.
Computing device 1010 also includes applications 1016. The application 1016 may be, for example, a software instance of the apparatus 900 that detects a container management platform and implements the techniques described herein in combination with other elements in the computing device 1010.
The present application provides a computer program product comprising computer instructions stored in a computer readable storage medium. The processor of the computing device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions to cause the computing device to perform the various embodiments described above.
Various techniques may be described herein in the general context of software hardware elements or program modules. Generally, these modules include routines, programs, objects, elements, components, data structures, etc. that perform particular tasks or implement particular abstract data types. The terms "module," "functionality," and "component" as used herein generally represent software, firmware, hardware, or a combination thereof. The features of the techniques described herein are platform-independent, meaning that the techniques may be implemented on a variety of computing platforms having a variety of processors.
An implementation of the described modules and techniques may be stored on or transmitted across some form of computer readable media. Computer-readable media can include a variety of media that are accessible by computing device 1010. By way of example, and not limitation, computer readable media may comprise "computer readable storage media" and "computer readable signal media".
"Computer-readable storage medium" refers to a medium and/or device that can permanently store information and/or a tangible storage device, as opposed to a mere signal transmission, carrier wave, or signal itself. Thus, computer-readable storage media refers to non-signal bearing media. Computer-readable storage media include hardware such as volatile and nonvolatile, removable and non-removable media and/or storage devices implemented in methods or techniques suitable for storage of information such as computer-readable instructions, data structures, program modules, logic elements/circuits or other data. Examples of a computer-readable storage medium may include, but are not limited to RAM, ROM, EEPROM, flash memory or other memory technology, CD-ROM, digital Versatile Disks (DVD) or other optical storage, hard disk, magnetic cassettes, magnetic tape, magnetic disk storage or other magnetic storage devices, or other storage devices, tangible media, or articles of manufacture adapted to store the desired information and which may be accessed by a computer.
"Computer-readable signal medium" refers to a signal bearing medium configured to transmit instructions to hardware of computing device 1010, such as via a network. Signal media may typically be embodied in computer readable instructions, data structures, program modules, or other data in a modulated data signal, such as a carrier wave, data signal, or other transport mechanism. Signal media also include any information delivery media. The term "modulated data signal" means a signal that has one or more of its characteristics set or changed in such a manner as to encode information in the signal. By way of example, and not limitation, communication media includes wired media such as a wired network or direct-wired connection, and wireless media such as acoustic, RF, infrared and other wireless media.
As before, the hardware elements 1014 and computer-readable media 1012 represent instructions, modules, programmable device logic, and/or fixed device logic implemented in hardware that, in some embodiments, may be used to implement at least some aspects of the techniques described herein. The hardware elements may include integrated circuits or components of a system on a chip, application Specific Integrated Circuits (ASICs), field Programmable Gate Arrays (FPGAs), complex Programmable Logic Devices (CPLDs), and other implementations in silicon or other hardware devices. In this context, the hardware elements may be implemented as processing devices that perform program tasks defined by instructions, modules, and/or logic embodied by the hardware elements, as well as hardware devices that store instructions for execution, such as the previously described computer-readable storage media.
Combinations of the foregoing may also be used to implement the various techniques and modules herein. Thus, software, hardware, or program modules and other program modules may be implemented as one or more instructions and/or logic embodied on some form of computer readable storage medium and/or by one or more hardware elements 1014. Computing device 1010 may be configured to implement particular instructions and/or functions corresponding to software and/or hardware modules. Thus, for example, by using the computer-readable storage medium of the processing system and/or the hardware elements 1014, a module may be implemented at least in part in hardware as a module executable by the computing device 1010 as software. The instructions and/or functions may be executable/operable by one or more articles of manufacture (e.g., one or more computing devices 1010 and/or processing systems 1011) to implement the techniques, modules, and examples described herein.
In various implementations, the computing device 1010 may take on a variety of different configurations. For example, computing device 1010 may be implemented as a computer-like device including a personal computer, desktop computer, multi-screen computer, laptop computer, netbook, and the like. Computing device 1010 may also be implemented as a mobile appliance-like device including mobile devices such as mobile telephones, portable music players, portable gaming devices, tablet computers, multi-screen computers, and the like. Computing device 1010 may also be implemented as a television-like device that includes devices having or connected to generally larger screens in casual viewing environments. Such devices include televisions, set-top boxes, gaming machines, and the like.
The techniques described herein may be supported by these various configurations of computing device 1010 and are not limited to the specific examples of techniques described herein. The functionality may also be implemented in whole or in part on the "cloud" 1020 through the use of a distributed system, such as through the platform 1022 described below.
Cloud 1020 includes and/or is representative of a platform 1022 for resources 1024. The platform 1022 abstracts underlying functionality of hardware (e.g., servers) and software resources of the cloud 1020. The resources 1024 may include applications and/or data that can be used when executing computer processing on servers remote from the computing device 1010. The resources 1024 may also include services provided over the internet and/or over subscriber networks such as cellular or Wi-Fi networks.
The platform 1022 may abstract resources and functions to connect the computing device 1010 with other computing devices. The platform 1022 may also be used to abstract a hierarchy of resources to provide a corresponding level of hierarchy of encountered demand for resources 1024 implemented via the platform 1022. Thus, in an interconnect device embodiment, implementation of the functionality described herein may be distributed throughout system 1000. For example, the functionality may be implemented in part on the computing device 1010 and by the platform 1022 that abstracts the functionality of the cloud 1020.
It will be appreciated that for clarity, embodiments of the application have been described with reference to different functional units. However, it will be apparent that the functionality of each functional unit may be implemented in a single unit, in a plurality of units or as part of other functional units without departing from the application. For example, functionality illustrated to be performed by a single unit may be performed by multiple different units. Thus, references to specific functional units are only to be seen as references to suitable units for providing the described functionality rather than indicative of a strict logical or physical structure or organization. Thus, the application may be implemented in a single unit or may be physically and functionally distributed between different units and circuits.
Although the present application has been described in connection with some embodiments, it is not intended to be limited to the specific form set forth herein. Rather, the scope of the application is limited only by the appended claims. Additionally, although individual features may be included in different claims, these may possibly be advantageously combined, and the inclusion in different claims does not imply that a combination of features is not feasible and/or advantageous. The order of features in the claims does not imply any specific order in which the features must be worked. Furthermore, in the claims, the word "comprising" does not exclude other elements, and the term "a" or "an" does not exclude a plurality. Reference signs in the claims are provided merely as a clarifying example and shall not be construed as limiting the scope of the claims in any way.

Claims (15)

1. A method of inspecting a container management platform, comprising:
Transmitting a change request related to a target resource object to the container management platform, wherein the target resource object is one of at least one container management service of a target type provided by the container management platform, the change request related to the target resource object at least comprising configuration information of the target resource object and changed content, the configuration information of the target resource object comprising a detection identifier indicating an operation to be performed with respect to the target resource object, the detection identifier being used to uniquely identify the change request related to the target resource object;
Acquiring target change information in a preset time period from the container management platform according to the detection identifier, wherein the target change information is generated by the container management platform according to the change request related to the target resource object, wherein the change request is generated by changing the target resource object in each stage from the beginning to the ending of the change;
and determining a detection result related to the container management platform at least according to the target change information.
2. The method of claim 1, wherein the obtaining, from the container management platform, the target change information for a preset period of time according to the detection identifier comprises:
acquiring a plurality of change information related to the resource object of the target type from the container management platform, wherein the resource object of the target type is a container management service with the same type as the target resource object;
And selecting the target change information from the plurality of change information related to the resource objects of the target type according to the detection identifier.
3. The method of claim 2, wherein the plurality of change information related to the resource object of the target type is stored in the container management platform in series as stored data; and
Wherein the obtaining, from the container management platform, a plurality of change information related to the resource object of the target type includes:
obtaining, from the container management platform, stored data indicative of the plurality of change information pertaining to the resource object of the target type;
And performing deserialization processing on the stored data to obtain the plurality of change information related to the resource object of the target type.
4. The method of claim 1, wherein the determining a test result for the container management platform based at least on the target change information comprises:
And in response to the target change information including change error information, determining the change error information as the first detection result of the container management platform.
5. The method of claim 1, wherein the determining a test result for the container management platform based at least on the target change information comprises:
Determining final change result information according to the detection identifier;
And verifying the expected change result information and the final change result information to determine a second detection result about the container management platform, wherein the expected change result information is determined according to the change request related to the target resource object.
6. The method of claim 5, wherein the determining a second test result for the container management platform based on the expected change result information and the final change result information comprises:
And in response to the expected change result information and the final change result information not being consistent, determining the final change result information and the target change information as the second detection result about the container management platform.
7. The method of claim 1, wherein the change request related to a target resource object further includes a container index for establishing a target container and expected environmental information of the target container, the target container configured with a preset detection tool that is automatically run upon establishment of the target container and is used to detect the environmental information of the target container, the environmental information indicating an execution environment provided by the target container, and the method further comprising:
acquiring environment information of the target container;
And verifying the environment information of the target container expected in the change request related to the target resource object and the environment information of the target container to determine a third detection result about the container management platform.
8. The method of claim 7, wherein the preset detection means comprises network detection means for providing a network access interface and transmitting configuration information of a network configured in the target container to an access requester in response to receiving a network access request; and
Wherein the obtaining the environmental information of the target container includes:
Sending a network access request to a network access interface of the target container;
configuration information of a network configured in the target container is received from the target container as at least part of environment information of the target container.
9. The method of claim 7, wherein the predetermined detection means comprises memory detection means for detecting memory information allocated to the target container; and
Wherein the obtaining the environmental information of the target container includes:
and acquiring memory information allocated to the target container as at least part of environment information of the target container.
10. The method of claim 7, wherein the preset detection means further comprises storage device detection means for detecting whether a storage device is accessible in the target container; and
Wherein the obtaining the environmental information of the target container includes:
information whether a storage device is accessible in the target container is acquired as at least part of the environment information of the target container.
11. An apparatus for inspecting a container management platform, comprising:
A request module configured to send a change request related to a target resource object to the container management platform, wherein the target resource object is one of at least one container management service of a target type provided by the container management platform, the change request related to the target resource object including at least configuration information of the target resource object and changed content, the configuration information of the target resource object including a detection identifier indicating an operation to be performed with respect to the target resource object, the detection identifier being used to uniquely identify the change request related to the target resource object;
A first acquisition module configured to acquire target change information within a preset period of time from the container management platform according to the detection identifier, wherein the target change information is information generated by the container management platform by changing the target resource object in each stage from start to end of the change according to the change request related to the target resource object;
And the first detection module is configured to determine a detection result related to the container management platform at least according to the target change information.
12. The apparatus of claim 11, wherein the change request related to the target resource object sent by the requesting apparatus further includes a container index for establishing a target container and expected environment information of the target container, the target container configured with a preset detection tool that is automatically operated when the target container is established and is used to detect the environment information of the target container, the environment information indicating an execution environment provided by the target container, the apparatus further comprising:
a second acquisition module configured to acquire environmental information of the target container;
And a second detection module configured to determine a second detection result regarding the container management platform according to the environmental information of the target container and the environmental information of the target container expected in the change request related to the target resource object.
13. A computing device, comprising:
a memory configured to store computer-executable instructions;
A processor configured to perform the method of any of claims 1-10 when the computer executable instructions are executed by the processor.
14. A computer readable storage medium storing computer executable instructions which, when executed, perform the method of any one of claims 1-10.
15. A computer program product, wherein the computer program product comprises computer executable instructions which, when executed, implement the method according to any one of claims 1 to 10.
CN202211572244.8A 2022-12-08 2022-12-08 Method and device for detecting container management platform, computing equipment and storage medium Pending CN118170491A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211572244.8A CN118170491A (en) 2022-12-08 2022-12-08 Method and device for detecting container management platform, computing equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211572244.8A CN118170491A (en) 2022-12-08 2022-12-08 Method and device for detecting container management platform, computing equipment and storage medium

Publications (1)

Publication Number Publication Date
CN118170491A true CN118170491A (en) 2024-06-11

Family

ID=91353705

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211572244.8A Pending CN118170491A (en) 2022-12-08 2022-12-08 Method and device for detecting container management platform, computing equipment and storage medium

Country Status (1)

Country Link
CN (1) CN118170491A (en)

Similar Documents

Publication Publication Date Title
US8910172B2 (en) Application resource switchover systems and methods
CA2852760C (en) Migration assessment for cloud computing platforms
US8762929B2 (en) System and method for exclusion of inconsistent objects from lifecycle management processes
US9386079B2 (en) Method and system of virtual desktop infrastructure deployment studio
CA2919839C (en) Virtual computing instance migration
US20080294764A1 (en) Storage medium bearing hba information provision program, hba information provision method and hba information provision apparatus
US9535754B1 (en) Dynamic provisioning of computing resources
US8756385B2 (en) Software configuration item back-up facility
US20150236799A1 (en) Method and system for quick testing and detecting mobile devices
CN107526676B (en) Cross-system test method and device
US20060294141A1 (en) Smart business object proxy
US20160127177A1 (en) Installation of an arbitrary server as an extenstion of a computing platform
US20240281520A1 (en) Container-based task execution method and apparatus
CN103309751A (en) Apparatus and method of terminal for providing file system function
CN112256406B (en) Operation flow platformization scheduling method
CN110647470A (en) Test method, manufacturing method, device, medium, and electronic apparatus
CN116974874A (en) Database testing method and device, electronic equipment and readable storage medium
US11443011B2 (en) Page objects library
US20220271993A1 (en) Automated host management service
CN118170491A (en) Method and device for detecting container management platform, computing equipment and storage medium
US20090187366A1 (en) Test apparatus and methods thereof
US11836523B2 (en) Introspection of a containerized application in a runtime environment
CN115237889A (en) Database switching method and device, storage medium and computer equipment
CN114519477A (en) Large data platform tenant management system, method, storage medium and electronic equipment
CN106990990B (en) Resource dynamic maintenance system based on resource configuration driver library

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication