A cluster service proxy method and system

By working together between the proxy service layer and the application layer, the security issues of host deletion, command execution, and file copying in cluster service management are resolved, data backup and permission verification are realized, and the security and reliability of cluster resources are improved.

CN115865464BActive Publication Date: 2026-01-09CHINA ELECTRONICS CLOUD DIGITAL INTELLIGENCE TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202211501083.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-11-28
Publication Date
2026-01-09
Estimated Expiration
2042-11-28

AI Technical Summary

Technical Problem

In cluster service management, existing technologies cannot effectively manage host deletion, command execution, and file copying, leading to malicious attacks and resource configuration modifications, and cannot perform efficient security verification.

Method used

Data is backed up and hosts are deleted through the host management center of the proxy service layer, while the command execution module and file copy module of the application layer perform permission verification and security checks to ensure the security of command and file operations.

Benefits of technology

It enables automatic data backup and host deletion without affecting business operations, preventing malicious operations and improving the security and reliability of cluster resources.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115865464B_ABST
    Figure CN115865464B_ABST
Patent Text Reader

Abstract

The present application relates to the technical field of cluster service management, and provides a cluster service proxy method and system, the method of the present application comprising: according to a request of deleting a host from an execution party, backing up data of the corresponding host, and deleting the host from the cluster by a host management center in a proxy service layer; executing an execution command verified by an application layer and the proxy service layer inside cluster resources by a command execution module in the application layer; and copying a to-be-copied file verified by the application layer and the proxy service layer into the cluster resources by a file copying module in the application layer. The system of the present application comprises: an application layer, a proxy service layer, a storage layer, and a cluster layer. The cluster service proxy method and system of the exemplary embodiments of the present application can ensure that the cluster service is not affected before deleting a host; avoid executing file copying and command execution on resources without operation right by the execution party; and prevent command injection, privilege escalation, and other operations that threaten the security of the cluster resources.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of cluster service management, and in particular to a cluster service proxy method and system. BACKGROUND

[0002] In the scenario of cluster service management, the cluster service exposes its capabilities to the outside in the form of an interface. If the interface is not secured, the following consequences may occur: the calling party directly deploys a cluster resource with malicious software; the calling party sends malicious code to the cluster resource and executes it through command injection; the calling party copies malicious software to the cluster resource, modifies the configuration of the cluster resource, and thus affects other resources or makes itself unavailable; and the calling party violates the rules to delete resources and hosts in the cluster.

[0003] However, for business scenarios, it is very common and necessary for business to delete a host from a cluster, execute a command in a cluster resource, and copy a file to a cluster resource. Although the isolation based on container technology and various security strategies can ensure that malicious attacks are difficult to escape from the cluster resource, the management of specific resource permissions still cannot meet the growing business needs, and the specific commands to be executed and the files to be copied cannot be efficiently and securely checked. For host deletion, the current technology only retains all data when deleting a node, and cannot distinguish and backup host data and business data.

[0004] Therefore, how to delete a host in a cluster without affecting the business and to execute a command and copy a file in a cluster resource in a controlled manner has become a technical problem to be solved. SUMMARY

[0005] Therefore, the present application mainly solves the following technical problems.

[0006] In one aspect, the present application provides a cluster service proxy method, comprising:

[0007] backuping data of the corresponding host according to a request of the execution party to delete the host, and deleting the host from the cluster by a host management and control center in the proxy service layer;

[0008] executing an execution command verified by the application layer and the proxy service layer in a cluster resource by a command execution module in the application layer;

[0009] copying a to-be-copied file verified by the application layer and the proxy service layer to the cluster resource by a file copy module in the application layer.

[0010] Further, in the cluster service agent method, the host management center in the proxy service layer deletes the host from the cluster according to a request of the executor to delete the host, backs up data of the corresponding host, and includes the following steps.

[0011] When the host joins the cluster, the host service agent module running on the host registers host information to the host management center, and the host management center stores the registered host information in the mysql persistently.

[0012] The executor sends a request to delete the host to the host management center according to the host information in the mysql through the host management module.

