A business processing method, device and equipment for container operation and maintenance

By starting the accompanying container that shares the namespace with the business container on the physical machine and configuring resource restrictions for it, the problem of operating and maintenance commands occupying business container resources is solved, and a more reliable and secure operation and maintenance process is achieved.

CN114860377BActive Publication Date: 2025-03-14ALIPAY (HANGZHOU) INFORMATION TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202210451771.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-04-24
Publication Date
2025-03-14
Estimated Expiration
2042-04-24

AI Technical Summary

Technical Problem

When operating and maintaining business containers, the prior art may interfere with the normal business operation in the container, resulting in insufficient memory or other resource problems, and thus lead to business applications crash.

Method used

By starting an accompanying container that shares the namespace with the target service container on the physical machine and configuring resource limit information for the accompanying container, dynamically obtaining the resources of the accompanying container to execute operation and maintenance commands to avoid occupying the resources of the service container.

Benefits of technology

It realizes that the operation and maintenance commands are executed without affecting the normal operation of the business container, which improves the reliability and operation and maintenance of the business container, and at the same time improves the user's interface interactive experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114860377B_ABST
    Figure CN114860377B_ABST
Patent Text Reader

Abstract

The embodiments of this specification disclose a business processing method, device and equipment for container operation and maintenance, which belongs to the field of computer operation and maintenance technology. The scheme includes: determining the physical machine corresponding to the target business container; on the physical machine, starting a companion container for the target business container that shares at least part of the namespace with the target business container, and configuring resource restriction information for the companion container; obtaining the resources of the companion container under the restriction indicated by the resource restriction information; through the interaction between the companion container and the target business container, displaying the operation and maintenance control interface containing the view within the target business container, and using the resources to execute operation and maintenance commands for the target business container.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of computer operation and maintenance technology, and in particular to a business processing method, device and equipment for container operation and maintenance. Background Art

[0002] Container is a technology that isolates the application running environment, such as the Docker container under Linux.

[0003] Running certain services in an isolated environment provided by a container helps improve security and better manage resources for these services. Such containers are called business containers. In actual applications, it is often necessary to perform maintenance operations on business containers. Specifically, it is usually necessary to enter the business container and execute maintenance commands, such as the grep command for regular search in Linux and the rpm command for managing packages.

[0004] Under the current operation and maintenance mode, the operation and maintenance actions on the business container may interfere with the normal operation of the business in the business container. For example, if the operation and maintenance personnel execute a large amount of operation and maintenance commands that consume a lot of memory, it may trigger the business container to have insufficient memory, causing the business process in the business container to be killed, which may cause the business application to crash, resulting in serious consequences.

[0005] Based on this, a more reliable operation and maintenance solution is needed for business containers. Summary of the invention

[0006] One or more embodiments of the present specification provide a business processing method, apparatus, device, and storage medium for container operation and maintenance to solve the following technical problem: a more reliable operation and maintenance solution for business containers is needed.

[0007] To solve the above technical problems, one or more embodiments of this specification are implemented as follows:

[0008] One or more embodiments of this specification provide a business processing method for container operation and maintenance, including:

[0009] Determine the physical machine corresponding to the target business container;

[0010] On the physical machine, start a companion container for the target business container that shares at least part of the namespace with the target business container, and configure resource restriction information for the companion container;

[0011] Acquire resources of the companion container under the restriction indicated by the resource restriction information;

[0012] Through the interaction between the companion container and the target business container, an operation and maintenance control interface including the view in the target business container is displayed, and the operation and maintenance commands for the target business container are executed by using the resources.

[0013] One or more embodiments of this specification provide a service processing device for container operation and maintenance, including:

[0014] The container physical machine determination module determines the physical machine corresponding to the target business container;

[0015] A companion container startup configuration module is used to start, on the physical machine, a companion container for the target business container that shares at least part of the namespace with the target business container, and configure resource restriction information for the companion container;

[0016] A companion container resource acquisition module, which acquires resources of the companion container under the restriction indicated by the resource restriction information;

[0017] The operation and maintenance management and control interactive execution module displays an operation and maintenance management and control interface including a view within the target business container through the interaction between the companion container and the target business container, and uses the resources to execute operation and maintenance commands for the target business container.

[0018] One or more embodiments of this specification provide a business processing device for container operation and maintenance, including:

[0019] at least one processor; and,

[0020] a memory communicatively connected to the at least one processor; wherein,

[0021] The memory stores instructions executable by the at least one processor, the instructions being executed by the at least one processor to enable the at least one processor to:

[0022] Determine the physical machine corresponding to the target business container;

[0023] On the physical machine, start a companion container for the target business container that shares at least part of the namespace with the target business container, and configure resource restriction information for the companion container;

[0024] Acquire resources of the companion container under the restriction indicated by the resource restriction information;

[0025] Through the interaction between the companion container and the target business container, an operation and maintenance control interface including the view in the target business container is displayed, and the operation and maintenance commands for the target business container are executed by using the resources.

[0026] One or more embodiments of this specification provide a non-volatile computer storage medium storing computer executable instructions, wherein the computer executable instructions are configured to:

[0027] Determine the physical machine corresponding to the target business container;

[0028] On the physical machine, start a companion container for the target business container that shares at least part of the namespace with the target business container, and configure resource restriction information for the companion container;

[0029] Acquire resources of the companion container under the restriction indicated by the resource restriction information;

[0030] Through the interaction between the companion container and the target business container, an operation and maintenance control interface including the view in the target business container is displayed, and the operation and maintenance commands for the target business container are executed by using the resources.

