This application is based upon and claims the benefit of priority of the prior Japanese Patent Application No. 2017-70491, filed on Mar. 31, 2017, the entire contents of which are incorporated herein by reference.
The embodiment discussed herein is related to a container registration device and a container registration method therefor.
For example, a business operator providing a service to a user (hereinafter, also referred to as a business operator, simply) establishes a business system for performing provision of a service (hereinafter, also referred to as an information processing system) and operates the business system. Specifically, when establishing the business system, the business operator uses a container-based virtualization technique being a technique for effectively performing provision of a service, for example.
A container-based virtualization technique is a technique with which a container which is an environment isolated from a server (hereinafter, also referred to as a host) is generated on the server. Specifically, with a container-based virtualization technique, when generation of a container is performed, unlike with a hypervisor-based virtualization technique, generation of a guest operating system (OS) does not have to be performed. For this reason, a business system using a container-based virtualization technique has an advantage that, compared with a business system using a hypervisor-based virtualization technique, an overhead for generation of a container is smaller (see Japanese National Publication of International Patent Application No. 2015-524596, for example).
According to an aspect of the invention, when a container generated on a server is started up, an apparatus generates related information indicating that the container has been generated on the server while referring to environmental information of the server that is stored on the server. When causing a file system that retains topology information indicating connection relationship among a plurality of servers and network devices to perform registration processing of the container, the apparatus causes the topology information to be updated to include connection relationship between the container that has been generated based on the related information and the server.
The object and advantages of the invention will be realized and attained by means of the elements and combinations particularly pointed out in the claims.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory and are not restrictive of the invention, as claimed.
In a file system that transversely manages pieces of data in containers, for example, when a copy of data in one container (hereinafter, also referred to as copied data) is generated, the copied data is preferably stored in a container generated in a different server from the server on which the container is generated. With this, even when a failure of a device or the like disables access to a server, the file system is able to access targeted data.
However, a container generated by a container-based virtualization technique is similar to a virtual machine by a hypervisor-based virtualization technique in that the container functions as a different environment from a server. For this reason, various functions of the file system operated in each container are not able to acquire information on the server on which the container is generated, in some cases. With this, in the file system, copied data for data in one container may be generated in the same server, whereby data copy with the redundancy secured is disabled in some cases.
It is preferable to enable data copy with the redundancy secured.
[Configuration of Information Processing System]
Firstly, a configuration of an information processing system 100 will be explained.
The server 1a is a physical machine in which a container (hereinafter, also referred to as a registration device) being an environment isolated from the server 1a is generated. Specifically, the server 1a illustrated in
Furthermore, in the containers 11a, 12a, and 13a illustrated in
It is to be noted that hereinafter, each container generated on the servers 1a, 1b, and 1c (container 11a, for example) is also referred to as a container 10, collectively. Furthermore, each data processing unit operated on the servers 1a, 1b, and 1c (the data processing unit 21a, for example) is also referred to as a data processing unit 20, collectively. Furthermore, each information storage region mounted by each container 10 (information storage region 31a, for example) is also referred to as an information storage region 30, collectively. Further, “units” referred to in the specification may be implemented using a processor.
The management device 2 is operated by a data management unit 50 composing the file system. That is to say, the file system operated in the information processing system 100 illustrated in
The data management unit 50 performs central management of the information storage region 30 storing data processed by the data processing unit 20 operated on the servers 1a, 1b, and 1c, for example. Specifically, the data management unit 50, in the example illustrated in
It is to be noted that the file system composed by the data processing unit 20 and the data management unit 50 may be, for example a Hadoop Distributed File System (HDFS) by Hadoop® being a middleware that performs parallel distributed processing with a large amount of data arranged to be distributed into a plurality of machines, for example. In this case, the data processing unit 20 corresponds to a slave node in the HDFS and the data management unit 50 corresponds to a master node in the HDFS.
In the file system explained with reference to
However, the container 10 generated by a container-based virtualization technique is similar to a virtual machine by a hypervisor-based virtualization technique in that the container 10 functions as a different environment from the server 1. For this reason, various functions of the file system operated in each container 10 are not able to acquire information on the server 1 on which that container 10 is generated, in some cases. With this, in the file system, copied data of data in one of the container 10 may be generated in a container 10 on the same server 1, whereby data copy with the redundancy secured is disabled in some cases.
In view of this, each container 10 according to the present embodiment refers to environmental information stored on the server 1 to generate information indicating that the container 10 has been generated on the server 1 (hereinafter, also referred to as related information) when the container 10 performs startup of the subject container 10. Thereafter, when causing the file system that retains information indicating connection relationship among a plurality of servers and network devices (hereinafter, also referred to as topology information) to perform registration processing of the subject container 10, the container 10 updates (generates) topology information to include connection relationship between the container 10 that has been generated based on the related information and the server 1 and causes the file system to retain the topology information.
That is to say, each server 1 enables the environmental information that identifies the subject server 1 to be referred by the container 10 generated on the subject server 1 in advance. Thereafter, when the container 10 performs startup of the subject container 10, each container 10 registers to the file system information including the information that identifies the subject container 10 and the information that identifies the server 1 on which the subject container 10 has been generated.
With this configuration, even when not having information of the server 1 on which the container 10 has been generated, the file system (data management unit 50) is able to register the information of the server 1 and the information of the container 10 generated on that server 1 in a manner associated with each other. This enables the file system to inhibit copied data of data in each container 10 from being generated in any container 10 on the same server 1.
Although a case where the data management unit 50 performs an operation in the management device 2 will be explained below, the data management unit 50 may perform an operation in any of the container 10 generated on the server 1.
[Hardware Configuration of Information Processing System]
Next, a hardware configuration of the server 1 will be explained.
The server 1 includes a CPU 101 being a processor, a memory 102, an external interface (I/O unit) 103, and a recording medium 104. The above-described units are connected among each other via a bus 105.
The recording medium 104 records a program 110 for performing processing of registering information of the container 10 that has been started up (hereinafter, also referred to as registration processing) in a program storage region (not illustrated) within the recording medium 104, for example. Furthermore, the recording medium 104 includes an information storage region 130 (hereinafter, also referred to as a storage unit 130) and an information storage region 140 (hereinafter, also referred to as a storage unit 140) that store information used when the registration processing is performed, for example.
The CPU 101 loads the program 110 into the memory 102 from the recording medium 104 when the program 110 is executed and performs the registration processing in cooperation with the program 110. Furthermore, the external interface 103 performs communication with the management device 2, for example.
Next, a hardware configuration of the management device 2 will be explained.
The management device 2 includes a CPU 201 being a processor, a memory 202, an external interface (I/O unit) 203, and a recording medium 204. The above-described units are connected among each other via a bus 205.
The recording medium 204 records a program 210 for performing the registration processing in a program storage region (not illustrated) within the recording medium 204, for example. Furthermore, the recording medium 204 includes an information storage region 230 (hereinafter, also referred to as a storage unit 230) that stores information used when the registration processing is performed, for example.
The CPU 201 loads the program 210 into the memory 202 from the recording medium 204 when the program 210 is executed and performs the registration processing in cooperation with the program 210. Furthermore, the external interface 203 performs communication with the server 1, for example.
[Function of Information Processing System]
Next, a function of the information processing system 100 will be explained.
Firstly, the functional block diagram of the server 1 will be explained. The CPU 101 of the server 1 cooperates with the program 110 and thereby operates as a function of the server 1 itself, for example, as an information receiving unit 111, an information management unit 112, a timing determination unit 113, and a start instruction transmitting unit 114. Furthermore, in the information storage region 130, environmental information 131 and positional information 132 are stored, for example.
The information receiving unit 111 receives the environmental information 131 transmitted by a business operator via an operation terminal (not illustrated), for example. The environmental information 131 is information including identification information that identifies the subject server 1, for example. Furthermore, the information receiving unit 111 receives the positional information 132 transmitted by the business operator via the operation terminal, for example. The positional information 132 is information indicating a storage position of the environmental information 131 (storage position in the information storage region 130). It is to be noted that when the business operator has input the environmental information 131 or the positional information 132 directly on the server 1, the information receiving unit 111 may receive the input information.
When the information receiving unit 111 has received the environmental information 131, the information management unit 112 stores the received environmental information 131 in the information storage region 130. Furthermore, when the information receiving unit 111 has received the positional information 132, the information management unit 112 stores the received positional information 132 in the information storage region 130.
The timing determination unit 113 determines whether the timing to start up the container 10 has come. Specifically, when the information receiving unit 111 has received from the operation terminal (business operator) information that the container 10 is started up, the timing determination unit 113 determines that the timing to start up the container 10 has come, for example. Furthermore, when the current time reaches a time indicated by container start information (not illustrated) stored in advance in the information storage region 130, the timing determination unit 113 determines that the timing to start up the container 10 has come, for example.
When the timing determination unit 113 has determined that the timing to start up the container 10 has come, the start instruction transmitting unit 114 transmits a start instruction to the container 10. Furthermore, in this case, the start instruction transmitting unit 114 performs transmission of the positional information 132 stored in the information storage region 130 together with the start instruction. It is to be noted that when the business operator has performed an input for starting up the container 10 via the operation terminal, the start instruction transmitting unit 114 may perform transmission of the start instruction to the container 10.
Next, the functional block diagram of the container 10 generated on the server 1 will be explained. The CPU 101 of the server 1 cooperates with the program 110 and thereby operates as a function of the container 10, for example, as a start instruction receiving unit 121, an information management unit 122, a container starting unit 123, a related information generation unit 124 (hereinafter, also referred to as an information generation unit 124), a related information transmitting unit 125 (hereinafter, also referred to as a registration instruction unit 125), a copy instruction receiving unit 126, and a data processing unit 127. Furthermore, in the information storage region 140, data 141, copied data 142, related information 143, and the positional information 132 are stored, for example.
The start instruction receiving unit 121 receives the start instruction and the positional information 132 transmitted by the start instruction transmitting unit 114. When the start instruction receiving unit 121 has received the positional information 132, the information management unit 122 stores the received positional information 132 in the information storage region 140. Furthermore, the container starting unit 123 starts up the container 10 whose information is included in the start instruction in response to the start instruction receiving unit 121 having received the start instruction.
The related information generation unit 124 refers to the positional information 132 stored in the information storage region 140 and identifies the storage position of the environmental information 131 in the information storage region 130 on the server 1. The related information generation unit 124 then accesses the identified storage position to acquire the environmental information 131. Furthermore, the related information generation unit 124 refers to the acquired environmental information 131 and generates the related information 143 indicating that the container 10 has been generated on the server 1. Specifically, the related information generation unit 124 generates the related information 143 to include the identification information of the server 1 that is included in the acquired environmental information 131 and the identification information of the container 10 that has been started up by the container starting unit 123. Thereafter, the information management unit 122 stores the related information 143 generated by the related information generation unit 124 in the information storage region 140.
The related information transmitting unit 125 transmits the related information 143 stored in the information storage region 140 to the management device 2.
The copy instruction receiving unit 126 receives an instruction to generate the copied data 142 of the data 141 stored in other container 10 from the management device 2 (hereinafter, also referred to as a copy instruction).
When there is a request for processing with respect to the data 141 stored in the information storage region 140 (for example, a request for writing or reading), the data processing unit 127 performs processing for the request for processing. The data 141 is data to be referred to when the business system established in the container 10 is operated, for example.
Furthermore, when the copy instruction receiving unit 126 has received the copy instruction of the data 141, the data processing unit 127 generates the copied data 142 of the data 141 stored in other container 10 and stores the generated copied data 142 in the information storage region 140 of the subject container 10.
Next, the functional block diagram of the management device 2 will be explained. The CPU 201 of the management device 2 cooperates with the program 210 and thereby operates, for example, as a related information receiving unit 211, an information generation unit 212, a data management unit 213, and a copy instruction transmitting unit 214. Furthermore, in the information storage region 230, topology information 231 is stored, for example.
The related information receiving unit 211 receives the related information 143 transmitted by the related information transmitting unit 125. When the related information receiving unit 211 has received the related information 143, the information generation unit 212 generates (updates) the topology information 231 based on the contents of the received related information 143. The topology information 231 is information associating the identification information of each server and the identification information of each container generated on the server. That is to say, the information generation unit 212 in this case generates (updates) the topology information 231 to include information associating the identification information of the server 1 and the identification information of the container 10 generated on the server 1.
The data management unit 213 determines whether the data 141 stored in the information storage region 140 in the container 10 is to be copied. Specifically, in the data 141 stored in the information storage region 140 of the container 10, when the data 141 whose copied data 142 has not been generated in the information storage region 140 of other container 10 is present, the data management unit 213 determines that the copied data 142 of the present data 141 is to be generated.
Thereafter, when the data management unit 213 generates the copied data 142, the data management unit 213 determines whether any other server 1 is present that is other than the server 1, on which the container 10 storing the data 141 targeted for generation of the copied data 142 has been generated. Upon determining that the other server 1 is present as a result, the data management unit 213 decides to generate the copied data 142 in the information storage region 140 of the container 10 generated on the other server 1. It is to be noted that the data management unit 213 corresponds to the data management unit 50 explained with reference to
The copy instruction transmitting unit 214 transmits the copy instruction of the data 141 to the container 10 decided by the data management unit 213.
Next, an outline of a first embodiment will be explained.
The container 10 waits until startup of the subject container 10 is started, as illustrated in
Thereafter, when the startup of the subject container 10 is started (YES at S1), the container 10 refers to the environmental information 131 stored on the server 1 as illustrated in
Thereafter, when the container 10 causes the management device 2 (file system) retaining the topology information 231 indicating connection relationship among a plurality of servers and network devices to perform the registration processing of the subject container 10, the container 10 causes the topology information 231 to be updated (generated) to include connection relationship between the container 10 that has been generated based on the related information 143 generated in the processing at S2 and server 1, as illustrated in
That is to say, each server 1 enables the environmental information 131 that identifies the subject server 1 to be referred by the container 10 generated on the subject server 1 in advance. Thereafter, when the container 10 performs startup of the subject container 10, each container 10 registers to the file system information including the information that identifies the subject container 10 and the information that identifies the server 1 on which the subject container 10 has been generated.
With this configuration, even when not having information of the server 1 on which the container 10 has been generated, the management device 2 (file system) is able to associate the information of the server 1 and the information of the container 10 generated on that server 1. This enables the file system to inhibit the copied data 142 of the data 141 in each container 10 from being generated in any container 10 on the same server 1.
When the file system explained with reference to
[Function of Rack Awareness]
In this case, when a master node (not illustrated) in the HDFS performs registration of information indicating a slave node (server), the master node registers information indicating each server and information indicating a switch connected to the server (switch connected by the rack containing the server) in an associated manner. Specifically, when the master node performs registration of information indicating the server A1, the master node registers information associating the information indicating the server A1 and information indicating the switch B connected by the rack A containing the server A1 (for example, switch B/server A1), for example.
Thereafter, for example, when generating the copied data of the data stored on the server A1, the master node refers to the information indicating the registered slave node to identify a container other than the container registered in association with the switch B (for example, the server E3 connected to the switch D). The master node then stores the copied data of the data stored in the container 11a in the identified container.
With this configuration, the master node is able to inhibit generation of inaccessible data even when any of the switches B, C, and D has a failure.
By contrast, in the information processing system 100 in the present embodiment, the function of Rack Awareness is used in a relationship among the switches, the servers, and the containers. A use method of the function of Rack Awareness in the present embodiment will be explained below.
[Use Method of Function of Rack Awareness in Present Embodiment]
In this case, when the master node performs registration of information indicating the slave node (container), the master node registers the information indicating each container, information indicating the server on which the container is generated, and information indicating the switch connected by the server (switch connected by the rack containing the server) in an associated manner. Specifically, when the master node performs registration of information indicating the container 11a, the master node registers information associating the information indicating the container 11a, information indicating the server 1a on which the container 11a is generated, and information indicating the switch B connected by the rack containing the server 1a (for example, switch B/server 1a/container 11a), for example.
That is to say, the master node in the present embodiment uses the function of Rack Awareness after registering information combining the information indicating the server on which the container is generated and the information indicating the switch connected by the server (for example, switch B/server 1a) as information indicating the switch in the example explained in
Thereafter, for example, when generating the copied data of the data stored in the container 11a, the master node refers to the information indicating the registered slave node to identify a container other than the container registered in association with the switch B and the server 1a (for example, the container 13e generated on the server 1e). The master node then generates the copied data of the data stored in the container 11a in the identified container.
With this configuration, the information processing system 100 uses only an existing function of the HDFS (Hadoop®) and thereby is able to inhibit the copied data of the data in each container 10 from being generated in any container 10 generated on the same server 1, without a new function mounted to the HDFS (Hadoop®).
Next, details of the first embodiment will be explained.
[Registration Processing Performed on Server]
Firstly, the registration processing performed on the server 1 itself will be explained. The information receiving unit 111 of the server 1 waits until receiving various types of information as illustrated in
When the information receiving unit 111 has received the environmental information 131 (YES at S11, YES at S12), the information management unit 112 of the server 1 stores the environmental information 131 received in the processing at S11 in the information storage region 130 (S13). Furthermore, when the information receiving unit 111 has received the positional information 132 (YES at S11, NO at S12), the information management unit 112 stores the positional information 132 received in the processing at S11 in the information storage region 130 (S14). Thereafter, the information receiving unit 111 waits until receiving the next information (NO at S11).
Furthermore, the timing determination unit 113 of the server 1 waits for the timing to start up the container as illustrated in
When the timing to start up the container has come (YES at S21), the start instruction transmitting unit 114 of the server 1 transmits a start instruction of the container 10 to the container 10 to be started up together with the positional information 132 stored in the information storage region 130 (S22). Thereafter, the timing determination unit 113 waits until the next timing to start up the container (NO at S21).
With this configuration, the container 10 to be started up is able to acquire the environmental information 131 stored on the server 1, as described later.
[Registration Processing Performed in Container (1)]
Next, processing performed when the container 10 is started up out of the registration processing performed in the container 10 will be explained.
The start instruction receiving unit 121 of the container 10 that is stopped waits until receiving the start instruction and the positional information 132 from the server 1 as illustrated in
Thereafter, the related information generation unit 124 of the container 10 refers to the positional information 132 received in the processing at S31 to acquire (refer to) the environmental information 131 stored in the information storage region 130 of the server 1 (S33). The related information generation unit 124 then generates the related information 143 including the identification information of the server 1 included in the environmental information 131 that has been acquired in the processing at S33 and the identification information of the subject container 10 (S34). A specific example of the environmental information 131 and the related information 143 will be explained below.
[Specific Example of Environmental Information and Related Information]
The environmental information 131 illustrated in
The related information 143 illustrated in
That is to say, in the processing at S34, the related information generation unit 124 generates not only the identification information of the subject container 10 but also the related information 143 including the identification information of the server 1a included in the environmental information 131 acquired in the processing at S33 and the identification information of the switch connected to the server 1a (switch connected to the rack containing the server 1a).
With this configuration, the management device 2 (file system) is able to inhibit the copied data 142 of the data 141 in each container 10 from being generated in any container 10 generated on the same server 1, as described later.
Back to
[Registration Processing Performed in Management Device (1)]
Next, out of the registration processing performed in the management device 2, processing performed when the startup of the container 10 is performed will be explained.
The related information receiving unit 211 of the management device 2 waits until receiving the related information 143 transmitted from the container 10 that has been started up, as illustrated in
Thereafter, the related information receiving unit 211 waits until receiving the next related information 143 (NO at S41). A specific example of the topology information 231 will be explained below.
[Specific Example of Topology Information]
The topology information 231 illustrated in
Specifically, in the example illustrated in
Furthermore, in the example illustrated in
Furthermore, for example, as illustrated in
Specifically, the related information receiving unit 211 in this case receives the related information 143 associating information indicating the container 13a, information indicating the server 1a, and information indicating the switch B from the container 13a. Accordingly, the information generation unit 212 in this case adds information in which the “switch B” is set to the “switch”, the “server ha” is set to the “server”, and the “container 13a” is set to the “container” (information in which the “item number” is “13”), as indicated by underlines in
With this configuration, the management device 2 is able to refer to the topology information 231 on which the latest condition of the container 10 generated on the server 1 is reflected, as described later.
[Registration Processing Performed in Management Device (2)]
Next, out of the registration processing performed in the management device 2, processing performed when the copied data 142 of the data 141 stored in the container 10 is generated will be explained.
The data management unit 213 of the management device 2 waits for the timing to copy the data, as illustrated in
When the timing to copy the data has come (YES at S51), the data management unit 213 refers to the topology information 231 stored in the information storage region 230 to identify the container 10 corresponding to a combination other than the combination of the server 1 and the switch corresponding to the container 10 storing the copy target data 141 (S52).
Specifically, in the example illustrated in
Thereafter, the copy instruction transmitting unit 214 of the management device 2 transmits a copy instruction of the data 141 to the container 10 identified in the processing at S52 (S53). Thereafter, the data management unit 213 waits for the next timing to copy the data (NO at S51).
[Registration Processing Performed in Container (2)]
Next, out of the registration processing performed in the container 10, processing performed when the copied data 142 of the data 141 stored in the container 10 is generated will be explained.
The copy instruction receiving unit 126 of the container 10 waits until receiving the copy instruction of the data 141 transmitted by the management device 2 as illustrated in
Referring again to
With this configuration, the management device 2 (file system) is able to inhibit the copied data 142 of the data 141 in each container 10 from being generated in any container 10 generated on the same server 1 when causing the copied data 142 to be stored in each container 10.
As described above, in the present embodiment, when the startup of the subject container 10 is performed, the container 10 refers to the environmental information 131 stored on the server 1 and causes the file system to generate the topology information 231 including the information indicating that the container 10 has been generated on the server 1, thereby performing registration of the subject container 10 in the file system.
That is to say, each server 1 enables the environmental information 131 that identifies the subject server 1 to be referred by each container 10 generated on the subject server 1 in advance. Thereafter, when the container 10 performs startup of the subject container 10, each container 10 registers to the file system information including the information that identifies the subject container 10 and the information that identifies the server 1 on which the subject container 10 has been generated.
With this configuration, even when not having information of the server 1 on which the container 10 has been generated, the management device 2 (file system) is able to associate the information of the server 1 and the information of the container 10 generated on that server 1. This enables the file system to inhibit the copied data 142 of the data 141 in each container 10 from being generated in any container 10 on the same server 1.
All examples and conditional language recited herein are intended for pedagogical purposes to aid the reader in understanding the invention and the concepts contributed by the inventor to furthering the art, and are to be construed as being without limitation to such specifically recited examples and conditions, nor does the organization of such examples in the specification relate to a showing of the superiority and inferiority of the invention. Although the embodiment of the present invention has been described in detail, it should be understood that the various changes, substitutions, and alterations could be made hereto without departing from the spirit and scope of the invention.
Number | Date | Country | Kind |
---|---|---|---|
2017-070491 | Mar 2017 | JP | national |