[0013] The host management center calls the host service agent module to pack storage files corresponding to all cluster resources running on the host according to cluster storage plug-in configuration according to the request to delete the host, uploads the packed storage files to the object storage module, and notifies the host management center after successful uploading.

[0014] The host management center receives the notification of successful uploading, expels all cluster services running on the host, deletes the host from the cluster, and updates the running state of the host information in the mysql to deleted.

[0015] Further, in the cluster service agent method, the command execution module in the application layer executes the execution command verified through the application layer and the proxy service layer inside the cluster resource, and includes the following steps.

[0016] The cluster resource query module queries the cluster resource that needs to execute the command in batches.

[0017] According to the cluster resource that needs to execute the command in batches, the execution permission key, and the execution command, the command execution request is sent to the command execution module.

[0018] The command execution module verifies whether the corresponding execution command is executable according to the command execution request.

[0019] The command execution module executes the verified execution command inside the cluster resource that needs to execute the command in batches.

[0020] Further, in the cluster service agent method, the cluster resource query module queries the cluster resource that needs to execute the command in batches, and includes the following steps.

[0021] The cluster resource query module stores the metadata of the cluster resource hatched in the cluster in the mysql persistently.

[0022] According to the query condition and the metadata in the mysql, the corresponding cluster resource is obtained, and the normally running resource is screened from the obtained cluster resource.

[0023] Further, in the cluster service agent method, the command execution module verifies whether the corresponding execution command is executable according to the command execution request, and the verification includes:

[0024] The command execution module acquires the execution party authority level from the cluster authority center according to the execution party authority key, and verifies whether the execution party has the authority to execute the command in the corresponding cluster resource according to the execution party authority level;

[0025] When the execution party does not have the authority to execute the command in the corresponding cluster resource, it is determined that the command is not executable, and the execution failure is returned to the execution party;

[0026] When the execution party has the authority to execute the command in the corresponding cluster resource, the security verification center verifies whether the execution command is safe, when the execution command is not safe, the execution failure is returned to the execution party; when the execution command is safe, it is determined that the execution command passes the verification.

[0027] Further, in the cluster service agent method, the command execution module executes the execution command that passes the verification inside the cluster resource that needs to execute the command in batches, and the execution includes:

[0028] The command execution module establishes a connection with the corresponding cluster resource in parallel, and executes the execution command that passes the verification inside the cluster resource;

[0029] The security verification center verifies the execution result, when the execution result does not pass the verification, the execution failure is returned to the execution party, when the execution result passes the verification, the execution result is cached to the redis, and the execution result in the redis is returned to the execution party by the command execution module;

[0030] When the execution process is interrupted due to abnormal reasons, the execution command that passes the verification inside the cluster resource is re-initiated, when the execution process is still interrupted after 3 initiations, the execution failure is returned to the execution party.

[0031] Further, in the cluster service agent method, the file copying module in the application layer copies the to-be-copied file that passes the verification of the application layer and the agent service layer to the inside of the cluster resource, and the copying includes:

[0032] The cluster resource query module queries the cluster resource that needs to copy files in batches;

[0033] According to the cluster resource that needs to copy files in batches, the execution party authority key and the to-be-copied file, a file copying request is sent to the file copying module;

[0034] The file copying module verifies whether the corresponding file to be copied is copyable according to a file copying request.

[0035] The file copying module establishes a connection with the corresponding cluster resource in parallel, copies the verified file to be copied into the cluster resource, and returns a copy success to the execution party.

[0036] Further, in the cluster service agent method, the file copying module verifies whether the corresponding file to be copied is copyable according to a file copying request, which includes:

[0037] The file copying module obtains the execution party permission level from the cluster permission center according to the execution party permission key, and verifies whether the execution party has the permission to copy the file into the corresponding cluster resource according to the execution party permission level.

[0038] When the execution party does not have the permission to copy the file into the corresponding cluster resource, it is determined that the file to be copied is not copyable, and a copy failure is returned to the execution party.

