CN112965761B - Data processing method, system, electronic equipment and storage medium - Google Patents

Data processing method, system, electronic equipment and storage medium Download PDF

Info

Publication number
CN112965761B
CN112965761B CN202110260790.7A CN202110260790A CN112965761B CN 112965761 B CN112965761 B CN 112965761B CN 202110260790 A CN202110260790 A CN 202110260790A CN 112965761 B CN112965761 B CN 112965761B
Authority
CN
China
Prior art keywords
host
target
mounting
directory
preset
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202110260790.7A
Other languages
Chinese (zh)
Other versions
CN112965761A (en
Inventor
楼奕华
狄坤
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
China Travelsky Technology Co Ltd
Original Assignee
China Travelsky Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by China Travelsky Technology Co Ltd filed Critical China Travelsky Technology Co Ltd
Priority to CN202110260790.7A priority Critical patent/CN112965761B/en
Publication of CN112965761A publication Critical patent/CN112965761A/en
Application granted granted Critical
Publication of CN112965761B publication Critical patent/CN112965761B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/445Program loading or initiating
    • G06F9/44505Configuring for program initiating, e.g. using registry, configuration files
    • G06F9/4451User profiles; Roaming
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/445Program loading or initiating
    • G06F9/44521Dynamic linking or loading; Link editing at or after load time, e.g. Java class loading
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/445Program loading or initiating
    • G06F9/44594Unloading

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The application provides a data processing method, a system, electronic equipment and a storage medium, wherein when a preset mounting command is received, a placeholder in a host directory name in a user-defined parameter is replaced by a preset actual value to obtain a first source directory; if the first source catalog and the target mounting position do not exist on the first host, the first source catalog is built on the first host and mounted to the target mounting position built on the first host; when a preset unloading command is received and a target unloading position exists on the second host, determining a second source directory mounted on the target unloading position according to a plurality of pieces of mounting information read from the preset directory, unloading the second source directory mounted on the target unloading position, and deleting the target unloading position from the second host. The application can avoid the data writing to the file under the same directory of the host machine, which leads to the file damage, or the error unloading of the source directory of other Pods with the same configuration on the host machine.

Description

Data processing method, system, electronic equipment and storage medium
Technical Field
The present application relates to the field of computer technologies, and in particular, to a data processing method, a system, an electronic device, and a storage medium.
Background
With the continuous growth of services, the limitation of application of the single architecture becomes more obvious, and the service system gradually changes to the micro-service mode. The application program of the single architecture is a deployment package and is deployed on a physical server, the micro-service architecture is a distributed network formed by a series of fine-grained services with single responsibility, one application program can contain tens to hundreds of micro-services, and one micro-service is an independent deployment package. Because resource boundaries cannot be defined for applications deployed in a physical server, the management and maintenance costs of each micro-service, whether deployed on a separate physical server or multiple micro-services on the same physical server, will exhibit explosive increases.
In the prior art, the lightweight isolation between application processes is realized by the isolation function provided by the kernel of the operating system on the physical server through the container technology, however, when an enterprise self-builds a self-built private cloud, since the container cluster management system Kubernetes can use the same configuration to generate a plurality of Pod, there may be a plurality of Pod to be scheduled to run on the same host, and the directory names of the directories mounted on the host by the plurality of Pod are the same, and when the application program in the plurality of Pod is running, the plurality of Pod can write data into a file under the same directory of the same host, so that the file is damaged, or when the corresponding source directory is unloaded, the source directory corresponding to other Pod with the same configuration on the host is erroneously unloaded.
Disclosure of Invention
In view of this, the present invention provides a data processing method, system, electronic device, and storage medium, so as to implement that source directories corresponding to each Pod with the same configuration are mounted on different directories on the same host, so as to avoid writing data into a file under the same directory of the host when running an application program in a Pod with the same configuration, resulting in damage to the file, or to erroneously offload source directories corresponding to other pods with the same configuration on the host when offloading the corresponding source directories.
The first aspect of the invention discloses a data processing method, which is applied to a container cluster management system, and comprises the following steps:
when a preset mounting command is received, replacing a placeholder in a host directory name in a user-defined parameter with a preset actual value to obtain a first source directory, wherein the preset mounting command carries the user-defined parameter and a target mounting position which are configured in a target Pod in advance, and the preset actual value is generated when the target Pod is created by using the container cluster management system;
if the first source directory does not exist on the first host, and the target mounting position does not exist on the first host, the first source directory and the target mounting position are created on the first host, wherein the first host is a host corresponding to the host directory name;
Mounting the first source catalog on the first host to the target mounting position on the first host, and mapping the target mounting position on which the first source catalog is mounted to the target Pod;
when a preset unloading command is received and a target unloading position exists on a second host, reading a plurality of pieces of mounting information from a preset catalog, wherein the second preset command carries a second host name and the target unloading position, and the second host is a host corresponding to the second host name;
and determining a second source directory mounted on the target unloading position according to the plurality of pieces of mounting information, unloading the second source directory mounted on the target unloading position, and deleting the target unloading position from the second host.
Optionally, replacing the placeholder in the host directory name in the custom parameter with a preset actual value to obtain a first source directory includes:
analyzing the self-defined parameters to obtain a host directory name to be mounted to the target Pod, wherein the host directory name comprises a placeholder, and the placeholder is a standard parameter generated based on the container cluster management system;
And replacing the placeholder in the host directory name with a preset actual value to obtain a first source directory.
Optionally, before mounting the first source directory on the first host to the target mounting location on the first host, the method further includes:
analyzing the self-defined parameters;
if the access authority parameters are analyzed, setting the access authority of the first source directory according to the access authority parameters;
and if the access permission parameters are not analyzed, setting the access permission of the first source directory as a preset default access permission.
Optionally, after mounting the first source directory on the first host to the target mounting location on the first host, the method further includes:
acquiring standard parameters which are carried by the preset mounting command and are generated based on the container cluster management system, wherein the standard parameters comprise character strings;
analyzing the character string to obtain a target character;
if the target character is a first preset character, setting the access authority of the first source directory as read-only mounting;
the setting the access right of the first source directory according to the access right parameter, or setting the access right of the first source directory as a default access right set in advance, includes:
If the target character is not the preset character, setting the access right of the first source directory according to the access right parameter, or setting the access right of the first source directory as a preset default access right.
Optionally, after the first source directory is created on the first host, the method further includes:
creating a first hidden file in a higher-level directory of the first source directory, and writing parameters obtained by analyzing the custom parameters into the first hidden file.
Optionally, the determining, according to the pieces of mounting information, the second source directory mounted on the target unloading position includes:
traversing each row of each piece of mounting information;
if a first target row with the mounting point field completely matched with the target unloading position does not exist, deleting the target unloading position on the second host;
if a first target row with the mounting point field completely matched with the target unloading position exists, extracting mounting equipment and a mounting source from the first target row;
traversing each row of each piece of mounting information again;
and if a second target row which is consistent with the mounting equipment in the first target row and the mounting source is a target mounting source exists, splicing the mounting point field in the second target row with the mounting source to obtain a second source catalog mounted on the target unloading position.
Optionally, after unloading the second source directory mounted on the target unloading position, the method further includes:
acquiring a second hidden file from a previous-level directory of the second source directory;
and if the user-defined parameters carried by the preset uninstallation command have parameters of a second preset character, deleting the second hidden file and the second source directory from the second host.
A second aspect of the present invention discloses a data processing system for use in a container cluster management system, the system comprising:
the system comprises a replacement unit, a storage unit and a storage unit, wherein the replacement unit is used for replacing a placeholder in a host directory name in a custom parameter with a preset actual value to obtain a first source directory when a preset mounting command is received, wherein the preset mounting command carries the custom parameter and a target mounting position which are configured in a target Pod in advance, and the preset actual value is generated when the target Pod is created by using the container cluster management system;
the first creating unit is configured to create, on a first host, the first source directory and the target mounting position if the first source directory does not exist on the first host and the target mounting position does not exist on the first host, where the first host is a host corresponding to the host directory name;
The mounting unit is used for mounting the first source catalog on the first host to the target mounting position on the first host and mapping the target mounting position on which the first source catalog is mounted to the target Pod;
the device comprises a reading unit, a target unloading unit and a storage unit, wherein the reading unit is used for reading a plurality of pieces of mounting information from a preset catalog when a preset unloading command is received and a target unloading position exists on a second host, the second preset command carries a second host name and the target unloading position, and the second host is a host corresponding to the second host name;
and the unloading unit is used for determining a second source catalog mounted on the target unloading position according to the plurality of pieces of mounting information, unloading the second source catalog mounted on the target unloading position, and deleting the target unloading position from the second host.
A third aspect of the present invention discloses an electronic device, comprising: the device comprises a processor and a memory, wherein the processor and the memory are connected through a communication bus; the processor is used for calling and executing the program stored in the memory; the memory is used for storing a program, and the program is used for realizing the data processing method.
A fourth aspect of the invention discloses a computer-readable storage medium having stored therein computer-executable instructions for performing the data processing method.
The method comprises the steps of replacing placeholders in host directory names in user-defined parameters carried in preset mounting commands with preset actual values under the condition that the preset mounting commands are received, obtaining a first source directory, creating the first source directory and target mounting positions on a first host under the condition that the first source directory does not exist on a host (the first host) corresponding to the host directory names and the target mounting positions unloaded by the preset mounting commands do not exist on the first host, mounting the first source directory created on the first host to the target mounting positions created on the first host, and therefore writing data to the same file on the same host when an application program with the same configuration Pod is operated to write data, and avoiding file damage; under the condition that a preset unloading command is received, and a target unloading position for unloading the preset unloading command exists on a host machine (a second host machine) corresponding to the host machine name carried in the preset unloading command, determining a source directory (a second source directory) mounted on the target unloading position from a plurality of pieces of mounting information of the pre-directory, and unloading the determined second source directory from the target unloading position, wherein other source directories corresponding to Pod with the same configuration on the second host machine cannot be unloaded in error.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings that are required to be used in the embodiments or the description of the prior art will be briefly described below, and it is obvious that the drawings in the following description are only embodiments of the present invention, and that other drawings can be obtained according to the provided drawings without inventive effort for a person skilled in the art.
The above and other features, advantages and aspects of embodiments of the present disclosure will become more apparent by reference to the following detailed description when taken in conjunction with the accompanying drawings. The same or similar reference numbers will be used throughout the drawings to refer to the same or like elements. It should be understood that the figures are schematic and that elements and components are not necessarily drawn to scale.
FIG. 1 is a schematic flow chart of a data processing method according to an embodiment of the present invention;
FIG. 2 is a flowchart illustrating another data processing method according to an embodiment of the present invention;
FIG. 3 is a schematic diagram of a data processing system according to an embodiment of the present invention;
fig. 4 is a schematic structural diagram of an electronic device according to an embodiment of the present invention.
Detailed Description
Embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. While the present disclosure has been illustrated in the drawings in some form, it is to be understood that the present disclosure may be embodied in various forms and should not be construed as limited to the embodiments set forth herein, but are provided to provide a more thorough and complete understanding of the present disclosure. It should be understood that the drawings and examples of the present disclosure are for illustrative purposes only and are not intended to limit the scope of the present disclosure.
The term "including" and variations thereof as used herein are intended to be open-ended, i.e., including, but not limited to. The term "based on" is based at least in part on. The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one additional embodiment"; the term "some embodiments" means "at least some embodiments. Related definitions of other terms will be given in the description below.
It should be noted that the terms "first," "second," and the like in this disclosure are merely used for distinguishing between different devices, modules, or units and not for limiting the order or interdependence of the functions performed by these devices, modules, or units.
It should be noted that references to "one" or "a plurality" in this disclosure are intended to be illustrative rather than limiting, and those of ordinary skill in the art will appreciate that "one or more" is intended to be interpreted as "one or more" unless the context clearly indicates otherwise.
Kubernetes: the Google open-source container cluster management system provides functions of application deployment, maintenance, expansion mechanism and the like.
Namespace: namespaces, in a container cluster management system cluster, namespace provides a scope constraint for object names in the container cluster management system.
Pod: a Pod is a set of containers that need to work cooperatively, and the containers share resources such as an IP address, a set of disk volumes, a kernel name space, etc. The dispatcher of the container cluster management system arranges each container in the Pod to a host to run according to the policy and the state of each host.
Host machine: the host is a node server in the container cluster management system for running containers, each container in the container cluster management system runs in a host, and all containers in the same Pod run in the same host.
FlexVolume: a set of volume driving plug-in frames are arranged in the container cluster management system, so that a user can realize a driving program for mounting/dismounting the volume by himself, and the volume type which can be used by the container cluster management system is expanded. A standard set of operating commands is defined through which a user-written driver needs to respond to implement its own defined volume mount/volume unload logic, through which the container cluster management system Kubernetes interacts with the driver.
ReplicaSet: the container cluster management system is used for maintaining a stable set of resource objects of a Pod copy which is in a running state at any time, and generates corresponding quantity of Pod objects with identical configuration according to the description of the Pod configuration and quantity in the ReplicaSet so as to ensure the usability of the pods.
Referring to fig. 1, fig. 1 is a flow chart of a data processing method according to an embodiment of the present application, where the data processing method is applied to a container cluster management system, and the data processing method specifically includes the following steps:
s101: when a preset mounting command is received, replacing a placeholder in a host directory name in the custom parameter with a preset actual value to obtain a first source directory, wherein the preset mounting command carries the custom parameter and a target mounting position which are configured in a target Pod in advance, and the preset actual value is generated when the target Pod is created by using a container cluster management system.
In step S101, when the container cluster management system receives a configuration request of a ReplicaSet, generating a corresponding number of Pod according to spec.replicas configuration content in the ReplicaSet, and respectively scheduling each generated Pod to a host in the container cluster management system for execution; for each host, a subdirectory can be set under the preset mount directory of the host, and a Pod mount component can be set in the executable file under the subdirectory.
The Pod mount component may mount the directory on the host to a location specified based on the FlexVolume plug-in frame (for ease of distinction, the location specified based on the FlexVolume plug-in frame is referred to herein as a target mount location) in response to a mount command defined in the FlexVolume plug-in frame (for ease of distinction, the mount command defined in the FlexVolume plug-in frame is referred to as a preset mount command), so that the container cluster management system maps the location where the directory is mounted to the corresponding Pod.
It should be noted that, each Pod is generated according to the content of the spec.template field; the preset catalogue can be "/usr/libexec/kubrenetes/kubrenet-plugs/volumes/exec", the catalogue name of the subdirectory can be "vendor-driver", and the file name of the executable file can be "driver".
It should be noted that, when the container cluster management system generates a corresponding Pod according to the content of the spec.template field, the container cluster management system also generates an actual value corresponding to the Pod according to the nacespace to which the Pod belongs.
In the specific execution process of step S101, the custom parameter and the target mounting position configured in the target Pod in advance are added to the preset mounting command, and when the mounting component is called by the preset mounting command, the preset actual value is transmitted to the Pod mounting component together, so that when the Pod mounting component receives the preset mounting command, the placeholder in the host directory name in the custom parameter is replaced by the preset actual value, and the first source directory is obtained.
In the embodiment of the present application, the manner of replacing the placeholder in the host directory name in the custom parameter with the preset actual value to obtain the first source directory may be: analyzing the self-defined parameters to obtain a host machine directory name to be mounted on the target Pod, and replacing the placeholder in the host machine directory name with a preset actual value to obtain a first source directory. Wherein the placeholder is a standard parameter generated by the container cluster management system.
For example, a host directory name in a custom parameter configured in Pod1 in advance is "/path/to/logs/kubernetes.io/pod.nacispace", where "kubernetes.io/pod.nacispace" is a placeholder in the host directory name, and when a container cluster management system is utilized to generate a corresponding Pod according to the content of the spec.template field, the container cluster management system generates an actual value corresponding to the Pod as "test" according to the nacispace to which the Pod belongs.
Adding a user-defined parameter and a target mounting position which are configured in Pod1 (target Pod) in advance to a preset mounting command, and transmitting a pre-actual value ('test') to a Pod mounting component on a host to which the target Pod belongs in a container cluster management system together when the mounting component is called by the preset mounting command, so that the Pod mounting component analyzes a child user-defined parameter carried in the preset mounting command when receiving the preset mounting command to obtain a host directory name '/path/to/logs/kuuberes.io/pod.namespace' to be mounted to the target Pod; and replacing the placeholder 'kubernetes/pod/namespace' in the host directory name with a preset actual value ('test'), and obtaining a first source directory as '/path/to/logs/test'.
S102: and judging whether a first source directory exists on the first host machine or not and whether a target mounting position exists on the first host machine or not. If the first host does not have the first source directory and the first host does not have the target mounting position, executing step S103; if the first source directory exists on the first host and the target mount location exists on the first host, step S104 is executed.
In the specific execution process of step S102, after replacing the placeholder in the host directory name in the custom parameter carried by the received preset mount command with the preset actual value to obtain the first source directory, it may be first determined whether the host corresponding to the host directory name (for convenience of distinguishing, the host corresponding to the host directory name is referred to as the first host) has the first source directory, and whether the target mount location carried by the preset mount command exists; if the first host does not have the first source directory or the target mounting position, executing step S103; if the first source directory and the target mount location already exist on the first host, step S104 is performed.
If the first host has the first source directory, but does not have the target mounting position, the target mounting position is created on the first host; or, if the target mounting position exists on the first host machine, but the first source directory does not exist, the first source directory is created on the first host machine.
S103: a first source directory and a target mount location are created on a first host.
In the process of specifically executing step S103, in the case where there is no first source directory on the first host machine and there is no target mount location, the first source directory and the target mount location are created on the first host machine, so that the first source directory created on the first host machine is mounted on the target mount location created on the first host machine.
Further, in the embodiment of the present application, after the first source directory is created on the first host, a corresponding access right may be set for the first source directory created on the first host, specifically, a custom parameter carried by a preset mount command is parsed, whether the access right parameter can be parsed is determined, and in the case that the access right parameter can be parsed, the access right of the first source directory is set according to the access right parameter; and if the access permission parameter is not analyzed, setting the access permission parameter of the first source directory as a default access permission.
It should be noted that the access right parameter may be "driver.
It should be noted that the access right may be read-only mount, write-only mount, or readable/writable mount. The default access rights may be a readable and writable mount.
S104: and mounting the first source catalog on the first host to a target mounting position on the first host, and mapping the target mounting position on which the first source catalog is mounted to a target Pod.
In the specific execution process of step S104, the first source directory and the target mount location exist on the first host, or, in the case that the first source directory and the target mount location do not exist on the first host, but the first source directory and the target mount location have been created on the first host, the first source directory of the first host is mounted to the target mount location on the first host, and the target mount location on which the first source directory is mounted is mapped to the target Pod, so that when the application program in the target Pod is running, data is written or read into the file under the first source directory mounted on the target mount location on the first host.
Further, in the embodiment of the present application, a first preset character is preset, after a first source directory on a first host is mounted to a target mounting position on the first host, a standard parameter generated based on a container cluster management system and carried by a preset mounting command may be further acquired, and a character string in the acquired standard parameter is parsed to obtain a target character.
Judging whether the target character is a first preset character or not, and setting the access right originally set by the first source directory mounted on the target mounting position as read-only mounting under the condition that the target character is the first preset character. The access right originally set by the first source directory is the access right set before the first source directory is mounted to the target mounting position.
And under the condition that the target character is not the first pre-character, reserving the access right originally set by the first source directory mounted on the target mounting position.
In the existing service system, the application program supporting multi-tenant deployment has the following requirements: some micro-service deployments in the same tenant need to share a group of files, but the tenant cannot access each other's files.
In the embodiment of the application, the Pod under the same Namespace can share the first source directory data mounted on the target mounting position on the same host, and the Pod under the same Namespace can share the first source directory data mounted on the target mounting position on the same host.
For example, pod1 and Pod2 are both located in the Namespace ns1, belong to the same tenant, and when the container cluster management system is utilized to generate actual values of Pod1 and Pod2 according to the content of the spec.template field, the same actual values may be generated, so that the generated first source directory of Pod1 and the generated first source directory of Pod2 are the same source directory.
If Pod1 and Pod2 are scheduled to be executed on the same host 1.2.3.4, the data in the first source directory mounted on the target mounting position on the host 1.2.3.4 can be shared only by mounting the first source directories corresponding to Pod1 and Pod2 on the same target mounting position.
It should be noted that the character string may be "kubernetes.
S105: when a preset unloading command is received and a target unloading position exists on a second host, reading a plurality of pieces of mounting information from a preset catalog, wherein the second preset command carries a second host name and the target unloading position, and the second host is a host corresponding to the second host name.
In step S105, when the container cluster management system receives the configuration request of the ReplicaSet, a corresponding number of Pod is generated according to the spec.replicas configuration content in the ReplicaSet, and each Pod generated is respectively scheduled to a host in the container cluster management system for execution; for each host, a subdirectory may be set under a preset offload directory of the host, and a Pod offload component may be set under an executable file under the subdirectory. The preset uninstalled directory and the preset installed directory on the host machine can be the same directory.
The Pod mount component may offload the mounted catalog on the host at a location specified based on the FlexVolume plug-in frame (for ease of distinction, the location specified here based on the FlexVolume plug-in frame is referred to as the target offload location) in response to the umount command defined in the FlexVolume plug-in frame (for ease of distinction, the umount command defined in the FlexVolume plug-in frame is referred to as the preset offload command).
In the specific execution process of step S105, a preset directory is preset on each host, a target unloading position and a host name corresponding to the target unloading position (for convenience of distinction, the host name corresponding to the target unloading position is called a second host name) are added to a preset unloading command, when the unloading component on the host corresponding to the target unloading position on the container cluster management system is called by the preset unloading command, the unloading component determines whether the target unloading position exists on a second host corresponding to the second host name carried by the received preset unloading command, and if the target unloading position does not exist on the second host, unloading completion information is directly output.
And under the condition that the target unloading position exists on the second host, reading a plurality of pieces of mounting information of the current process from a preset catalog preset on the second host.
It should be noted that, the directory name of the preset directory preset on the host may be "/proc/self/mount".
S106: and determining a second source directory mounted on the target unloading position according to the plurality of pieces of mounting information, unloading the second source directory mounted on the target unloading position, and deleting the target unloading position from the second host.
In the specific execution of step S106, in the case that the target unloading position exists on the second host, the current pieces of mounting information are read from the preset directory preset on the second host, and the source directory mounted on the target unloading position is determined according to the mounting point field and the target unloading position in each piece of mounting information (for convenience of distinction, the source directory mounted on the target unloading position is referred to as the second source directory).
In the embodiment of the application, each row of each piece of mounting information is traversed, whether a row of the mounting point field which is completely matched with the target unloading position exists or not is judged (for convenience of distinguishing, the row which is completely matched with the target unloading position is called a first target row), and the target unloading position is directly deleted from the second host machine under the condition that the first target row which is completely matched with the mounting point field and the target unloading position does not exist.
Under the condition that a first target row with the mounting point field completely matched with the target unloading position exists, extracting mounting equipment and a mounting source from the first target row, traversing each row of each piece of mounting information again, judging that the mounting equipment is consistent with each row, the mounting source is a row of the target mounting source (for convenience of distinguishing, a row which is matched with the mounting equipment and is the target mounting source is called a second target row), and under the condition that a second target row which is consistent with the mounting equipment or is not the target mounting source does not exist, directly deleting the target unloading position from a second host.
And under the condition that a second target row consistent with the mounting equipment exists and the mounting source is the target mounting source, splicing the mounting point field in the second target row with the mounting source in the first target row to obtain a second source catalog mounted on the target unloading position, unloading the second source catalog from the target unloading position, and deleting the target unloading position from the second host.
It should be noted that the target mounting source may be "/".
The invention provides a data processing method, which is applied to a container cluster management system, under the condition that a preset mounting command is received, a placeholder in a host directory name in a user-defined parameter carried in the preset mounting command is replaced by a preset actual value to obtain a first source directory, so that when an application program with the same configuration Pod is operated to write data into the same file on the same host, the data are not written into the same file on the same host under the condition that the first source directory does not exist on the host (the first host) corresponding to the host directory name and the target mounting position unloaded by the preset mounting command does not exist on the first host, the first source directory and the target mounting position are created on the first host, and the first source directory created on the first host is mounted to the target mounting position created on the first host; under the condition that a preset unloading command is received, and a target unloading position for unloading the preset unloading command exists on a host machine (a second host machine) corresponding to the host machine name carried in the preset unloading command, a source directory (a second source directory) mounted on the target unloading position is determined from a plurality of pieces of mounting information of a preset file, and then the determined second source directory is unloaded from the target unloading position, so that source directories corresponding to other Pods with the same configuration on the second host machine cannot be unloaded in error.
Referring to fig. 2, a flow chart of another data processing method provided by an embodiment of the present invention is shown, where the data processing method is applied to a container cluster management system, and the data processing method specifically includes the following steps:
s201: when a preset mounting command is received, replacing a placeholder in a host directory name in the custom parameter with a preset actual value to obtain a first source directory, wherein the custom parameter and a target mounting position which are configured in a target Pod in advance are generated when the target Pod is created by using a container cluster management system.
S202: and judging whether a first source directory exists on the first host machine or not and whether a target mounting position exists on the first host machine or not. If the first host does not have the first source directory and the first host does not have the target mounting position, executing step S203; if the first source directory exists on the first host and the target mount location exists on the first host, step S204 is performed.
S203: a first source directory and a target mount location are created on a first host.
In the process of specifically executing steps S201 to S203, the specific execution and implementation principles of steps S201 to S203 are the same as those of steps S101 to S103 in fig. 1 provided by the present invention, and reference may be made to the corresponding parts in fig. 1 provided by the present invention, and the detailed description is omitted herein.
S204: creating a first hidden file in the upper-level directory of the first source directory, and writing parameters obtained by analyzing the custom parameters into the first hidden file.
In the process of specifically executing step S204, after the first source directory is created on the first host, or in the case where the first source directory exists on the first host, a hidden file may be created in a previous directory of the first source directory of the first host (for convenience of distinction, the created hidden file is referred to as a first hidden file), and all parameters obtained by parsing the custom parameters are written into the created first hidden file.
It should be noted that, the file name of the first hidden file created in the previous level directory of the first source directory of the first host may be "< last part in the source directory path >".
For example, if the first source directory on the first host is "/path/to/root", a first hidden file named "/path/to" is created.
Further, in the embodiment of the present application, the user-defined parameters are parsed, if the user-defined parameters include preset parameters, a text file may be created in the first source directory, and parameters related to the preset parameters in the target Pod and corresponding parameter values thereof are written into the text file. The text file is named as a parameter value corresponding to the preset parameter.
It should be noted that, the preset parameter may be "driver. Export", and the value corresponding to the preset parameter may be "agent. Ini".
For example, if the preset parameter is "driver. Export", the corresponding parameter value of the preset parameter may be "agent. Ini", the parameter related to the preset parameter in the target Pod is "export. Abc", and the value of "export. Abc" is "123".
If the preset parameter "driver.export" exists in the custom parameter, a text file named "agent.ini" is created under the first source directory of the first host, all the parameters "export.abc" named "in the target Pod by" export.< name > "and the value" 123 "thereof are written into the text file, and the written format is" abc:123".
S205: and mounting the first source catalog on the first host to a target mounting position on the first host, and mapping the target mounting position on which the first source catalog is mounted to a target Pod.
In the process of specifically executing step S205, the specific execution process and implementation principle of step S205 are the same as those of step S104 in fig. 1 provided by the present invention, and may refer to the corresponding parts in fig. 1 provided by the present invention, and will not be described herein.
S206: when a preset unloading command is received and a target unloading position exists on a second host, reading a plurality of pieces of mounting information from a preset file, wherein the second preset command carries a second host name and the target unloading position, and the second host is a host corresponding to the second host name.
S207: and determining a second source directory mounted on the target unloading position according to the plurality of pieces of mounting information, unloading the second source directory mounted on the target unloading position, and deleting the target unloading position from the second host.
In the process of specifically executing steps S206 to S207, the specific execution and implementation principles of steps S206 to S207 are the same as those of steps S105 to S106 in fig. 1 provided by the present invention, and may refer to the corresponding parts in fig. 1 provided by the present invention, and will not be described herein.
S208: and acquiring the second hidden file from the upper-level directory of the second source directory.
In the process of specifically executing step S208, after the second source directory is offloaded from the target offloading location, the second hidden file may be obtained from the previous level directory of the second source directory of the second host.
S209: judging whether a second preset character exists in the user-defined parameters carried by the preset unloading command. If so, step S210 is performed; if not, step S211 is performed.
In the specific execution process of step S209, after the second hidden file is obtained, it may be determined whether a parameter of the second preset character exists in the custom parameters carried by the preset uninstall command, and step S210 is executed if a parameter of the second preset character exists in the custom parameters carried by the preset uninstall command; if the parameter of the second preset character does not exist in the custom parameters carried by the preset uninstall command, step S211 is executed.
It should be noted that the second preset character may be "true", and the parameter of the second preset character may be "driver.
S210: and deleting the second hidden file and the second source directory from the second host.
In the specific execution of step S210, in the case that the parameter of the second preset character exists in the custom parameter carried by the preset uninstallation command, the JSON-serialized data in the second hidden parameter and the data transferred when the second source directory is mounted to the second host are re-parsed into a format readable by the program, so as to read the re-parsed data, and the read data and the second source directory are deleted from the second host.
S211: and deleting the second hidden file from the second host.
In the specific execution of step S211, in the case that the parameter of the second preset character does not exist in the custom parameter carried by the preset uninstall command, the data which has been JSON serialized in the second hidden parameter, and the data transferred when the second source directory is mounted to the second host are re-parsed into a format readable by the program, so as to read the re-parsed data, and delete the read data.
In the embodiment of the application, the first hidden file can be further created in the upper-level directory of the first source directory on the first host machine under the condition that the first source directory exists on the first host machine or the first source directory is created on the first host machine, so that all parameters obtained by analyzing the custom parameters are written in the first hidden file. After the second source directory is uninstalled from the target uninstalled position of the second host, the second hidden file can be further obtained from the previous-level directory of the second source directory, and the second hidden file and the second source directory are deleted from the second host under the condition that the second preset character parameter exists in the self-defined parameters uninstalled by the preset uninstalling command.
The flowcharts and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
In some implementations, the clients, servers may communicate using any currently known or future developed network protocol, such as HTTP (HyperText Transfer Protocol ), and may be interconnected with any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include a local area network ("LAN"), a wide area network ("WAN"), the internet (e.g., the internet), and peer-to-peer networks (e.g., ad hoc peer-to-peer networks), as well as any currently known or future developed networks.
The names of messages or information interacted between the devices in the disclosed embodiments are for illustrative purposes only and are not intended to limit the scope of such messages or information.
Although operations are depicted in a particular order, this should not be understood as requiring that such operations be performed in the particular order shown or in sequential order. In certain circumstances, multitasking and parallel processing may be advantageous.
It should be understood that the various steps recited in the method embodiments of the present disclosure may be performed in a different order and/or performed in parallel. Furthermore, method embodiments may include additional steps and/or omit performing the illustrated steps. The scope of the present disclosure is not limited in this respect.
Computer program code for carrying out operations of the present disclosure may be written in one or more programming languages, including but not limited to an object oriented programming language such as Java, smalltalk, C ++ and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any kind of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or may be connected to an external computer (for example, through the Internet using an Internet service provider).
Corresponding to the data processing method disclosed in the above embodiment of the present invention, referring to fig. 3, an embodiment of the present invention further provides a schematic structural diagram of a data processing system, where the data processing apparatus is applied to a container cluster management system, and the data processing apparatus includes:
the replacing unit 31 is configured to replace a placeholder in a host directory name in a custom parameter with a preset actual value when a preset mount command is received, so as to obtain a first source directory, where the preset mount command carries the custom parameter and a target mount position configured in advance in a target Pod, and the preset actual value is generated when the target Pod is created by using the container cluster management system;
a first creating unit 32, configured to create, on the first host, the first source directory and the target mount location if the first source directory does not exist on the first host and the target mount location does not exist on the first host, where the first host is a host corresponding to a host directory name;
a mounting unit 33, configured to mount the first source directory on the first host to a target mounting location on the first host, and map the target mounting location on which the first source directory is mounted to a target Pod;
The reading unit 34 is configured to read a plurality of pieces of mounting information from the preset directory when a preset unloading command is received and a target unloading position exists on the second host, where the second preset command carries a second host name and the target unloading position, and the second host is a host corresponding to the second host name;
and the unloading unit 35 is configured to determine the second source directory mounted on the target unloading position according to the plurality of pieces of mounting information, unload the second source directory mounted on the target unloading position, and delete the target unloading position from the second host.
The specific principle and execution process of each unit in the data processing device disclosed in the above embodiment of the present invention are the same as those of the data processing method disclosed in the above embodiment of the present invention, and reference may be made to corresponding parts in the data processing method disclosed in the above embodiment of the present invention, and no redundant description is given here.
The invention provides a data processing system, which is applied to a container cluster management system, under the condition that a preset mounting command is received, a placeholder in a host directory name in a user-defined parameter carried in the preset mounting command is replaced by a preset actual value to obtain a first source directory, so that when an application program with the same configuration Pod is operated to write data into the same file on the same host, the data is not written into the same file on the same host under the condition that the first source directory does not exist on the host (the first host) corresponding to the host directory name and the target mounting position unloaded by the preset mounting command does not exist on the first host, the first source directory and the target mounting position are created on the first host, and the first source directory created on the first host is mounted to the target mounting position created on the first host; under the condition that a preset unloading command is received, and a target unloading position for unloading the preset unloading command exists on a host machine (a second host machine) corresponding to the host machine name carried in the preset unloading command, determining a source directory (a second source directory) mounted on the target unloading position from a plurality of pieces of mounting information of the pre-directory, and unloading the determined second source directory from the target unloading position, wherein other source directories corresponding to Pod with the same configuration on the second host machine cannot be unloaded in error.
Optionally, the first replacing unit includes:
the first analysis unit is used for analyzing the self-defined parameters to obtain a host machine directory name to be mounted to the target Pod, wherein the host machine directory name comprises a placeholder which is a standard parameter generated based on the container cluster management system;
and the second replacing unit is used for replacing the placeholder in the host directory name with a preset actual value to obtain the first source directory.
Further, the data processing device provided by the invention further comprises:
the second analysis unit is used for analyzing the user-defined parameters;
the first setting unit is used for setting the access authority of the first source directory according to the access authority parameter if the access authority parameter is analyzed;
and the second setting unit is used for setting the access right of the first source directory as a preset default access right if the access right parameter is not analyzed.
Further, the data processing device provided by the invention further comprises:
the first acquisition unit is used for acquiring standard parameters which are carried by a preset mounting command and are generated based on the container cluster management system, wherein the standard parameters comprise character strings;
the third analysis unit is used for analyzing the character string to obtain a target character;
The third setting unit is used for setting the access authority of the first source directory as read-only mount if the target character is a first preset character;
the first setting unit is further configured to set the access right of the first source directory according to the access right parameter if the target character is not a preset character, or the second setting unit is further configured to set the access right of the first source directory to a preset default access right if the target character is not a preset character.
Further, the data processing device provided by the invention further comprises:
the creating unit is used for creating a first hidden file in the upper-level directory of the first source directory, and writing the parameters obtained by analyzing the custom parameters into the first hidden file.
Optionally, the unloading unit includes:
the first traversing unit is used for traversing each row of each piece of mounting information;
the first deleting unit is used for deleting the target unloading position on the second host if the first target row with the mounting point field completely matched with the target unloading position does not exist;
the extraction unit is used for extracting the mounting equipment and the mounting source from the first target row if the first target row with the mounting point field completely matched with the target unloading position exists;
The second traversing unit is used for traversing each row of each piece of mounting information again;
and the splicing unit is used for splicing the mounting point word segments in the second target row with the mounting source if the second target row which is consistent with the mounting equipment in the first target row and the mounting source is the target mounting source exists, so as to obtain a second source catalog mounted on the target unloading position.
Further, the data processing device provided by the application further comprises:
the second acquisition unit is used for acquiring a second hidden file from the upper-level directory of the second source directory;
and the second deleting unit is used for deleting the second hidden file and the second source directory from the second host if the parameter of the second preset character exists in the custom parameter carried by the preset uninstallation command.
The units described in the embodiments of the present disclosure may be implemented by software or hardware. The name of the unit does not in any way constitute a limitation of the unit itself, for example the first acquisition unit may also be described as "unit acquiring at least two internet protocol addresses".
The above-described functions of the present application may be performed, at least in part, by one or more hardware logic components. For example, without limitation, exemplary types of hardware logic components that may be used include: a Field Programmable Gate Array (FPGA), an Application Specific Integrated Circuit (ASIC), an Application Specific Standard Product (ASSP), a system on a chip (SOC), a Complex Programmable Logic Device (CPLD), and the like.
The embodiment of the application also provides electronic equipment, which comprises: the device comprises a processor and a memory, wherein the processor and the memory are connected through a communication bus; the processor is used for calling and executing the program stored in the memory; the memory is used for storing a program for realizing the data processing method.
Referring now to fig. 4, a schematic diagram of an electronic device suitable for use in implementing the disclosed embodiments of the application is shown. The electronic device in the disclosed embodiments of the present application may include, but is not limited to, mobile terminals such as mobile phones, notebook computers, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), in-vehicle terminals (e.g., in-vehicle navigation terminals), and the like, and stationary terminals such as digital TVs, desktop computers, and the like. The electronic device shown in fig. 4 is only an example and should not be construed as limiting the functionality and scope of use of the disclosed embodiments of the application.
As shown in fig. 4, the electronic device may include a processing means (e.g., a central processor, a graphics processor, etc.) 401, which may perform various appropriate actions and processes according to a program stored in a Read Only Memory (ROM) 402 or a program loaded from a storage means 406 into a Random Access Memory (RAM) 403. In the RAM 403, various programs and data required for the operation of the electronic device are also stored. The processing device 401, the ROM 402, and the RAM 403 are connected to each other by a bus 404. An input/output (I/O) interface 405 is also connected to bus 404.
In general, the following devices may be connected to the I/O interface 405: input devices 406 including, for example, a touch screen, touchpad, keyboard, mouse, camera, microphone, accelerometer, gyroscope, etc.; an output device 407 including, for example, a Liquid Crystal Display (LCD), a speaker, a vibrator, and the like; storage 408 including, for example, magnetic tape, hard disk, etc.; and a communication device 409. The communication means 409 may allow the electronic device to communicate with other devices wirelessly or by wire to exchange data. While fig. 4 shows an electronic device having various means, it is to be understood that not all of the illustrated means are required to be implemented or provided. More or fewer devices may be implemented or provided instead.
In particular, according to embodiments of the present disclosure, the processes described above with reference to flowcharts may be implemented as computer software programs. For example, embodiments of the present disclosure include a computer program product comprising a computer program embodied on a non-transitory computer readable medium, the computer program comprising program code for performing the method shown in the flow chart. In such an embodiment, the computer program may be downloaded and installed from a network via communications device 409, or from storage 408, or from ROM 402. The above-described functions defined in the methods of the disclosed embodiments of the invention are performed when the computer program is executed by the processing means 401.
Still further, an embodiment of the present invention also provides a computer-readable storage medium having stored therein computer-executable instructions for performing a data processing method.
The computer readable medium carries one or more programs which, when executed by the electronic device, cause the electronic device to: when a preset mounting command is received, replacing a placeholder in a host directory name in a user-defined parameter with a preset actual value to obtain a first source directory, wherein the preset mounting command carries the user-defined parameter and a target mounting position which are configured in a target Pod in advance, and the preset actual value is generated when the target Pod is created by using the container cluster management system; if the first source directory does not exist on the first host, and the target mounting position does not exist on the first host, the first source directory and the target mounting position are created on the first host, wherein the first host is a host corresponding to the host directory name; mounting the first source catalog created on the first host to the target mounting position created on the first host, and mapping the target mounting position on which the first source catalog is mounted to the target Pod; when a preset unloading command is received and a target unloading position exists on a second host, reading a plurality of pieces of mounting information from a preset catalog, wherein the second preset command carries a second host name and the target unloading position, and the second host is a host corresponding to the second host name; and determining a second source directory mounted on the target unloading position according to the plurality of pieces of mounting information, unloading the second source directory mounted on the target unloading position, and deleting the target unloading position from the second host.
In the context of this disclosure, a machine-readable medium may be a tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. The machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. The machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
It should be noted that the computer readable medium disclosed in the present invention may be a computer readable signal medium or a computer readable storage medium, or any combination of the two. The computer readable storage medium can be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or a combination of any of the foregoing. More specific examples of the computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the context of this disclosure, a computer-readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In the present disclosure, however, the computer-readable signal medium may comprise a data signal propagated in baseband or as part of a carrier wave, with the computer-readable program code embodied therein. Such a propagated data signal may take any of a variety of forms, including, but not limited to, electro-magnetic, optical, or any suitable combination of the foregoing. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: electrical wires, fiber optic cables, RF (radio frequency), and the like, or any suitable combination of the foregoing.
The computer readable medium may be contained in the electronic device; or may exist alone without being incorporated into the electronic device.