[0031] At least one of the above-mentioned technical solutions adopted in one or more embodiments of the present specification can achieve the following beneficial effects: on the one hand, an available companion container is dynamically provided for the business container, and the resources of the companion container are used to execute operation and maintenance commands for the business container without occupying the resources of the business container, and corresponding resource restrictions are imposed on the companion container, so that if the operation and maintenance command occupies too many resources, it will only affect the operation and maintenance command itself under the restriction, and will not threaten the business process in the business container; on the other hand, although the resources of the companion container are used, through the interaction between the companion container and the business container, it is possible to switch to the view in the business container, display it in the operation and maintenance control interface, and execute operation and maintenance commands in the business container, thereby preventing the view in the companion container from causing confusion and inconsistency to the user, and improving the user's interface interaction experience when implementing operation and maintenance behaviors. BRIEF DESCRIPTION OF THE DRAWINGS

[0032] In order to more clearly illustrate the embodiments of this specification or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in this specification. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.

[0033] Figure 1 A flowchart of a business processing method for container operation and maintenance provided in one or more embodiments of this specification;

[0034] Figure 2 A flowchart of a specific implementation scheme for obtaining and using container resources in an application scenario provided by one or more embodiments of this specification;

[0035] Figure 3 In an application scenario provided by one or more embodiments of this specification, Figure 1 A schematic diagram of a process architecture of a specific implementation scheme of the method;

[0036] Figure 4 A schematic diagram of the structure of a business processing device for container operation and maintenance provided in one or more embodiments of this specification;

[0037] Figure 5 A schematic diagram of the structure of a business processing device for container operation and maintenance provided in one or more embodiments of this specification. DETAILED DESCRIPTION

[0038] The embodiments of this specification provide a business processing method, apparatus, device and storage medium for container operation and maintenance.

[0039] In order to enable those skilled in the art to better understand the technical solutions in this specification, the technical solutions in the embodiments of this specification will be clearly and completely described below in conjunction with the drawings in the embodiments of this specification. Obviously, the described embodiments are only part of the embodiments of this application, not all of them. Based on the embodiments of this specification, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of this application.

[0040] The background technology mentions an example of operation and maintenance commands under Linux. In practical applications, many container operation and maintenance behaviors are performed under Linux. Therefore, in order to better understand this solution, some of the following embodiments will also be described in detail using the container operation and maintenance scenario under Linux as an example.

[0041] In one or more embodiments of this specification, Kubernetes is used. Kubernetes is an open source container cluster orchestration and scheduling software. Pod is the smallest unit of scheduling under Kubernetes, and a group of containers sharing part of the namespace constitutes a Pod. At first, it was considered to use the kubectl exec application programming interface as the operation and maintenance command channel. On the physical machine node (in a cluster, a node may correspond to one or more physical machines), by calling docker exec, enter the business container, and then the operation and maintenance personnel can execute some operation and maintenance commands, such as yuminstall, maven install, grep, etc. However, this may also cause the problems mentioned in the background technology.

[0042] Based on this, a new solution is proposed to solve the above problem. Under this solution, the resources used by the operation and maintenance commands can be limited, and at the same time, the operation and maintenance commands do not occupy or minimize the occupation of the business container's own resources. Therefore, when the operation and maintenance personnel execute an operation and maintenance command that occupies a lot of resources (for example, memory), at most it may cause the operation and maintenance command itself to be abnormal (for example, being killed), and will not trigger the business process to be abnormal, thereby protecting the normal operation of the business and improving business reliability.

[0043] Based on this idea, the following is further explained in detail.

[0044] Figure 1 A flowchart of a business processing method for container operation and maintenance provided for one or more embodiments of this specification. The method can be applied to different business fields, such as e-commerce business field, financial business field, electronic payment business field, instant messaging business field, robot business field, video service business field, game business field, official business field, etc. The process can be executed by a computing device in the corresponding field (such as an operation and maintenance server corresponding to the e-commerce business, etc.), and some input parameters or intermediate results in the process allow manual intervention and adjustment to help improve accuracy.

[0045] Figure 1 The process in may include the following steps:

[0046] S102: Determine the physical machine corresponding to the target business container.

[0047] In one or more embodiments of this specification, if the operation and maintenance personnel want to perform a round of operation and maintenance on a certain business container, the business container is used as the target business container. In a round of operation and maintenance, the operation and maintenance personnel can issue one or more operation and maintenance commands, and each operation and maintenance command may correspond to multiple specific operation and maintenance steps.

[0048] A container is a logical concept that requires a physical device to carry it, namely the physical machine.

[0049] The physical machine corresponding to the target business container may include the physical machine where the target business container is located. The main purpose of step S102 is to facilitate the subsequent interaction with the target business container based on the physical machine to assist in completing the operation and maintenance behavior more efficiently and reliably. Of course, other physical machines that can achieve this purpose can also be used as the physical machine corresponding to the target business container, for example, other physical machines that belong to the same cluster as the physical machine where the target business container is located and have an available operation and maintenance command channel between the two.

[0050] S104: On the physical machine, start a companion container for the target business container that shares at least part of the namespace with the target business container, and configure resource restriction information for the companion container.

[0051] The execution of operation and maintenance commands requires corresponding resources. Memory is one of the basic resources. In addition, other resources such as processors, network bandwidth, time slots, tokens, etc. may also be required.

[0052] In one or more embodiments of the present specification, the resources required to execute the operation and maintenance command are provided by the container, but not by the target business container itself, but by the companion container of the target business container. The companion container and its corresponding business container run in the same minimum scheduling unit, share part or all of the namespace, and are used to assist the business container in performing some operations.

[0053] For this solution, operation and maintenance commands can be executed through the corresponding process. In this case, the resource limit configuration can be used to limit the resources required by the process. In addition, the target business container and the companion container may also interact through the process in the future. The flexible use of processes can help this solution to be better implemented. Based on this, the target business container can start at least sharing the process-related namespace with the companion container, such as the process identifier (PID) namespace, to prevent the isolation of the process between the two. In addition, other types of namespaces can be shared by the two according to needs, such as network namespaces, user namespaces, etc.