[0039] When the execution party has the permission to copy the file into the corresponding cluster resource, the security verification center verifies whether the file to be copied is safe, and when the file to be copied is not safe, a copy failure is returned to the execution party; when the file to be copied is safe, it is determined that the file to be copied is verified.

[0040] Further, the cluster service agent method further includes: when the copying process is interrupted due to abnormal reasons, reinitiating the copying of the verified file to be copied into the cluster resource, and when the copying process is still interrupted after 3 initiations, a copy failure is returned to the execution party.

[0041] On the other hand, the application provides a cluster service agent system, which includes:

[0042] An application layer includes a host management module, a cluster resource query module, a command execution module, and a file copying module, wherein the host management module is used to send a request to delete a host to a host management center according to host information in the mysql; the cluster resource query module is used to persistently store metadata of a cluster resource hatched in the cluster into the mysql, match the metadata in the mysql according to a query condition, obtain the corresponding cluster resource, and filter normally running resources from the obtained cluster resources; the command execution module is used to verify whether a corresponding execution command is executable according to a command execution request through the command execution module, and execute the verified execution command inside the cluster resource that needs to execute the command in batches through the command execution module; and the file copying module is used to verify whether a corresponding file to be copied is copyable according to a file copying request, establish a connection with the corresponding cluster resource in parallel, copy the verified file to be copied into the cluster resource, and return a copy success to the execution party.

[0043] The agent service layer comprises a host management and control center, a cluster authority center and a security verification center, wherein the host management and control center is configured to backup data of a host corresponding to a request of deleting the host by an executor and delete the host from a cluster; the cluster authority center is configured to provide an authority level of an executor for a command execution module and a file copying module; the security verification center is configured to verify whether an executed command is safe when the executor has an authority to execute the command in a corresponding cluster resource, to verify an execution result, and to verify a file to be copied when the executor has an authority to copy the file into the corresponding cluster resource;

[0044] The storage layer comprises a mysql, a redis and an object storage module, wherein the mysql is configured to store host information and metadata of a cluster resource, the redis is configured to cache an execution result, and the object storage module is configured to store a packaged file;

[0045] The cluster layer comprises a cluster composed of hosts and a host service agent module running on the hosts, wherein the host service agent module is configured to register host information to the host management and control center when a host joins the cluster, the host management and control center is configured to store the registered host information to the mysql persistently, to package storage files corresponding to all cluster resources running on the host according to a cluster storage plug-in configuration, to upload the packaged storage files to the object storage module, and to notify the host management and control center after the uploading is successful.

[0046] The cluster service agent method and system have the following beneficial effects:

[0047] 1. The host management and control center in the agent service layer is used to execute deletion of a host, and before the host is deleted, cluster resource eviction and data file packaging and uploading to an object storage service are automatically executed, so that the cluster service is not affected and the data of the cluster resource is backed up.

[0048] 2. The command execution module and the file copying module verify whether an authority of an executor matches a cluster resource requiring file copying / command execution through the cluster authority center, so as to avoid that the executor executes file copying and command execution on a resource without an operation authority.

[0049] 3. The command execution module and the file copying module verify a command, a command execution result and a file to be copied through the security verification module, so as to prevent command injection, authority promotion and other operations threatening the security of the cluster resource. BRIEF DESCRIPTION OF DRAWINGS

[0050] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings needed to be used in the embodiments will be briefly introduced as follows. Obviously, the drawings in the following description only constitute some embodiments of the present application, and for those skilled in the art, other drawings can be obtained without creative labor on the basis of these drawings.

[0051] Figure 1 A flow chart of a cluster service proxy method according to an exemplary second embodiment of the present application.

[0052] Figure 2 A flow chart of a cluster service proxy method according to an exemplary third embodiment of the present application.

[0053] Figure 3 A flow chart of a cluster service proxy method according to an exemplary fourth embodiment of the present application.

[0054] Figure 4 An architecture diagram of a cluster service proxy system according to an exemplary fifth embodiment of the present application. DETAILED DESCRIPTION

