Updating dependent services
AssigneeMicrosoft Technology Licensing, LLC
InventorsShailesh Nikam, YenPing Yu, Zhonghua Chu, Satish Thomas
Life of this patent
Estimating the term…
Abstract
An update system is provided that performs a stop of that service at each machine that hosts that service such that a service that is dependent on another service stops before that other service starts performing a stop. After a machine hosting a service stops, the update system performs an update of that service on that machine. The update system then performs a start of that service at each machine that hosts that service such than a service that another service depends on starts before that other service starts performing a start.
Claims15
A method performed by a computing system, the method comprising:
- generating a service list based on a topological sort of a service dependency graph having a plurality of vertices and a plurality of directed edges, each vertex of the plurality of vertices representing a service of a plurality of services hosted by a plurality of machines, each directed edge of the plurality of directed edges connecting a from-vertex of a pair of vertices to a to-vertex of the pair of vertices, and each directed edge of the plurality of directed edges representing a service dependency between a pair of services represented by the pair of vertices, the topological sort ordering the plurality of services from least dependent services to most dependent services, the service list being a linearly ordered listing of the plurality of services represented by the plurality of vertices such that for each pair of vertices connected by a directed edge of the service dependency graph, a first service represented by the to-vertex of the pair of vertices is listed in the linear ordering before a second service represented by the from-vertex of the pair of vertices;
- generating an update runbook with steps for updating the services, an order of the steps being based on the service list, each step indicating a target service, a machine that hosts that target service, and an action, the actions being stop, update, and start, wherein the update runbook includes a step with a stop action and a step with a start action for each service on each machine affected by an update and a step with an update action for each service on each machine to be updated, the order of steps being such that each service is stopped in an order from the most dependent service to the least dependent service and started in an order from the least dependent service to the most dependent service;
- and
- executing the update runbook by:
- for each step with a stop action, performing a stop of the target service at the machine that hosts the target service such that each service that is dependent on the target service stops before that target service starts performing a stop;
- for each step with an update action, after the target service stops at the machine that hosts the target service, performing an update of that target service at the machine that hosts the service;
- and
- for each step with a stop action, performing a start of the target service at each machine that hosts the target service such that each service affected by an update that that target service depends on stops and then starts before that target service starts performing a start
- wherein a service is affected by an update if that service is being updated or depends on a service that is affected by an update.
A computing system comprising:
- one or more computer-readable storage media storing a service dependency graph having a plurality of vertices and a plurality of directed edges, each vertex of the plurality of vertices representing a service of a plurality of services hosted by a plurality of machines, each directed edge of the plurality of directed edges connecting a from-vertex of a pair of vertices to a to-vertex of the pair of vertices, and each directed edge of the plurality of directed edges representing a service dependency between a pair of services represented by the pair of vertices;
- a service topology indicating mappings of services to machines that host the services;
- and
- computer-executable instructions for controlling a computing system to:
- generate a service list based on a topological sort of the service dependency graph, the topological sort ordering the plurality of services from the least dependent services to the most dependent services, and the service list being a linearly ordered listing of the plurality of services represented by the plurality of vertices such that for each pair of vertices connected by a directed edge of the service dependency graph, a first service represented by the to-vertex of the pair of vertices is listed in the linear ordering before a second service represented by the from-vertex of the pair of vertices;
- for each service affected by the update of a target service from the plurality of services, the target service being hosted by a target machine, add to an update runbook a stop step for that affected service for each machine that hosts that affected service based on the service list, such that a stop step for an affected service that is dependent on another affected service is indicated to stop before that other affected service starts performing a stop;
- add to the update runbook an update step for the target service at the target machine wherein the update step is to be executed after the target service stops at the target machine;
- and
- for each service affected by the update of the target service, add to the update runbook a start step for that affected service for each machine that hosts that affected service, based on the topological sort of the service dependency graph, such that a start step for an affected service that is dependent on another affected service is indicated to start after that other affected service starts and after the target service is updated;
- and a processor for executing the computer-executable instructions stored in the one or more computer-readable storage media;
- wherein the stop steps for the affected services are added in reverse order of the topological sort and the start steps for the affected services are added in order of the topological sort.
A computer-readable storage medium storing a service list and a runbook, the runbook specifying steps for performing an update of a target service of a plurality of services, the target service being hosted by a target machine,
- the service list being based on a topological sort of a service dependency graph having a plurality of vertices and a plurality of directed edges, each vertex of the plurality of vertices representing a service of a plurality of services hosted by a plurality of machines, each directed edge of the plurality of directed edges connecting a from-vertex of a pair of vertices to a to-vertex of the pair of vertices, and each directed edge of the plurality of directed edges representing a service between a pair of services represented by the pair of vertices, the topological sort ordering the plurality of services from least dependent services to most dependent services, the service list being a linearly ordered listing of the plurality of services represented by the plurality of vertices such that for each pair of vertices connected by a directed edge of the service dependency graph, a first service represented by the to-vertex of the pair of vertices is listed in the linear ordering before a second service represented by the from-vertex of the pair of vertices,
- generating an update runbook with steps for updating the services, an order of the steps being based on the service list, each step indicating a target service, a machine that hosts that target service, and an action, where the order of steps being such that each service is stopped in an order from the most dependent service to the least dependent service and started in an order from the least dependent service to the most dependent service;
- and
- the runbook comprising:
- for each service affected by the update of the target service, a stop step for that affected service for each machine that hosts that affected service wherein a stop step for an affected service that is dependent on another affected service is indicated, based on the service list, to stop before that other affected service starts performing a stop;
- an update step for the target service at the target machine wherein the update step is to be executed after the target service stops at the target machine;
- and
- for each service affected by the update of the target service, a start step for that affected service for each machine that hosts that affected service wherein a start step for an affected service that is dependent on another affected service is indicated, based on the service list, to start after that other affected service starts and after the target service is updated.
Dependencies are inferred from the claim text.