[0054] The companion container and its corresponding business container each have independent resources that can be used to execute operation and maintenance commands. With the resource support of the companion container, the operation and maintenance commands do not need to occupy the resources of the target business container, thereby preventing the resource requirements of the normal business operation in the target business container from being threatened.

[0055] The companion container can be started along with the corresponding business container, and the life cycles of the two are consistent to better coordinate work. However, in one or more embodiments of the present specification, the companion container is dynamically triggered to start by the operation and maintenance command to be executed. After the operation and maintenance command or the current round of operation and maintenance behavior is completed, the companion container is invalidated, and the next time it is needed, a valid and available companion container is obtained again. In this way, through such a "use and throw away" flexible and dynamic processing method, the resources of the companion container can be released in time to reduce the pressure on the entire system; not only that, it also helps to reduce the risk of indirectly attacking the business container through the companion container.

[0056] It should be noted that the previous paragraph emphasizes timely and automatic intervention after the end of the phased operation and maintenance to reduce the impact of the companion container on the entire system. In actual implementation, the appropriate specific intervention time and intervention means are selected according to the needs. For example, the operation and maintenance control interface can be used to determine whether the current round of operation and maintenance behavior has ended. If the operation and maintenance control interface detects that the user closes the corresponding container view or the user clicks the control used to clearly confirm the end of the operation and maintenance behavior, it can be determined that it has ended, and then timely and automatic intervention can be carried out, such as automatically converting the companion container to a non-operating state, or automatically deleting the companion container, etc.

[0057] In one or more embodiments of the present specification, resource restriction information is configured for the companion container to limit usage of the resources of the companion container.

[0058] Specifically for the scenario of this solution, at least the operation and maintenance commands can be restricted from excessive use or even explosion of the resources of the companion container. If the resources of the companion container are basically provided to the operation and maintenance commands, the specific content of the resource restriction information can be set relatively simply. For example, if it is defined as 1 core 500M memory, then the resources that the operation and maintenance commands can obtain will not exceed 1 core 500M memory. Of course, according to actual needs, resource restrictions can also be set in a more fine-grained manner, such as the maximum amount of memory allowed for a specified type of operation and maintenance operation steps, the maximum amount of memory used for processes interacting with the target business container according to the operation and maintenance commands, the maximum number of threads allowed for serving the operation and maintenance instructions, and so on.

[0059] S106: Acquire resources of the companion container under the restriction indicated by the resource restriction information.

[0060] In one or more embodiments of the present specification, after the operation and maintenance personnel issue an operation and maintenance command, the resources of the companion container are obtained according to the operation and maintenance command to execute the operation and maintenance command. The restrictions indicated by the resource restriction information are also valid during the execution of the operation and maintenance command. During the execution process, the resources occupied by the operation and maintenance command may change dynamically. If the change is to exceed the restriction, the operation and maintenance command can be restricted or even terminated through the companion container, so as not to affect the operation of the business container.

[0061] For example, whether it is pre-fetching the resources of the companion container before executing the operation and maintenance command, or dynamically obtaining the resources of the companion container during the execution process, the companion container can monitor the status of the operation and maintenance command based on the resource limitation information, and determine whether the resources required for the operation and maintenance command to be executed or in execution will cause or have caused the limit indicated by the resource limitation information to be exceeded. If so, corresponding defense measures can be taken in time to protect the business operation in the target business container, such as terminating the companion container to wait for the allocation and use of excess resources, and then restarting the operation and maintenance command, or directly terminating the operation and maintenance command to give priority to business protection.

[0062] S108: Displaying an operation and maintenance management interface including a view in the target business container through interaction between the companion container and the target business container, and executing operation and maintenance commands for the target business container using the resources.

[0063] In one or more embodiments of the present specification, the operation and maintenance control interface of the target business container is displayed according to the companion container and the resource, and the operation and maintenance command for the target business container is executed. For example, in the companion container, the operation and maintenance command is started and interacted with the target business container by using the above-mentioned resource, and then the operation and maintenance command is executed in the target business container by continuing to use the resource, and the view can be automatically switched from the companion container to the target business container.

[0064] The operation and maintenance personnel issue operation and maintenance commands through the operation and maintenance control interface, and consider directly executing the operation and maintenance commands for the target business container in the companion container. In this way, not only the resources of the target business container do not need to be occupied, but even the environment of the target business container does not need to be occupied, and the reliability is higher. However, this solution also has problems. If the operation and maintenance commands are directly executed in the companion container, the operation and maintenance personnel can see the root directory files and execution environment of the companion container in the operation and maintenance control interface. However, the operation and maintenance object is the target business container. In this case, it will cause confusion and inconsistent experience for users.

[0065] In response to the problem in the previous paragraph, the solution is further improved. Operation and maintenance commands can be executed outside the companion container. The companion container is responsible for starting the operation and maintenance commands at most, and the actual execution of the operation and maintenance commands is performed in the target business container. In order to improve the user's consistent experience, the companion container can interact with the target business container and switch the view to the target business container. In the operation and maintenance control interface, it is convenient for operation and maintenance personnel to see the data and environment they are directly operating, and the interactive experience is better.

[0066] More specifically, the specific content (referred to as target content) displayed in the above view is determined according to demand. More critical content, such as the root file system, may be displayed first. In addition, other content such as at least part of the namespace may also be displayed if necessary.