[0055] The embodiments of the present application will be described in detail below with reference to the drawings.

[0056] It should be noted that the following embodiments and features in the embodiments can be combined with each other without conflict; and all other embodiments obtained by those skilled in the art on the basis of the embodiments in the present disclosure without creative labor are within the protection scope of the present disclosure.

[0057] It should be noted that the various aspects of the embodiments described below are within the scope of the appended claims. It should be apparent that the aspects described herein can be embodied in a wide variety of forms and that any specific structure and / or function described herein is merely illustrative. Based on the present disclosure, any one of the aspects described herein can be implemented independently of any other aspect and various embodiments of two or more of these aspects can be combined in various ways. For example, an apparatus can be implemented or a method can be practiced using any number of the aspects set forth herein. In addition, such an apparatus can be implemented or such a method can be practiced using other structure and / or functionality in addition to or other than one or more of the aspects set forth herein.

[0058] An exemplary first embodiment of the present application provides a cluster service proxy method, the method of the present embodiment comprising:

[0059] According to a request of deleting a host from the execution party, the host management center in the proxy service layer backs up data of the corresponding host and deletes the host from the cluster;

[0060] execute the execution command verified by the application layer and the agent service layer inside the cluster resource through a command execution module in the application layer;

[0061] copy the to-be-copied file verified by the application layer and the agent service layer to the inside of the cluster resource through a file copying module in the application layer.

[0062] Figure 1 For a cluster service agent method according to an exemplary second embodiment of the present application, the embodiment is a preferred embodiment of the first embodiment method, as shown in Figure 1 In the embodiment method, according to a request of an execution party to delete a host, the host management center in the agent service layer backs up data corresponding to the host, and deletes the host from the cluster, including:

[0063] When the host joins the cluster, the host service agent module running on the host registers host information to the host management center, and the host management center stores the registered host information in a mysql persistently;

[0064] The execution party sends a request to delete the host to the host management center through the host management module according to the host information in the mysql;

[0065] According to the request to delete the host, the host management center calls the host service agent module to pack storage files corresponding to all cluster resources running on the host according to cluster storage plug-in configuration, uploads the packed storage files to an object storage module, and notifies the host management center after successful uploading;

[0066] After receiving the notification of successful uploading, the host management center expels all cluster services running on the host, deletes the host from the cluster, and updates the running state of the host information in the mysql to deleted.

[0067] Figure 2 For a cluster service agent method according to an exemplary third embodiment of the present application, the embodiment is a preferred embodiment of the first embodiment method, as shown in Figure 2 In the embodiment method, the command execution module in the application layer executes the execution command verified by the application layer and the agent service layer inside the cluster resource, including:

[0068] query the cluster resource that needs to execute the command in batches through a cluster resource query module;

[0069] send a command execution request to the command execution module according to the cluster resource that needs to execute the command in batches, an execution party permission key, and the execution command;

[0070] verify whether the corresponding execution command is executable through the command execution module according to the command execution request;

[0071] execute the verified execution command inside the cluster resource in which the batch execution of the command is required by the command execution module.

[0072] In the method of the embodiment, the cluster resource in which the batch execution of the command is required is queried by the cluster resource query module, including:

[0073] The metadata of the cluster resource hatched inside the cluster is stored persistently into the mysql by the cluster resource query module;

[0074] The corresponding cluster resource is obtained according to the matching of the query condition and the metadata in the mysql, and the normally running resource is filtered from the obtained cluster resource.

[0075] In the method of the embodiment, whether the corresponding execution command is executable is verified by the command execution module according to the command execution request, including:

[0076] The execution party permission level is obtained from the cluster permission center by the command execution module according to the execution party permission key, and whether the execution party has the permission to execute the command inside the corresponding cluster resource is verified according to the execution party permission level;

[0077] When the execution party does not have the permission to execute the command inside the corresponding cluster resource, it is determined that the command is not executable, and the execution failure is returned to the execution party;

[0078] When the execution party has the permission to execute the command inside the corresponding cluster resource, whether the execution command is safe is verified by the security verification center, when the execution command is not safe, the execution failure is returned to the execution party; when the execution command is safe, it is determined that the execution command is verified.

[0079] In the method of the embodiment, the verified execution command is executed inside the cluster resource in which the batch execution of the command is required by the command execution module, including:

[0080] The connection with the corresponding cluster resource is established in parallel by the command execution module, and the verified execution command is executed inside the cluster resource;

[0081] The execution result is verified by the security verification center, when the execution result does not pass the verification, the execution failure is returned to the execution party, when the execution result passes the verification, the execution result is cached to the redis, and the execution result in the redis is returned to the execution party by the command execution module;

[0082] When the execution process is interrupted due to abnormal reasons, the verified execution command is re-initiated to be executed inside the cluster resource, when the execution process is still interrupted after 3 initiations, the execution failure is returned to the execution party.

[0083] Figure 3For a cluster service agent method according to the exemplary fourth embodiment of the present application, the embodiment is a preferred embodiment of the first embodiment method, as shown in Figure 3 The method comprises the following steps:

[0084] The cluster resource query module queries the cluster resource that needs to copy files in batches.

[0085] The file copy module receives the file copy request from the cluster resource, the execution party permission key and the to-be-copied file.

[0086] The file copy module verifies whether the to-be-copied file is copyable according to the file copy request.

[0087] The file copy module establishes a connection with the corresponding cluster resource in parallel, copies the to-be-copied file that passes the verification into the cluster resource, and returns the copy success to the execution party.

[0088] In the embodiment method, the file copy module verifies whether the to-be-copied file is copyable according to the file copy request, which comprises the following steps:

[0089] The file copy module obtains the execution party permission level from the cluster permission center according to the execution party permission key, and verifies whether the execution party has the permission to copy the file into the corresponding cluster resource according to the execution party permission level.

[0090] When the execution party does not have the permission to copy the file into the corresponding cluster resource, it is determined that the to-be-copied file is not copyable, and the copy failure is returned to the execution party.

[0091] When the execution party has the permission to copy the file into the corresponding cluster resource, the security verification center verifies whether the to-be-copied file is safe, and when the to-be-copied file is not safe, the copy failure is returned to the execution party; when the to-be-copied file is safe, it is determined that the to-be-copied file passes the verification.

[0092] The embodiment method further comprises the following steps: when the copy process is interrupted due to abnormal reasons, the to-be-copied file that passes the verification is re-initiated to be copied into the cluster resource; when the copy process is still interrupted after 3 initiations, the copy failure is returned to the execution party.

[0093] Figure 4 For an architecture diagram of a cluster service agent system according to the exemplary fifth embodiment of the present application, as shown in Figure 4 The system comprises the following modules:

[0094] The application layer comprises a host management module, a cluster resource query module, a command execution module and a file copying module, wherein the host management module is configured to send a request for deleting a host to a host management center according to host information in the mysql; the cluster resource query module is configured to persistently store metadata of a cluster resource hatched in a cluster into the mysql, match the metadata in the mysql according to a query condition, obtain a corresponding cluster resource, and filter a normally operating resource from the obtained cluster resource; the command execution module is configured to verify whether an execution command corresponding to a command execution request is executable through the command execution module, and execute the verified execution command inside a cluster resource requiring batch execution of commands through the command execution module; and the file copying module is configured to verify whether a to-be-copied file corresponding to a file copying request is copyable, establish a connection with the corresponding cluster resource in parallel, copy the verified to-be-copied file into the cluster resource, and return a copy success to an execution party.

[0095] The proxy service layer comprises a host management center, a cluster permission center and a security verification center, wherein the host management center is configured to backup data of a corresponding host according to a request of deleting the host by an execution party, and delete the host from a cluster; the cluster permission center is configured to provide an execution party permission level for the command execution module and the file copying module; and the security verification center is configured to verify whether an execution command is safe when the execution party has a permission of executing the command in a corresponding cluster resource, verify an execution result, and verify whether the execution party has a permission of copying a file into the corresponding cluster resource.

[0096] The storage layer comprises a mysql, a redis and an object storage module, wherein the mysql is configured to store host information and metadata of a cluster resource, the redis is configured to cache an execution result, and the object storage module is configured to store a packaged file.

[0097] The cluster layer comprises a cluster composed of hosts and a host service proxy module running on the hosts, wherein the host service proxy module is configured to register host information to a host management center when a host joins a cluster, the host management center is configured to persistently store the registered host information into the mysql, and the host management center is configured to package storage files corresponding to all cluster resources running on the host according to a cluster storage plug-in configuration, upload the packaged storage files to an object storage module, and notify the host management center after the uploading is successful.

[0098] The above merely illustrates the specific embodiments of the present application, but the protection scope of the present application is not limited thereto, any person skilled in the art can easily think of changes or replacements within the technical range disclosed by the present application, which should be covered in the protection scope of the present application. Therefore, the protection scope of the present application should be subject to the protection scope of the claims.

Claims

1. A method of cluster service brokering, the method comprising: The method comprises: Backup data of the host corresponding to the host according to the request of the execution party deleting the host through the host management center in the agent service layer, and delete the host from the cluster; Execute the execution command verified through the application layer and the agent service layer inside the cluster resource through the command execution module in the application layer; Copy the to-be-copied file verified through the application layer and the agent service layer to the inside of the cluster resource through the file copying module in the application layer.

2. The cluster service broker method of claim 1, wherein, Backup data of the host corresponding to the host according to the request of the execution party deleting the host through the host management center in the agent service layer, and delete the host from the cluster, comprising: When the host joins the cluster, the host information is registered to the host management center through the host service agent module running on the host, and the host management center stores the registered host information to the mysql persistently; The execution party sends a request of deleting the host to the host management center according to the host information in the mysql through the host management module; The host management center calls the host service agent module to pack the storage file corresponding to all cluster resources running on the host according to the cluster storage plug-in configuration according to the request of deleting the host, uploads the packed storage file to the object storage module, and notifies the host management center after the uploading is successful; After receiving the uploading success notification, the host management center expels all cluster services running on the host, deletes the host from the cluster, and updates the running state of the host information in the mysql to deleted.

3. The cluster service broker method of claim 1, wherein, Execute the execution command verified through the application layer and the agent service layer inside the cluster resource through the command execution module in the application layer, comprising: Query the cluster resource needing batch execution command through the cluster resource query module; Send a command execution request to the command execution module according to the cluster resource needing batch execution command, the execution party permission key and the execution command; Verify whether the corresponding execution command is executable through the command execution module according to the command execution request; Execute the verified execution command inside the cluster resource needing batch execution command through the command execution module.

4. The cluster service broker method of claim 3, wherein, Query the cluster resource needing batch execution command through the cluster resource query module, comprising: Persistently store the metadata of the cluster resource hatched in the cluster to the mysql through the cluster resource query module; According to the query condition and the metadata in the mysql, the corresponding cluster resource is obtained, and the normally running resource is screened from the obtained cluster resource.

5. The cluster service broker method of claim 3, wherein, Verify whether the corresponding execution command is executable through the command execution module according to the command execution request, comprising: According to the execution party permission level, it is verified whether the execution party has the permission of executing the command in the corresponding cluster resource according to the execution party permission level obtained from the cluster permission center through the command execution module; When the execution party does not have the permission of executing the command in the corresponding cluster resource, it is determined that the command is not executable, and the execution party is returned with execution failure. When the executor has the right to execute the command in the corresponding cluster resource, the security verification center verifies whether the execution command is safe, when the execution command is not safe, the execution fails is returned to the executor; when the execution command is safe, it is determined that the execution command is verified.

6. The cluster service broker method of claim 3, wherein, The command execution module executes the verified execution command inside the cluster resource that needs to execute the command in batches, including: The command execution module establishes a connection with the corresponding cluster resource in parallel, and executes the verified execution command inside the cluster resource; The security verification center verifies the execution result, when the execution result does not pass the verification, the execution fails is returned to the executor, when the execution result passes the verification, the execution result is cached to redis, and the execution result in redis is returned to the executor by the command execution module; When the execution process is interrupted due to abnormal reasons, the verified execution command inside the cluster resource is re-initiated, when the execution process is still interrupted after 3 initiations, the execution fails is returned to the executor.

