Rolling upgrade of a distributed application
AssigneeInternational Business Machines Corporation
InventorsWarren P. Acker, Steven G. Halverson, Schuman M. Shao, Michael J. E. Spicer
Life of this patent
Estimating the term…
Abstract
Embodiments presented herein describe techniques for performing a rolling upgrade to a distributed runtime environment that includes a cluster of computing systems. A first of a plurality of computing nodes executing a first version of a runtime environment determines a second version of the runtime environment via a registry. Upon determining that the second version is a more recent version, the first computing node retrieves an install package for the second version from a second one of the computing nodes. The first computing node installs the second version using the install package.
Claims11
A computer program product, comprising:
- a computer-readable storage medium having computer-readable program code embodied therewith, the computer-readable program code configured to perform an operation comprising:
- upon receiving a stop command at a first node of a plurality of nodes executing a runtime environment, suspending the runtime environment on the first node, wherein the stop command is received from a master node of the plurality of nodes;
- upon receiving a restart command from the master node, restarting the runtime environment on the first node, wherein subsequent to transmitting the stop command and prior to transmitting the restart commend, the master node is upgraded by an administrator;
- upon restarting the runtime environment on the first node, determining, by the first node, a second version of the runtime environment via a registry maintained by a configuration server;
- upon determining, by the first node, that the second version is a more recent version than the first version, automatically:
- transmitting, by the first node, to the configuration server, a request for a list of nodes of the plurality of computing nodes that are executing the second version of the runtime environment and are able to provide an install package for the second version, wherein the registry maintains records indicating which install packages are available on each of the plurality of computing nodes;
- receiving, by the first node, from the configuration server, the list of nodes that are executing the second version and have the install package for the second version, wherein the list of nodes includes at least a second node and a third node of the plurality of nodes, and does not include the configuration server;
- requesting, by the first node, the install package for the second version from the second node, wherein the second node was randomly selected from the list of nodes by the first node;
- receiving, by the first node, from the second node, the requested install package for the second version;
- and
- installing the second version on the first node using the install package;
- upon successfully installing the second version on the first node, restarting the runtime environment on the first node for a second time;
- upon restarting for the second time, advertising, by the first node, to the configuration server, an indication that the first node is executing the second version of the runtime environment and that the install package for the second version is available for download from the first node, wherein, responsive to the advertising, the configuration server updates the registry by adding the first node to the list of nodes that are available to provide the second version of the runtime environment;
- advertising, to the configuration server, availability of a down-level version of the runtime environment on the first node;
- receiving, at the first node, from a fourth node of the plurality of computing nodes, a request to obtain the install package for the second version of the runtime environment, wherein the fourth node transmitted the request responsive to receiving an indication of the first node from the configuration server;
- sending, by the first node, the install package of the second version to the fourth node;
- receiving a request from a fifth node of the plurality of computing nodes to obtain the install package for the second version of the runtime environment;
- and
- upon determining that the first node is not available to transmit the install package, refraining from sending the install package of the second version to the fifth node.
A system, comprising:
- a processor;
- and
- a memory storing a program, which, when executed on the processor, performs an operation comprising:
- upon receiving a stop command at a first node of a plurality of nodes executing a runtime environment, suspending the runtime environment on the first node, wherein the stop command is received from a master node of the plurality of nodes;
- upon receiving a restart command from the master node, restarting the runtime environment on the first node, wherein subsequent to transmitting the stop command and prior to transmitting the restart commend, the master node is upgraded by an administrator;
- upon restarting the runtime environment on the first node, determining, by the first node, a second version of the runtime environment via a registry maintained by a configuration server;
- upon determining, by the first node, that the second version is a more recent version than the first version, automatically:
- transmitting, by the first node, to the configuration server, a request for a list of nodes of the plurality of computing nodes that are executing the second version of the runtime environment and are able to provide an install package for the second version, wherein the registry maintains records indicating which install packages are available on each of the plurality of computing nodes;
- receiving, by the first node, from the configuration server, the list of nodes that are executing the second version and have the install package for the second version, wherein the list of nodes includes at least a second node and a third node of the plurality of nodes, and does not include the configuration server;
- requesting, by the first node, the install package for the second version from the second node, wherein the second node was randomly selected from the list of nodes by the first node;
- receiving, by the first node, from the second node, the install package for the second version;
- and
- installing the second version on the first node using the install package;
- upon successfully installing the second version on the first node, restarting the runtime environment on the first node for a second time;
- upon restarting for the second time, advertising, by the first node, to the configuration server, an indication that the first node is executing the second version of the runtime environment and that the install package for the second version is available for download from the first node, wherein, responsive to the advertising, the configuration server updates the registry by adding the first node to the list of nodes that are available to provide the second version of the runtime environment;
- advertising, to the configuration server, availability of a down-level version of the runtime environment on the first node;
- receiving, at the first node, from a fourth node of the plurality of computing nodes, a request to obtain the install package for the second version of the runtime environment, wherein the fourth node transmitted the request responsive to receiving an indication of the first node from the configuration server;
- sending, by the first node, the install package of the second version to the fourth node;
- receiving a request from a fifth node of the plurality of computing nodes to obtain the install package for the second version of the runtime environment;
- and
- upon determining that the first node is not available to transmit the install package, refraining from sending the install package of the second version to the fifth node.
Dependencies are inferred from the claim text.