Claims (10)

1. A data processing method, applied to a container cluster management system, the method comprising:
when a preset mounting command is received, replacing a placeholder in a host directory name in a user-defined parameter with a preset actual value to obtain a first source directory, wherein the preset mounting command carries the user-defined parameter and a target mounting position which are configured in a target Pod in advance, and the preset actual value is generated when the target Pod is created by using the container cluster management system;
if the first source directory does not exist on the first host, and the target mounting position does not exist on the first host, the first source directory and the target mounting position are created on the first host, wherein the first host is a host corresponding to the host directory name;
mounting the first source catalog on the first host to the target mounting position on the first host, and mapping the target mounting position on which the first source catalog is mounted to the target Pod;
When a preset unloading command is received and a target unloading position exists on a second host, reading a plurality of pieces of mounting information from a preset catalog, wherein the second preset command carries a second host name and the target unloading position, and the second host is a host corresponding to the second host name;
and determining a second source directory mounted on the target unloading position according to the plurality of pieces of mounting information, unloading the second source directory mounted on the target unloading position, and deleting the target unloading position from the second host.
2. The method of claim 1, wherein replacing the placeholder in the host directory name in the custom parameter with the preset actual value to obtain the first source directory comprises:
analyzing the self-defined parameters to obtain a host directory name to be mounted to the target Pod, wherein the host directory name comprises a placeholder, and the placeholder is a standard parameter generated based on the container cluster management system;
and replacing the placeholder in the host directory name with a preset actual value to obtain a first source directory.
3. The method of claim 1, wherein prior to mounting the first source directory on the first host to the target mounting location on the first host, the method further comprises:
Analyzing the self-defined parameters;
if the access authority parameters are analyzed, setting the access authority of the first source directory according to the access authority parameters;
and if the access permission parameters are not analyzed, setting the access permission of the first source directory as a preset default access permission.
4. The method of claim 3, wherein after mounting the first source directory on the first host to the target mounting location on the first host, the method further comprises:
acquiring standard parameters which are carried by the preset mounting command and are generated based on the container cluster management system, wherein the standard parameters comprise character strings;
analyzing the character string to obtain a target character;
if the target character is a first preset character, setting the access authority of the first source directory as read-only mounting;
the setting the access right of the first source directory according to the access right parameter, or setting the access right of the first source directory as a default access right set in advance, includes:
if the target character is not the preset character, setting the access right of the first source directory according to the access right parameter, or setting the access right of the first source directory as a preset default access right.
5. The method of claim 2, wherein after creating the first source directory on the first host, the method further comprises:
creating a first hidden file in a higher-level directory of the first source directory, and writing parameters obtained by analyzing the custom parameters into the first hidden file.
6. The method of claim 1, wherein the determining a second source directory for mounting on the target mounting location based on the plurality of pieces of mounting information comprises:
traversing each row of each piece of mounting information;
if a first target row with the mounting point field completely matched with the target unloading position does not exist, deleting the target unloading position on the second host;
if a first target row with the mounting point field completely matched with the target unloading position exists, extracting mounting equipment and a mounting source from the first target row;
traversing each row of each piece of mounting information again;
and if a second target row which is consistent with the mounting equipment in the first target row and the mounting source is a target mounting source exists, splicing the mounting point field in the second target row with the mounting source to obtain a second source catalog mounted on the target unloading position.
7. The method of claim 1, wherein after offloading the second source directory mounted on the target offload location, the method further comprises:
acquiring a second hidden file from a previous-level directory of the second source directory;
and if the user-defined parameters carried by the preset uninstallation command have parameters of a second preset character, deleting the second hidden file and the second source directory from the second host.
8. A data processing system for use in a container cluster management system, said system comprising:
the system comprises a replacement unit, a storage unit and a storage unit, wherein the replacement unit is used for replacing a placeholder in a host directory name in a custom parameter with a preset actual value to obtain a first source directory when a preset mounting command is received, wherein the preset mounting command carries the custom parameter and a target mounting position which are configured in a target Pod in advance, and the preset actual value is generated when the target Pod is created by using the container cluster management system;
the first creating unit is configured to create, on a first host, the first source directory and the target mounting position if the first source directory does not exist on the first host and the target mounting position does not exist on the first host, where the first host is a host corresponding to the host directory name;
The mounting unit is used for mounting the first source catalog on the first host to the target mounting position on the first host and mapping the target mounting position on which the first source catalog is mounted to the target Pod;
the device comprises a reading unit, a target unloading unit and a loading unit, wherein the reading unit is used for reading a plurality of pieces of mounting information from a preset catalog when a preset unloading command is received and a target unloading position exists on a second host, the second preset command carries a second host name and the target unloading position, and the second host is a host corresponding to the second host name;
and the unloading unit is used for determining a second source catalog mounted on the target unloading position according to the plurality of pieces of mounting information, unloading the second source catalog mounted on the target unloading position, and deleting the target unloading position from the second host.
9. An electronic device, comprising: the device comprises a processor and a memory, wherein the processor and the memory are connected through a communication bus; the processor is used for calling and executing the program stored in the memory; the memory for storing a program for implementing the data processing method according to any one of claims 1 to 7.
10. A computer readable storage medium having stored therein computer executable instructions for performing the data processing method of any one of claims 1-7.
CN202110260790.7A 2021-03-10 2021-03-10 Data processing method, system, electronic equipment and storage medium Active CN112965761B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110260790.7A CN112965761B (en) 2021-03-10 2021-03-10 Data processing method, system, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110260790.7A CN112965761B (en) 2021-03-10 2021-03-10 Data processing method, system, electronic equipment and storage medium