[0067] pass Figure 1The method, on the one hand, dynamically provides an available companion container for the business container, uses the resources of the companion container to execute operation and maintenance commands for the business container without occupying the resources of the business container, and imposes corresponding resource restrictions on the companion container, so that if the operation and maintenance command occupies too many resources, it will only affect the operation and maintenance command itself under the restriction, and will not threaten the business process in the business container; on the other hand, although the resources of the companion container are used, through the interaction between the companion container and the business container, it is possible to switch to the view in the business container, display it in the operation and maintenance control interface, and execute the operation and maintenance command in the business container, which prevents the view in the companion container from causing confusion and inconsistency to the user, and improves the user's interface interaction experience when implementing operation and maintenance behaviors.

[0068] based on Figure 1 This specification also provides some specific implementation plans and extension plans of the method, which will be described below.

[0069] In one or more embodiments of the present specification, it has been mentioned above that the present solution tends to use the resources of the companion container to execute operation and maintenance commands. However, considering that in some application scenarios, if the companion container is only used to serve the operation and maintenance commands, it is not appropriate to allocate or reserve too many resources for the companion container. This is because in actual applications, the specific operations in a round of operation and maintenance behavior may not be compact and timely, and there may even be a long idle waiting time. In this case, some resources may be occupied by the companion container for a long time without being effectively used.

[0070] Based on this, we consider using the companion container as the main component and the target business container as the auxiliary component to guarantee resources for operation and maintenance commands. This will help reduce the resources occupied by the companion container and make better use of idle resources. It should be noted that although the target business container is auxiliary, the overall idea of ​​this solution is still to try not to disturb or threaten the target business container.

[0071] More intuitively, based on the idea of ​​the previous paragraph, one or more embodiments of this specification provide a flowchart of a specific implementation scheme for obtaining and using container resources in an application scenario, such as Figure 2 shown.

[0072] Figure 2 The process may include the following steps:

[0073] S202: Decompose the operation and maintenance command to be executed into a first operation and maintenance sub-command set and a second operation and maintenance sub-command set.

[0074] In one or more embodiments of the present specification, the operation and maintenance subcommands have an execution sequence, and the execution sequence of the first operation and maintenance subcommand set precedes the execution sequence of the second operation and maintenance subcommand set.

[0075] S204: Acquire resources of the companion container for executing the first operation and maintenance sub-command set, and apply to the target business container for resources for executing the second operation and maintenance sub-command set.

[0076] In one or more embodiments of this specification, the first operation and maintenance sub-command set can be relatively small (occupying relatively few resources) to test the resource provision capabilities of the companion container. The resources required to execute the first operation and maintenance sub-command set are less than the resources required to execute the operation and maintenance command completely. By decomposing the operation and maintenance command, the phased demand for resources is clearer and more specific, rather than requesting sufficient or even excessive resources for the entire operation and maintenance command right away, thereby reducing the pressure on resource allocation.

[0077] S206: If the application is successful, after the first set of operation and maintenance sub-commands is executed, the second set of operation and maintenance sub-commands is continued to be executed using the resources of the companion container, and the termination risk of terminating the operation and maintenance commands based on the resource limitation information is monitored.

[0078] In one or more embodiments of the present specification, even after the application is successful, the target service container may temporarily not allocate the resources successfully applied for by the other party, but wait until the other party actually wants to use them before allocating them, that is, try to keep these resources in its own hands first, and temporarily use them for business operations, thereby minimizing the interruption to the business.

[0079] During the execution of the second operation and maintenance sub-command set, resource requirements may change, which may cause resource limits to be exceeded. The termination risk reflects the risk of exceeding the resource limits.

[0080] S208: If the termination risk is greater than a set threshold, resources requested from the target business container are obtained to execute the unexecuted portion of the second operation and maintenance sub-command set.

[0081] In one or more embodiments of the present specification, if the termination risk is greater than the set threshold, it means that the resources of the companion container alone may not be sufficient to support the continued execution of the second operation and maintenance sub-command set. Then you can choose to terminate the second operation and maintenance sub-command set. Of course, this will bring a negative experience to the operation and maintenance personnel. In the case of assistance from the target business container, you can use the resources successfully applied for from the target business container to continue to execute the second operation and maintenance sub-command set. Of course, it is more reliable. At this time, the target business container can detect whether it is currently suitable to provide this part of the resources. If the result is no, then even if the application was successful before, the target business container can refuse to provide resources and give priority to business protection.

[0082] Following a similar idea, the operation and maintenance commands can be decomposed into more subsets to buffer resource conflicts and provide more resource coordination space between the companion container and the target business container.

[0083] pass Figure 2 In the solution, the resources of the target business container are released under the premise of enabling the companion container. However, they are not fully released. Instead, the resources of the target business container are used as auxiliary alternatives in emergency situations. By dividing the resource requirements in a fine-grained and phased manner, the additional impact of this auxiliary alternative on the target business container is minimized, thereby taking into account the experience of normal business and operation and maintenance personnel, and making more effective use of container resources.

[0084] In one or more embodiments of the present specification, in the above case, the target business container and the companion container not only share a namespace, but also have some collaborative scenarios in resources. For operation and maintenance personnel, it may be necessary to grasp the immediate relationship and coordination between the two containers. Then, if there is only a view in the target business container, the operation and maintenance personnel can only grasp the relevant results, but the cause and process data are not enough, which is not conducive to discovering and locating related problems arising in the operation and maintenance process. In order to solve this problem, the relationship between the two can be presented in a timely manner on the interface.

[0085] For example, a view of the target content in the companion container is obtained, and based on the obtained view, a mapping relationship between the target content in the target business container and the target content in the companion container is established, and a corresponding mapping relationship view is generated, and the mapping relationship view is displayed and dynamically updated in the current default operation and maintenance management interface. Taking resources as an example, when the target business container intervenes to assist in resources, the resources of the companion container used for partially executing the second operation and maintenance sub-command set are promptly mapped with the resources successfully requested from the target business container to dynamically reflect the real-time resource pressure borne by the two containers in response to the operation and maintenance behavior.