7. The cluster service proxy method of claim 1, wherein, The file copy module in the application layer copies the to-be-copied file verified by the application layer and the proxy service layer to the inside of the cluster resource, including: The cluster resource query module queries the cluster resource that needs to copy files in batches; According to the cluster resource that needs to copy files in batches, the executor permission key and the to-be-copied file, the file copy request is sent to the file copy module; The file copy module verifies whether the corresponding to-be-copied file is copyable according to the file copy request; The file copy module establishes a connection with the corresponding cluster resource in parallel, and copies the verified to-be-copied file to the inside of the cluster resource, and returns copy success to the executor.

8. The cluster service broker method of claim 7, wherein, The file copy module verifies whether the corresponding to-be-copied file is copyable according to the file copy request, including: The file copy module obtains the executor permission level from the cluster permission center according to the executor permission key, and verifies whether the executor has the permission to copy the file to the inside of the corresponding cluster resource according to the executor permission level; When the executor does not have the permission to copy the file to the inside of the corresponding cluster resource, it is determined that the to-be-copied file is not copyable, and copy failure is returned to the executor; When the executor has the permission to copy the file to the inside of the corresponding cluster resource, the security verification center verifies whether the to-be-copied file is safe, when the to-be-copied file is not safe, copy failure is returned to the executor; when the to-be-copied file is safe, it is determined that the to-be-copied file is verified.

9. The cluster service broker method of claim 7, wherein, The method further includes: when the copy process is interrupted due to abnormal reasons, the verified to-be-copied file is re-initiated to be copied inside the cluster resource, when the copy process is still interrupted after 3 initiations, copy failure is returned to the executor.

10. A cluster service broker system, characterized by The system includes: The application layer includes a host management module, a cluster resource query module, a command execution module, and a file copying module. The host management module is configured to send a request for deleting a host to a host management center according to host information in the mysql. The cluster resource query module is configured to persistently store metadata of a cluster resource hatched in a cluster into the mysql, match the metadata in the mysql according to a query condition, obtain a corresponding cluster resource, and filter a normally operating resource from the obtained cluster resource. The command execution module is configured to verify whether an execution command corresponding to a command execution request is executable, and execute the verified execution command inside a cluster resource in which the command needs to be executed in batch. The file copying module is configured to verify whether a to-be-copied file corresponding to a file copying request is copyable, establish a connection with the corresponding cluster resource in parallel, copy the verified to-be-copied file into the cluster resource, and return a copy success to an execution party. The proxy service layer includes a host management center, a cluster permission center, and a security verification center. The host management center is configured to backup data of a corresponding host according to a request of deleting the host by an execution party, and delete the host from a cluster. The cluster permission center is configured to provide an execution party permission level for the command execution module and the file copying module. The security verification center is configured to verify whether an execution command is safe when the execution party has a permission of executing the command in a corresponding cluster resource, to verify an execution result, and to have a permission of copying a file into the corresponding cluster resource. The storage layer includes the mysql, the redis, and an object storage module. The mysql is configured to store host information and metadata of a cluster resource. The redis is configured to cache an execution result. The object storage module is configured to store packaged storage files. The cluster layer includes a cluster composed of hosts and a host service agent module running on the hosts. The host service agent module is configured to register host information to the host management center when a host joins a cluster, and persistently store the registered host information into the mysql. The host management center is configured to package storage files corresponding to all cluster resources running on the host according to a cluster storage plug-in configuration, upload the packaged storage files to the object storage module, and notify the host management center after the uploading is successful.

Citation Information

Patent Citations

  • Distributed file system metadata management method facing to high-performance calculation

    CN103150394A

  • System and method for quickly and continuously switching services when SDN cluster breaks down

    CN110247862A