Publications (2)

Publication Number Publication Date
CN112965761A CN112965761A (en) 2021-06-15
CN112965761B true CN112965761B (en) 2023-10-10

Family

ID=76277252

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110260790.7A Active CN112965761B (en) 2021-03-10 2021-03-10 Data processing method, system, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN112965761B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113467895B (en) * 2021-07-19 2024-04-09 中科曙光国际信息产业有限公司 Docker operation method, docker operation device, server and storage medium
CN114064594B (en) * 2021-11-22 2023-09-22 马上消费金融股份有限公司 Data processing method and device
CN115629772B (en) * 2022-09-05 2023-09-19 摩尔线程智能科技(北京)有限责任公司 Kubernetes software installation method and device and electronic equipment

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2014039919A1 (en) * 2012-09-07 2014-03-13 Oracle International Corporation Ldap-based multi-customer in-cloud identity management system
CN110888852A (en) * 2019-11-11 2020-03-17 北京宝兰德软件股份有限公司 Method and device for mounting host machine catalog in container environment
CN111966465A (en) * 2020-08-21 2020-11-20 苏州浪潮智能科技有限公司 Method, system, equipment and medium for modifying configuration parameters of host machine in real time

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8429630B2 (en) * 2005-09-15 2013-04-23 Ca, Inc. Globally distributed utility computing cloud
US11461122B2 (en) * 2019-07-31 2022-10-04 Rubrik, Inc. Streaming database cloning using cluster live mounts
US11513917B2 (en) * 2019-07-31 2022-11-29 Rubrik, Inc. Streaming database recovery using cluster live mounts

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2014039919A1 (en) * 2012-09-07 2014-03-13 Oracle International Corporation Ldap-based multi-customer in-cloud identity management system
CN110888852A (en) * 2019-11-11 2020-03-17 北京宝兰德软件股份有限公司 Method and device for mounting host machine catalog in container environment
CN111966465A (en) * 2020-08-21 2020-11-20 苏州浪潮智能科技有限公司 Method, system, equipment and medium for modifying configuration parameters of host machine in real time

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
翟雅荣 ; 于金刚 ; .基于Filebeat自动收集Kubernetes日志的分析系统.计算机系统应用.2018,(第09期),全文. *