[0086] In one or more embodiments of this specification, the operation and maintenance control personnel often use other devices to operate the physical machine corresponding to the target business container. In order to better connect with the operation and maintenance control personnel, a special agent can be built on the physical machine to receive, convey, process or respond to the operation and maintenance commands issued by the operation and maintenance control personnel, as well as to uniformly manage the associated containers. Based on this idea, one or more embodiments of this specification provide an application scenario in which Figure 1 A schematic diagram of a process architecture of a specific implementation scheme of the method is shown in FIG. Figure 3 shown.

[0087] exist Figure 3In the above, the corresponding physical machine is specifically the physical machine where the target business container is located. The operation and maintenance control interface is, for example, a web user interaction interface, which is displayed on an operation and maintenance device other than the physical machine for operation by the operation and maintenance personnel. An operation and maintenance agent is set on the physical machine, and the operation and maintenance control interface can establish an operation and maintenance command channel with the operation and maintenance agent. Based on this solution, in a round of operation and maintenance behavior, the framework can specifically work in the following manner.

[0088] The operation and maintenance personnel operate so that the operation and maintenance equipment displays the current default operation and maintenance control interface. On this default interface, the operation and maintenance personnel can specify the target business container they want to operate. At this time, the interface cannot display some specific views in the target business container, such as the views of the root file system and namespace. The operation and maintenance personnel issue operation and maintenance commands for the target business container through this interface, for example, instructing the target business container to execute programs in directories such as / bin and / bash.

[0089] The operation and maintenance agent on the physical machine receives the operation and maintenance command through the operation and maintenance command channel. After that, the operation and maintenance agent can use the docker run command to pull up a dynamic companion container for the target business container, so that the companion container can share all namespaces with the target business container. Resource restriction information is set separately for the companion container. Here, "separate" means: the companion container has its own resources, which do not belong to the target business container. The use of these resources is restricted, and this restriction does not directly affect the target business container.

[0090] After the companion container is started, the operation and maintenance personnel can view the view in the companion container through the operation and maintenance control interface. For better experience, the companion container can start the operation and maintenance command to obtain the resources of the companion container for the operation and maintenance command to be executed, and automatically start the set inter-container access program. Through the inter-container access program, the target business container is accessed from the companion container to obtain the view of the target content (such as the root file system, namespace, etc.) in the target business container, so that the operation and maintenance control interface is switched from the view in the companion container to the view in the target business container. If it is predicted that the resources required for the operation and maintenance command will exceed the limit, the operation and maintenance command can be terminated directly.

[0091] In the view of the target business container, the operation and maintenance commands are actually executed in the target business container by using the resources of the companion container. During the execution process, if there is a risk of exceeding the resource limit, the operation and maintenance commands can also be directly terminated.

[0092] pass Figure 3The solution in the solution, based on dynamic companion containers, explicitly adds resource limits to the operation and maintenance commands to prevent them from taking over the main role and unreasonably occupying too many resources. In addition, the inter-container access program is used to timely switch the view of the target content between containers to achieve the visual feedback expectations of the operation and maintenance personnel for the target business container. The final effects achieved include: from the user experience point of view, the operation and maintenance personnel see the view of the target business container that is what they see, which is convenient for the next operation and maintenance behavior. At the same time, the resources consumed by all operation and maintenance behaviors are controllable, and the normal business process will not be harmed due to resource limit violations, which improves the overall reliability of the system.

[0093] Based on the same idea, one or more embodiments of this specification also provide devices and apparatuses corresponding to the above methods, such as Figure 4 , Figure 5 shown.

[0094] Figure 4 A schematic diagram of a business processing device for container operation and maintenance provided in one or more embodiments of this specification, the device comprising:

[0095] The container physical machine determination module 402 determines the physical machine corresponding to the target business container;

[0096] The companion container startup configuration module 404 determines resource restriction information related to the namespace of the target business container, starts a companion container that shares the namespace with the target business container for the target business container on the physical machine, and configures the resource restriction information for the companion container;

[0097] A companion container resource acquisition module 406 is configured to acquire resources of the companion container under the restriction indicated by the resource restriction information;

[0098] The operation and maintenance management and control interaction execution module 408 displays an operation and maintenance management and control interface including a view in the target business container through the interaction between the companion container and the target business container, and uses the resources to execute operation and maintenance commands for the target business container.

[0099] Optionally, the companion container resource acquisition module 406 determines whether the resources required by the operation and maintenance command to be executed cause the restriction to be exceeded;

[0100] If so, the operation and maintenance command is terminated through the companion container.

[0101] Optionally, the companion container starts a configuration module 404 to determine an operation and maintenance agent set on the physical machine;

[0102] Establishing an operation and maintenance command channel with the operation and maintenance agent;

[0103] The operation and maintenance command to be executed is received through the operation and maintenance command channel, so that the operation and maintenance agent starts a companion container that shares the namespace with the target business container.

[0104] Optionally, the resource restriction configuration is used to limit resources required to be used by a process, and the operation and maintenance command is executed by the process;

[0105] The companion container startup configuration module 404 starts a companion container for the target business container that shares a namespace of a process identifier with the target business container.

[0106] Optionally, the companion container resource acquisition module 406 decomposes the operation and maintenance command to be executed into a first operation and maintenance sub-command set and a second operation and maintenance sub-command set;

[0107] Acquire resources of the companion container for executing the first set of operation and maintenance subcommands, and apply to the target business container for resources for executing the second set of operation and maintenance subcommands;

[0108] The operation and maintenance control interaction execution module 408, if the application is successful, then after the first operation and maintenance sub-command set is executed, the second operation and maintenance sub-command set is continued to be executed using the resources of the companion container, and the termination risk of terminating the operation and maintenance command based on the resource limitation information is monitored;

[0109] If the termination risk is greater than a set threshold, resources requested from the target business container are obtained to execute the unexecuted portion of the second operation and maintenance sub-command set.

[0110] Optionally, the target service container is started earlier than the companion container;

[0111] The companion container startup configuration module 404, after the operation and maintenance control interaction execution module 408 displays the operation and maintenance control interface including the view in the target business container and uses the resources to execute the operation and maintenance command for the target business container, further executes:

[0112] Determine whether this round of operation and maintenance behavior is completed according to the operation and maintenance control interface;

[0113] If so, the companion container is automatically switched to a non-operating state, or the companion container is automatically deleted.

[0114] Optionally, the operation and maintenance control interaction execution module 408, before displaying the operation and maintenance control interface including the view in the target business container, further executes:

[0115] Displaying the current default operation and maintenance control interface so that the operation and maintenance command to be executed can be issued through the current default operation and maintenance control interface;

[0116] The operation and maintenance control interaction execution module 408 starts a set inter-container access program in the companion container;

[0117] Accessing the target service container through the inter-container access program to obtain a view of the target content in the target service container;

[0118] A view of the target content in the target business container is displayed in the current default operation and maintenance control interface to obtain the operation and maintenance control interface of the target business container.

[0119] Optionally, the operation and maintenance control interaction execution module 408 accesses the target business container through the inter-container access program to enter the target business container;

[0120] In the target business container, the operation and maintenance commands for the target business container are executed by utilizing the resources of the companion container.

[0121] Optionally, the operation and maintenance control interaction execution module 408 obtains a view of the target content in the companion container;

[0122] According to the acquired view, a mapping relationship between the target content in the target service container and the target content in the companion container is established, and a corresponding mapping relationship view is generated;

[0123] The mapping relationship view is displayed in the current default operation and maintenance management and control interface.

[0124] Optionally, the target content includes a namespace and a root file system.

[0125] Figure 5 A schematic diagram of a business processing device for container operation and maintenance provided in one or more embodiments of this specification, the device includes:

[0126] at least one processor; and,

[0127] a memory communicatively connected to the at least one processor; wherein,

[0128] The memory stores instructions executable by the at least one processor, the instructions being executed by the at least one processor to enable the at least one processor to:

[0129] Determine the physical machine corresponding to the target business container;

[0130] Determine resource restriction information related to the namespace of the target business container, start a companion container that shares the namespace with the target business container for the target business container on the physical machine, and configure the resource restriction information for the companion container;

[0131] Acquire resources of the companion container under the restriction indicated by the resource restriction information;

[0132] Through the interaction between the companion container and the target business container, an operation and maintenance control interface including the view in the target business container is displayed, and the operation and maintenance commands for the target business container are executed by using the resources.

[0133] The processor and the memory may communicate with each other via a bus, and the device may further include an input / output interface for communicating with other devices.

[0134] Based on the same idea, one or more embodiments of this specification also provide a non-volatile computer storage medium corresponding to the above method, storing computer executable instructions, wherein the computer executable instructions are configured as follows:

[0135] Determine the physical machine corresponding to the target business container;

[0136] Determine resource restriction information related to the namespace of the target business container, start a companion container that shares the namespace with the target business container for the target business container on the physical machine, and configure the resource restriction information for the companion container;

[0137] Acquire resources of the companion container under the restriction indicated by the resource restriction information;

[0138] Through the interaction between the companion container and the target business container, an operation and maintenance control interface including the view in the target business container is displayed, and the operation and maintenance commands for the target business container are executed by using the resources.

[0139] In the 1990s, improvements to a technology could be clearly distinguished as hardware improvements (for example, improvements to the circuit structure of diodes, transistors, switches, etc.) or software improvements (improvements to the method flow). However, with the development of technology, many improvements to the method flow today can be regarded as direct improvements to the hardware circuit structure. Designers almost always obtain the corresponding hardware circuit structure by programming the improved method flow into the hardware circuit. Therefore, it cannot be said that an improvement in a method flow cannot be implemented using a hardware entity module. For example, a programmable logic device (PLD) (such as a field programmable gate array (FPGA)) is such an integrated circuit whose logical function is determined by the user's programming of the device. Designers can "integrate" a digital system on a PLD by programming it themselves, without having to ask a chip manufacturer to design and produce a dedicated integrated circuit chip. Moreover, nowadays, instead of manually making integrated circuit chips, this kind of programming is mostly implemented by "logic compiler" software, which is similar to the software compiler used when developing and writing programs, and the original code before compilation must also be written in a specific programming language, which is called hardware description language (HDL). There is not only one HDL, but many kinds, such as ABEL (Advanced Boolean Expression Language), AHDL (Altera Hardware Description Language), Confluence, CUPL (Cornell University Programming Language), HDCal, JHDL (Java Hardware Description Language), Lava, Lola, MyHDL, PALASM, RHDL (Ruby Hardware Description Language), etc. The most commonly used ones are VHDL (Very-High-Speed ​​Integrated Circuit Hardware Description Language) and Verilog. Those skilled in the art should also know that it is only necessary to program the method flow slightly in the above-mentioned hardware description languages ​​and program it into the integrated circuit, and then it is easy to obtain the hardware circuit that implements the logic method flow.

[0140] The controller can be implemented in any appropriate manner, for example, the controller can take the form of a microprocessor or processor and a computer-readable medium storing a computer-readable program code (such as software or firmware) that can be executed by the (micro)processor, a logic gate, a switch, an application-specific integrated circuit (ASIC), a programmable logic controller, and an embedded microcontroller. Examples of controllers include, but are not limited to, the following microcontrollers: ARC625D, Atmel AT91SAM, Microchip PIC18F26K20, and Silicone Labs C8051F320. The memory controller can also be implemented as part of the control logic of the memory. Those skilled in the art also know that in addition to implementing the controller in a purely computer-readable program code manner, the controller can be implemented in the form of a logic gate, a switch, an application-specific integrated circuit, a programmable logic controller, and an embedded microcontroller by logically programming the method steps. Therefore, this controller can be considered as a hardware component, and the devices included therein for implementing various functions can also be regarded as structures within the hardware component. Or even, the devices for implementing various functions can be regarded as both software modules for implementing the method and structures within the hardware component.

[0141] The systems, devices, modules or units described in the above embodiments may be implemented by computer chips or entities, or by products with certain functions. A typical implementation device is a computer. Specifically, the computer may be, for example, a personal computer, a laptop computer, a cellular phone, a camera phone, a smart phone, a personal digital assistant, a media player, a navigation device, an email device, a game console, a tablet computer, a wearable device, or a combination of any of these devices.

[0142] For the convenience of description, the above device is described in various units according to their functions. Of course, when implementing this specification, the functions of each unit can be implemented in the same or multiple software and / or hardware.

[0143] Those skilled in the art will appreciate that the embodiments of this specification may be provided as methods, systems, or computer program products. Therefore, the embodiments of this specification may be in the form of complete hardware embodiments, complete software embodiments, or embodiments in combination with software and hardware. Moreover, the embodiments of this specification may be in the form of a computer program product implemented in one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that contain computer-usable program code.

[0144] This specification is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of this specification. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0145] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0146] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0147] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.

[0148] The memory may include non-permanent storage in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. The memory is an example of a computer-readable medium.

[0149] Computer readable media include permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. Information can be computer readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer readable media does not include temporary computer readable media (transitory media), such as modulated data signals and carrier waves.

[0150] It should also be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, commodity or device. In the absence of more restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the process, method, commodity or device including the elements.

[0151] This specification may be described in the general context of computer-executable instructions executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform specific tasks or implement specific abstract data types. This specification may also be practiced in distributed computing environments where tasks are performed by remote processing devices connected through a communication network. In a distributed computing environment, program modules may be located in local and remote computer storage media, including storage devices.

[0152] Each embodiment in this specification is described in a progressive manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the device, equipment, and non-volatile computer storage medium embodiments, since they are basically similar to the method embodiments, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.

[0153] The above is a description of a specific embodiment of the specification. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recorded in the claims can be performed in an order different from that in the embodiments and still achieve the desired results. In addition, the processes depicted in the drawings do not necessarily require the specific order or continuous order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.

[0154] The above description is only one or more embodiments of this specification and is not intended to limit this specification. For those skilled in the art, one or more embodiments of this specification may have various changes and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of one or more embodiments of this specification shall be included in the scope of the claims of this specification.

Claims

1. A business processing method for container operation and maintenance, comprising: Determine the physical machine corresponding to the target business container; On the physical machine, start a companion container for the target business container that shares at least part of the namespace with the target business container, and configure resource restriction information for the companion container; Acquire resources of the companion container under the restriction indicated by the resource restriction information; Through the interaction between the companion container and the target business container, an operation and maintenance control interface including the view in the target business container is displayed, and the operation and maintenance commands for the target business container are executed by using the resources; The obtaining of the resources of the companion container specifically includes: Decomposing the operation and maintenance command to be executed into a first operation and maintenance sub-command set and a second operation and maintenance sub-command set; Acquire resources of the companion container for executing the first set of operation and maintenance subcommands, and apply to the target business container for resources for executing the second set of operation and maintenance subcommands; The executing the operation and maintenance command for the target business container specifically includes: If the application is successful, after the first set of operation and maintenance sub-commands is executed, the second set of operation and maintenance sub-commands is continued to be executed using the resources of the companion container, and the termination risk of terminating the operation and maintenance commands based on the resource limitation information is monitored; If the termination risk is greater than a set threshold, resources requested from the target business container are obtained to execute the unexecuted portion of the second operation and maintenance sub-command set.

2. The method according to claim 1, wherein obtaining the resources of the companion container under the restriction indicated by the resource restriction information further comprises: Determining whether the resources required by the operation and maintenance command to be executed cause the limit to be exceeded; If so, the operation and maintenance command is terminated through the companion container.

3. The method according to claim 1, wherein starting a companion container for the target business container on the physical machine that shares at least part of the namespace with the target business container specifically comprises: Determine the operation and maintenance agent set on the physical machine; Establishing an operation and maintenance command channel with the operation and maintenance agent; The operation and maintenance command to be executed is received through the operation and maintenance command channel, so that the operation and maintenance agent starts a companion container that shares at least part of the namespace with the target business container.

4. The method according to claim 2, wherein the resource restriction configuration is used to restrict the resources required to be used by the process, and the operation and maintenance command is executed by the process; The starting of a companion container for the target business container that shares at least part of the namespace with the target business container specifically includes: A companion container that shares a namespace of a process identifier with the target business container is started for the target business container.

5. The method according to claim 1, wherein the target service container is started earlier than the companion container; After displaying the operation and maintenance control interface including the view in the target business container and executing the operation and maintenance command for the target business container using the resource, the method further includes: Determine whether this round of operation and maintenance behavior is completed according to the operation and maintenance control interface; If so, the companion container is automatically switched to a non-operating state, or the companion container is automatically deleted.

6. The method according to claim 1, before displaying the operation and maintenance control interface including the view in the target business container, the method further comprises: Displaying the current default operation and maintenance control interface so that the operation and maintenance command to be executed can be issued through the current default operation and maintenance control interface; The display includes an operation and maintenance control interface of the view in the target business container, specifically including: In the companion container, starting a set inter-container access program; Accessing the target service container through the inter-container access program to obtain a view of the target content in the target service container; A view of the target content in the target business container is displayed in the current default operation and maintenance management and control interface.

7. The method according to claim 6, wherein the using the resource to execute the operation and maintenance command for the target business container specifically comprises: Accessing the target service container through the inter-container access program to enter the target service container; In the target business container, the operation and maintenance commands for the target business container are executed by utilizing the resources of the companion container.

8. The method according to claim 6, wherein displaying a view of the target content in the target business container in the current default operation and maintenance management interface further comprises: Obtain a view of the target content in the companion container; According to the acquired view, a mapping relationship between the target content in the target service container and the target content in the companion container is established, and a corresponding mapping relationship view is generated; The mapping relationship view is displayed in the current default operation and maintenance management and control interface.

9. The method of claim 6 or 8, wherein the target content includes the at least part of the namespace and the root file system.

10. A business processing device for container operation and maintenance, comprising: The container physical machine determination module determines the physical machine corresponding to the target business container; A companion container startup configuration module is used to start, on the physical machine, a companion container for the target business container that shares at least part of the namespace with the target business container, and configure resource restriction information for the companion container; A companion container resource acquisition module, which acquires resources of the companion container under the restriction indicated by the resource restriction information; An operation and maintenance control interaction execution module displays an operation and maintenance control interface including a view in the target business container through interaction between the companion container and the target business container, and executes operation and maintenance commands for the target business container using the resources; The companion container resource acquisition module decomposes the operation and maintenance command to be executed into a first operation and maintenance sub-command set and a second operation and maintenance sub-command set; Acquire resources of the companion container for executing the first set of operation and maintenance subcommands, and apply to the target business container for resources for executing the second set of operation and maintenance subcommands; The operation and maintenance control interactive execution module, if the application is successful, then after the first operation and maintenance sub-command set is executed, the second operation and maintenance sub-command set is continued to be executed using the resources of the companion container, and the termination risk of terminating the operation and maintenance command based on the resource limitation information is monitored; If the termination risk is greater than a set threshold, resources requested from the target business container are obtained to execute the unexecuted portion of the second operation and maintenance sub-command set.

11. The device according to claim 10, wherein the companion container resource acquisition module determines whether the resources required by the operation and maintenance command to be executed cause the restriction to be exceeded; If so, the operation and maintenance command is terminated through the companion container.

12. The device according to claim 10, wherein the companion container startup configuration module determines the operation and maintenance agent set on the physical machine; Establishing an operation and maintenance command channel with the operation and maintenance agent; The operation and maintenance command to be executed is received through the operation and maintenance command channel, so that the operation and maintenance agent starts a companion container that shares at least part of the namespace with the target business container.

13. The apparatus according to claim 11, wherein the resource restriction configuration is used to restrict resources required to be used by a process, and the operation and maintenance command is executed by the process; The companion container startup configuration module starts a companion container for the target business container that shares a namespace of a process identifier with the target business container.

14. The device according to claim 10, wherein the target service container is started earlier than the companion container; The companion container startup configuration module, after the operation and maintenance control interactive execution module displays the operation and maintenance control interface including the view in the target business container and uses the resources to execute the operation and maintenance command for the target business container, further executes: Determine whether this round of operation and maintenance behavior is completed according to the operation and maintenance control interface; If so, the companion container is automatically switched to a non-operating state, or the companion container is automatically deleted.

15. The device according to claim 10, wherein the operation and maintenance management and control interaction execution module, before displaying the operation and maintenance management and control interface including the view in the target business container, further executes: Displaying the current default operation and maintenance control interface so that the operation and maintenance command to be executed can be issued through the current default operation and maintenance control interface; The operation and maintenance control interaction execution module starts a set inter-container access program in the companion container; Accessing the target service container through the inter-container access program to obtain a view of the target content in the target service container; A view of the target content in the target business container is displayed in the current default operation and maintenance control interface to obtain the operation and maintenance control interface of the target business container.

16. The device according to claim 15, wherein the operation and maintenance control interaction execution module enters the target business container by accessing the target business container through the inter-container access program; In the target business container, the operation and maintenance commands for the target business container are executed by utilizing the resources of the companion container.

17. The apparatus according to claim 15, wherein the operation and maintenance control interaction execution module obtains a view of the target content in the companion container; According to the acquired view, a mapping relationship between the target content in the target service container and the target content in the companion container is established, and a corresponding mapping relationship view is generated; The mapping relationship view is displayed in the current default operation and maintenance management and control interface.

18. The apparatus of claim 15 or 17, wherein the target content includes the at least part of the namespace and the root file system.

19. A business processing device for container operation and maintenance, comprising: at least one processor; as well as, a memory communicatively connected to the at least one processor; wherein, The memory stores instructions executable by the at least one processor, the instructions being executed by the at least one processor to enable the at least one processor to: Determine the physical machine corresponding to the target business container; On the physical machine, start a companion container for the target business container that shares at least part of the namespace with the target business container, and configure resource restriction information for the companion container; Acquire resources of the companion container under the restriction indicated by the resource restriction information; Through the interaction between the companion container and the target business container, an operation and maintenance control interface including the view in the target business container is displayed, and the operation and maintenance commands for the target business container are executed by using the resources; The obtaining of the resources of the companion container specifically includes: Decomposing the operation and maintenance command to be executed into a first operation and maintenance sub-command set and a second operation and maintenance sub-command set; Acquire resources of the companion container for executing the first set of operation and maintenance subcommands, and apply to the target business container for resources for executing the second set of operation and maintenance subcommands; The executing the operation and maintenance command for the target business container specifically includes: If the application is successful, after the first set of operation and maintenance sub-commands is executed, the second set of operation and maintenance sub-commands is continued to be executed using the resources of the companion container, and the termination risk of terminating the operation and maintenance commands based on the resource limitation information is monitored; If the termination risk is greater than a set threshold, resources requested from the target business container are obtained to execute the unexecuted portion of the second operation and maintenance sub-command set.