Also Published As

Publication number Publication date
CN112965761A (en) 2021-06-15

Similar Documents

Publication Publication Date Title
CN112965761B (en) Data processing method, system, electronic equipment and storage medium
CN110851139B (en) Method and device for checking codes and electronic equipment
CN112395253B (en) Index file generation method, terminal device, electronic device and medium
CN110851204B (en) Application starting method and device and application packaging method and device
CN111309304B (en) Method, device, medium and electronic equipment for generating IDL file
CN111198777A (en) Data processing method, device, terminal and storage medium
CN110489162B (en) Method, device, medium and equipment for simplifying installation package SO (storage and retrieval) file
CN113407165B (en) SDK generation and self-upgrade method, device, readable medium and equipment
CN112965713B (en) Development method, device, equipment and storage medium of visual editor
CN110888773B (en) Method, device, medium and electronic equipment for acquiring thread identification
CN116679930A (en) Front-end project construction method and device, electronic equipment and storage medium
CN116049142A (en) Data processing method, device, electronic equipment and storage medium
CN111625232B (en) Method and device for generating application program installation package, readable medium and electronic equipment
CN111240738B (en) File processing method, device, equipment and medium
CN116360802A (en) Middleware processing method, middleware processing device, electronic equipment and storage medium
CN111241852A (en) File translation method, device, terminal and storage medium
CN111240657A (en) Method and device for generating SDK and electronic equipment
CN117389690B (en) Mirror image package construction method, device, equipment and storage medium
CN117112500B (en) Resource management method, device, equipment and storage medium
CN114297157B (en) File processing method, device, equipment and medium
CN113448550B (en) Method and device for realizing collection management of classes, electronic equipment and computer medium
CN114047922B (en) Transcoding method, device, medium and equipment for precompiled device
CN117369952B (en) Cluster processing method, device, equipment and storage medium
CN116257501A (en) Data processing method, device, electronic equipment and storage medium
CN118132203A (en) Container management method, device, equipment and medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant