Service update method and service update apparatus

By synchronizing file operation information of new and old applications in cloud instances and passing file descriptors using inter-process sockets, service updates can be completed without interrupting services, solving the service interruption problem in existing technologies and improving user experience and update speed.

WO2026158216A1PCT designated stage Publication Date: 2026-07-30HUAWEI TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
HUAWEI TECH CO LTD
Filing Date
2026-01-19
Publication Date
2026-07-30

AI Technical Summary

Technical Problem

The existing service update method requires service interruption, which affects user experience.

Method used

By synchronizing the current file operation information of new and old applications in cloud instances, the new version of the application can take over the service of the old version of the application without interrupting the service. This includes using update service packages to instruct the second application to upgrade or roll back, and using inter-process sockets to pass file descriptors to achieve state synchronization.

Benefits of technology

Service updates were completed without interruption, improving user experience, saving storage resources, and increasing the speed of service updates.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2026073371_30072026_PF_FP_ABST
    Figure CN2026073371_30072026_PF_FP_ABST
Patent Text Reader

Abstract

Disclosed in the embodiments of the present application are a service update method and service update apparatus applied to a cloud instance. A new version of an application can be run in a cloud instance and the running states of new and old applications can be synchronized, such that the new version of the application can take over from an old version of an application to provide a service. In this way, a service update can be completed within the cloud instance without interrupting the service, thereby improving service experience. The method comprises: a cloud instance receiving a service update package from a user while running a first application, then running a second application indicated by the service update package, and closing the first application after synchronizing current file operation information of the first application with current file operation information of the second application.
Need to check novelty before this filing date? Find Prior Art

Description

A service update method and a service update apparatus

[0001] This application claims priority to Chinese Patent Application No. 202510125009.3, filed with the State Intellectual Property Office of China on January 26, 2025, entitled “A Service Update Method and Service Update Apparatus”, the entire contents of which are incorporated herein by reference. Technical Field

[0002] This application relates to the field of cloud computing, and more particularly to a service update method and a service update apparatus. Background Technology

[0003] Containers are a lightweight virtualization technology that uses namespaces and cgroups supported by the Linux kernel to isolate applications and their dependencies in an independent runtime environment, enabling applications to run consistently in any environment.

[0004] One current service update method is roughly as follows: After receiving an application upgrade request, the compute node downloads the upgrade service package image according to the application upgrade request. After the compute node interrupts its service, it uses the upgrade service package image to upgrade the application in the container. The upgraded application can then provide users with the updated service.

[0005] However, the above methods require service interruption, thus affecting the service experience. Summary of the Invention

[0006] This application provides a service update method that enables a new version of an application to run in a cloud instance. After synchronizing the current running status of the old and new applications, the new version of the application can take over the service provided by the original version of the application. The service update can be completed within the cloud instance without interrupting the service, thereby providing a better service experience.

[0007] The first aspect provides a service update method for cloud instances, comprising: when a first application of the cloud instance is running a user's first application, the cloud instance receives an update service package from the user, then runs a second application indicated by the update service package, and after the cloud instance synchronizes the current file operation information of the first application and the current file operation information of the second application, it closes the first application. The update service package is used to indicate the second application that replaces the first application, and the version of the second application is associated with the version of the first application. Both cloud management platforms and cloud instances belong to cloud service systems, and cloud instances include one or more of physical hosts, containers, or virtual machines.

[0008] By implementing this method, the new version of the application can be run in the cloud instance. After synchronizing the current file operation information of the new and old applications, the running status of the new version of the application is synchronized with that of the old version of the application. Without interrupting the service, the new version of the application can take over the service provided by the old version of the application in the cloud instance, thus providing a better service experience when updating the service.

[0009] In one possible implementation, the service update package is used to instruct the second application, which is an upgrade of the first application, to a version higher than that of the first application. This allows for application upgrades without interrupting the service.

[0010] In another possible implementation, the service update package is used to instruct the rollback of the first application to obtain a second application, the version of which is lower than that of the first application. This allows the application rollback to be achieved without interrupting the service.

[0011] In another possible implementation, the cloud instance running the second application indicated by the update service package includes: a second process launching a third process based on the update service package, and the third process running the second application indicated by the update service package. Here, the first application is run by the cloud instance's first process, and the second process is the parent process of the first process. Implemented in this way, the cloud instance can detect whether it has received the update service package through the second process (i.e., the parent process of the first process). If the update service package is received, it can launch a third process to run the second application.

[0012] In another possible implementation, synchronizing the current file operation information of the first application and the second application on the cloud instance includes: the first process sending the current file descriptor of the first application to the third process, and the third process updating the current file descriptor of the second application to the current file descriptor of the first application. This implementation allows for rapid synchronization of the running states of the old and new applications within the cloud instance by passing the current file descriptor.

[0013] In another possible implementation, the first process sends the current file descriptor of the first application to the third process via a socket. Sockets enable efficient transfer of file descriptors between processes.

[0014] In another possible implementation, the service update method of this application further includes: deleting the service package of the first application from the cloud instance. Since the first application has ended and its service package is no longer needed, deleting it saves storage resources.

[0015] A second aspect provides a service update apparatus, which includes a receiving module and an update service module. The receiving module is used to receive an update service package from a user, and the update service module is used to execute a second application indicated by the update service package, synchronize the current file operation information of the first application and the file operation information of the second application, and close the first application.

[0016] In one possible implementation, the service update package is used to instruct the second application, which is an upgrade of the first application, to a version higher than that of the first application.

[0017] In another possible implementation, the service update package is used to instruct the rollback of the first application to obtain a second application, the version of which is lower than that of the first application.

[0018] In another possible implementation, the update service module includes a first process, a second process, and a third process. The first process is used to run a first application, the second process is used to launch the third process according to the update service package, and the third process is used to run the second application indicated by the update service package.

[0019] In another possible implementation, the first process sends the current file descriptor of the first application to the third process, and the third process updates the current file descriptor of the second application to the current file descriptor of the first application.

[0020] In another possible implementation, the first process is specifically used to send the current file descriptor of the first application to the third process via SOCKET.

[0021] In another possible implementation, the update service module is also used to delete the service package of the first application.

[0022] For the explanation of terms, the specific steps for updating service modules and process execution, and the beneficial effects in the second part, please refer to the corresponding description in the first part.

[0023] The third aspect provides a cloud service system, which includes a cloud management platform and a service update device as described in the second aspect or any possible implementation thereof.

[0024] A fourth aspect provides a computing device cluster including at least one computing device, each computing device including a processor and a memory; the processor of the at least one computing device is configured to execute instructions stored in the memory of the at least one computing device to cause the computing device cluster to perform a method as described in the first aspect or any possible implementation thereof.

[0025] The fifth aspect provides a computer-readable storage medium including computer program instructions that, when executed by a cluster of computing devices, enable the cluster of computing devices to perform the service update method of the first aspect or any possible implementation thereof.

[0026] The sixth aspect provides a computer program product comprising computer program instructions; when the computer program instructions are executed by a cluster of computing devices, the cluster of computing devices executes the service update method of the first aspect or any possible implementation thereof. Attached Figure Description

[0027] Figure 1 is a schematic diagram of a cloud service system in an embodiment of this application;

[0028] Figure 2 is a schematic diagram of a physical host including multiple containers in an embodiment of this application;

[0029] Figure 3 is a schematic diagram of a container running multiple applications on a physical host in an embodiment of this application;

[0030] Figure 4 is a signaling interaction diagram of the service update method in an embodiment of this application;

[0031] Figure 5 is another signaling interaction diagram of the service update method in the embodiments of this application;

[0032] Figure 6 is another signaling interaction diagram of the service update method in the embodiment of this application;

[0033] Figure 7 is a flowchart of checking the application running status in an embodiment of this application;

[0034] Figure 8 is a structural diagram of a service update device in an embodiment of this application;

[0035] Figure 9 is a schematic diagram of a computing device in an embodiment of this application;

[0036] Figure 10 is another schematic diagram of a computing device cluster in an embodiment of this application;

[0037] Figure 11 is another schematic diagram of the computing device cluster in an embodiment of this application. Detailed Implementation

[0038] The service update method described in this application can be applied to cloud instances of a cloud service system. A cloud service system can be a public cloud service system, a private cloud service system, or a hybrid cloud service system. A public cloud service system refers to a system where a cloud service provider offers cloud services to users through a public network (such as the Internet), allowing users to access the cloud and enjoy various services such as computing, storage, and networking. A private cloud service system refers to a system that provides cloud services within an enterprise. A hybrid cloud service system is a system that collaboratively provides cloud services using both public and private clouds. It can deploy different services on both private and public clouds; for example, deploying stable services on a private cloud and agile services on a public cloud.

[0039] Referring to Figure 1, in one embodiment, the cloud service system includes a cloud management platform 110 and cloud instances 1 to 4. The cloud management platform 110 is connected to cloud instances 1 to 4 via network 140. A terminal 120 is connected to the cloud management platform 110 via network 130. Network 140 may include, but is not limited to, a data center intranet or the Internet. Network 130 may include, but is not limited to, an enterprise intranet or the Internet. It should be noted that the number of cloud management platforms, the number of cloud instances, and the connection methods between the cloud management platforms and cloud instances in the cloud service system are not limited to those shown in Figure 1.

[0040] A cloud instance may include at least one of a virtual machine or a container. The following description uses a container as an example to illustrate the cloud instance of this application. Referring to Figure 2, in one embodiment, the physical host includes infrastructure, an operating system supporting namespaces and cgroups, a container engine, and containers 1 to 3.

[0041] The infrastructure can be server hardware or virtual machines in the cloud (i.e., containers can also be deployed in virtual machines). The operating system can be, but is not limited to, the Linux kernel, and supports namespaces and cgroups. Namespaces are used to isolate processes, while cgroups are used to allocate process resources, including the vCPUs and memory allocated to the process.

[0042] The container engine runs within the operating system and is used to manage containers.

[0043] Container 1 includes application 1 and its dependencies, including but not limited to bins and libs files. Container 2 includes application 2 and its dependencies, and container 3 includes application 3 and its dependencies. It should be understood that the number of containers and the number of applications within the containers on the physical host are not limited to those shown in Figure 2.

[0044] Multiple containers share the host operating system kernel, so containers start up faster than virtual machines, making them suitable for lightweight applications. Furthermore, containers consume very little computing and memory resources, and a single physical host can run thousands of containers simultaneously.

[0045] A container can run one or more processes, each running an application. The following describes a container running multiple applications on a physical host. Referring to Figure 3, in one embodiment, the physical host includes container groups 1 to 4, a shared volume, and a gateway. Container group 1 includes containers 1 to 3. Container 1 runs Cinit, application A (version 1.0), application B (version 1.0), application C (version 1.0), and application C (version 1.2). Cinit is the parent process of the other applications in container 1. After creating sockets for the applications, the applications can communicate with other applications through the sockets, such as the sockets of application C (version 1.0) and application C (version 1.2). Application C (version 1.0) can communicate with application C (version 1.2) through its socket. The shared volume can store storage package images for use by multiple containers. Different containers can transfer data through the gateway. A container group can be, but is not limited to, a pod. The number of container groups on the physical host, the number of containers within a container group, and the number and versions of applications within containers are not limited to those shown in Figure 3.

[0046] The following is a description of some of the terms used in this application:

[0047] A service package, also known as a service package image, includes the files required for a single application to run, such as the application and / or dependency packages. Dependency packages include, but are not limited to, libraries, resources, configuration files, and one or more configuration parameters. In some embodiments, the service package for the nth version of the application includes the nth version of the application and its dependency packages. In other embodiments, the dependency packages required by the nth version of the application are the same as those of previous versions, and the service package for the nth version does not include these dependency packages. In still other embodiments, the dependency packages required by the nth version of the application have some identical files to those of previous versions, and the service package for the nth version includes files different from the previous dependency packages. In short, a service package is a lighter-weight file than a container image. The value of n can be set according to specific needs.

[0048] The application described in this application can be, but is not limited to, microservices. A large and complex application can consist of one or more microservices. Each microservice can be deployed independently, and the relationships between the microservices are loosely coupled.

[0049] A file descriptor (FD) is an integer used by the operating system to identify an open file. In Linux, everything is a file, including regular files, directories, links, and devices. File descriptors provide the operating system with an efficient way to manage open files. Each process maintains a file descriptor table to track all files opened by that process. When a file is opened, the operating system returns a file descriptor, which can be considered an index pointing to a record in the process's file descriptor table. This record contains various information about the file, such as its location, access mode (read, write, or read-write), and its status. The file descriptor table is an array, and its index (i.e., the file descriptor) is a non-negative integer. File read and write operations are performed using file descriptors through system calls such as open, read, write, and close.

[0050] To address the issue of service interruption during existing application upgrades, this application proposes a service update method that does not interrupt service. The method is described in detail below. Referring to Figure 4, one embodiment of the service update method of this application includes the following steps:

[0051] S401. The terminal sends a request to the cloud management platform to obtain the first update service.

[0052] S402, The cloud management platform sends a request to the storage node to obtain the update service package.

[0053] After receiving the first update service request from the terminal, the cloud management platform sends a request to the storage node to obtain an update service package, based on the first update service request. Both the first update service request and the request to obtain an update service package include an identifier for the update service package, which may include, but is not limited to, the name and version number of the update service package. After obtaining the update service package corresponding to the identifier, the storage node sends the update service package to the cloud management platform.

[0054] S403, The cloud management platform receives update service packages sent by storage nodes.

[0055] The update service package is a service package for the second application. The service package can be, but is not limited to, a service package image, and the storage node can be, but is not limited to, an image repository. The update service package is used to indicate the replacement of the first application with a second application, the version of which is associated with the version of the first application. Optionally, the service update package is used to indicate the upgrade of the first application to obtain a second application, the version of which is higher than the version of the first application. Alternatively, the service update package is used to indicate the rollback of the first application to obtain a second application, the version of which is lower than the version of the first application.

[0056] S404, the cloud management platform will send the updated service package to the terminal.

[0057] S405, The terminal sends a second update service request to the cloud management platform.

[0058] S406. The cloud management platform sends update service packages to cloud instances.

[0059] When the second update service request carries an update service package, the cloud management platform sends the update service package to the compute node to which the cloud instance belongs. The compute node mounts the update service package in the directory of the second application in the cloud instance and then executes S407.

[0060] It should be noted that steps S404 to S405 are optional. After obtaining the update service package, the cloud management platform can directly send the update service package to the cloud instance. In some embodiments, users can send the update service package directly to the cloud instance without going through the cloud management platform. In other embodiments, users can obtain the update service package from the image repository and then send it to the cloud instance, instead of sending it through the cloud management platform. Users can include, but are not limited to, consumers, producers, or maintenance personnel of cloud services.

[0061] S407, the second application indicated by the cloud instance running update service package.

[0062] Specifically, by unzipping the update service package on the cloud instance, the static data of the second application can be obtained, such as program code, libraries, resources, configuration files, etc. After the cloud instance executes the program code of the update service package, the cloud instance starts running the second application.

[0063] S408, cloud instance synchronizes the current file operation information of the first application and the current file operation information of the second application.

[0064] Current file operation information may include, but is not limited to, file descriptors and / or file handles. After the cloud instance synchronizes the current file operation information of the first application and the second application, the second application can operate on the current file of the first application, realize the synchronization of running status, and thus take over the service provided by the first application.

[0065] S409, Cloud instance shuts down the first application.

[0066] Specifically, a cloud instance can terminate the process corresponding to the first application, thereby shutting down the first application.

[0067] In this embodiment, a new version of the application can be run in the cloud instance. After synchronizing the running status of the new and old applications, the new version of the application takes over the service from the old version of the application. This allows the service update to be completed within the cloud instance without interrupting the service, thereby providing a better service experience.

[0068] Secondly, this application can upgrade a single application within a container (i.e., upgrade in place), which saves resources (e.g., memory resources) compared to the method of creating a new container and then switching containers to update the application.

[0069] When file operation information is a file descriptor, the file descriptor is transmitted through processes. The service update method of this application is described in detail below with reference to the processes of a cloud instance. Referring to Figure 5, in another embodiment, the service update method of this application includes the following steps:

[0070] S501, The terminal sends a request to the local cloud management platform to obtain the first update service.

[0071] In this embodiment, the cloud management platform is a private cloud cloud management platform (i.e., a local cloud management platform).

[0072] S502, The local cloud management platform sends a request to the storage node to obtain the update service package.

[0073] S503, the local cloud management platform receives update service packages sent by storage nodes.

[0074] S504, the local cloud management platform will send the update service package to the terminal.

[0075] S505, the terminal sends a second update service request to the local cloud management platform.

[0076] S506, The local cloud management platform sends update service packages to the cloud instance.

[0077] S501 to S506 are the same as S401 to S406, as detailed in the previous description.

[0078] S507, the second process of the cloud instance starts the third process.

[0079] The cloud instance can detect whether it has received an update service package through a second process (i.e., the parent process of the first process). If an update service package is received, it can launch a third process to execute the second application script, and then execute S508. Optionally, after launching the third process, a socket can be created for the third process, which can communicate with other processes. The first and second applications can be, but are not limited to, network device management software.

[0080] S508, the third process of the cloud instance executes the script for the second application in the update service package.

[0081] S509. The first process of the cloud instance sends the current file descriptor of the first application to the third process of the cloud instance.

[0082] Optionally, S509 includes: the second process sending the current file descriptor of the first application to the third process via a SOCKET.

[0083] S510, the third process of the cloud instance updates the current file descriptor of the second application to the current file descriptor of the first application.

[0084] Optionally, the code for passing and updating the current file descriptor is shown below:

[0085] S511, the second process of the cloud instance deletes the service package of the first application.

[0086] The second process of the cloud instance deletes the service packages of the first application to save storage resources. The second process of the cloud instance can also delete the sockets of the first application to reduce the resources occupied by the sockets.

[0087] S512, the second process of the cloud instance sends a service update completion message to the local cloud management platform.

[0088] S513, the local cloud management platform sends a service update completion message to the terminal.

[0089] The terminal can send service requests to the cloud instance through the local cloud management platform, and the cloud instance can process the service request using a second process.

[0090] In this embodiment, file descriptors can be passed between processes within the cloud instance to synchronize the current running state of the application, thereby completing service updates without service interruption and significantly improving the user's service experience.

[0091] Secondly, by passing file descriptions between processes, the running status of the application can be synchronized and services can be updated. This makes the service update speed very fast. Compared with the method of installing new services after the container is shut down, the method in this embodiment can significantly improve the service update speed.

[0092] It should be noted that in the embodiment shown in Figure 5, steps S504, S505, S511, S512, and S513 are optional steps, and all or some of them can be executed according to the actual situation.

[0093] For ease of understanding, the process of installing the container and updating the service in this application is described below using another embodiment. Referring to Figure 6, in another embodiment, the service update method of this application includes the following steps:

[0094] S601, the terminal sends the container creation command to the cloud management platform.

[0095] The cloud management platform includes kube-apiserver, which provides functions including but not limited to authentication and authorization, data verification, and cluster state changes. After receiving a container creation command, kube-apiserver executes S602.

[0096] S602, the cloud management platform sends the container creation command to the kubelet of the compute node.

[0097] The kubelet can handle tasks from the kube-apiserver and manage Pods and containers. The kubelet is responsible for monitoring Pods, mounting volumes, running containers, and reporting node and pod status.

[0098] S603, kubelet sends a command to the parent process of the container to start the container.

[0099] S604, the cloud management platform sends a configmap configuration command to the parent process of the container.

[0100] A configmap refers to an environment variable, command-line argument, or configuration file in a storage volume. After the container's parent process starts the container according to the start container command, it configures microservice 1 according to the configmap configuration instructions, and then runs microservice 1.

[0101] S605, The terminal sends an update service request to the cloud management platform.

[0102] S606, the cloud management platform sends the update service request to the container's parent process.

[0103] S607. The parent process of the container sends a request to the image repository to obtain the update service package.

[0104] S608. The parent process of the container receives the service package image sent by the image repository.

[0105] S609. The parent process of the container mounts the service package image of microservice 1 in the directory of microservice 1.

[0106] S610, the parent process of the container starts the process of the new version of microservice 1.

[0107] After the parent process of the container starts the process of the new version of microservice 1, it synchronizes the current file descriptors in the process of the old version of microservice 1 with the process of the new version of microservice 1. The process of the new version of microservice 1 operates on the current file of the old version of microservice 1, thereby taking over the provision of microservice 1 from the old version of microservice 1.

[0108] The following describes the method for detecting the running status of an application, using the Hiro service as an example. Referring to Figure 7, in one embodiment, the detection method includes the following steps:

[0109] S701, Obtain the state of the hiro application before the update and the process state of the hiro application.

[0110] Specifically, after entering `kubect1 get pods –o wide –nmanager|grep hiro`, you can see the following Hiro application status:

[0111] hiro-ck6gn 1 / 1 running 0 6d4h 172.19.0.27 node3 <none>

[0112] hiro-gxln5 1 / 1 running 0 6d4h 172.19.0.4 node2 <none>

[0113] hiro-zgpnk 1 / 1 running 0 6d4h 172.19.0.40 node1 <none>

[0114] After executing `ps -ef` in hiro-ck6gn, the process status of the hiro application can be returned, as shown in Table 1:

[0115] Table 1

[0116] The `ps` command is used to view process information. `ps -ef` lists all processes and all columns for each process; `-e` is the parameter to list all processes, and `-f` is the parameter to list all columns. `CMD` specifies the process name or path. As shown in Table 1, the Hiro application version is 1.1.32.

[0117] S702 and secretbox send requests to the hiro application at preset intervals.

[0118] Taking secretbox as an example, the client program enters crictl ps|grep secretbox and then searches for secretbox according to the command. After entering crictl inspect id_number|grep mounts-A20, the host path of the sidecar CSI mounted by secretbox is obtained according to the command. The host path is taken as / var / lib / kubelet / pods / 7ad79f34-b49f-488c-b28a-64dccbe4b532 / volumes / kubernetes.io~csi / sidecar / mount / ir. The curl command is called every 0.1 seconds. The curl command is taken as while[1]; do curl--unix-socket http.sock-i http: / / unix / rest / nodeagent / v2 / csi / appconf>>queryResult.txt; sleep 0.1; done. Then the return value of the curl command is recorded in queryResult.txt.

[0119] S703, Modify the version number of the Hiro application.

[0120] The command to modify the version number is exemplified by `Kubectl edit configmap hiro.version –n manager`, where `hiro.version` is version 1.1.31. The code for modifying the version number is as follows:

[0121] S704. Check the Hiro application status during the upgrade process.

[0122] Specifically, after entering PaaSOM-1: / tmp / demo / x00594346 / chart#kubectl get pods –o wide –nmanager|grep hiro, check the hiro application status as follows:

[0123] hiro-ck6gn 1 / 1 running 0 6d4h 172.19.0.27 node3 <none>

[0124] hiro-gxln5 1 / 1 running 0 6d4h 172.19.0.4 node2 <none>

[0125] hiro-zgpnk 1 / 1 running 0 6d4h 172.19.0.40 node1 <none>

[0126] It can be seen that during the Hiro upgrade, the Hiro daemon does not exit, and the state of the Hiro application remains unchanged.

[0127] S705, Check the process status of the Hiro application.

[0128] Specifically, after entering `[ossadm@hiro-ck6gn / log]$ps -ef`, you can see the process running status of the Hiro application as shown in Table 2:

[0129] Table 2

[0130] As can be seen from Table 2, the current application version is 1.1.31, and the Hiro application version 1.1.32 is no longer running.

[0131] S706. Check the interface return value.

[0132] After calling the command while[1]; do curl --unix-socket http.sock -i http: / / unix / rest / nodeagent / v2 / csi / appconf>>queryResult.txt; sleep 0.1; done, you can view the interface call result by entering cat queryResult.txt. The interface call result is as follows:

[0133] {"apiVersion":"V1","hiro":{"connectors":[{"address":"ir / http.sock","transportProtocol":"Uds"},{"address":"172.19.0.27:32018","transportPro tocol":"Tcp"}],"endpoints":[{"endpoints":"backend / http.sock","protocol":"Http","transportProtocol":"Uds"}]},"glb":{"endpoints":{}}}HTTP / 1.1 200OK Content-TYPE:application / json; charset=utf-8 Content-Length:268Date:Wed,02Nov 2022 09:11:16GMT

[0134] {"apiVersion":"V1","hiro":{"connectors":[{"address":"ir / http.sock","transportProtocol":"Uds"},{"address":"172.19.0.27:32018","transportPro tocol":"Tcp"}],"endpoints":[{"endpoints":"backend / http.sock","protocol":"Http","transportProtocol":"Uds"}]},"glb":{"endpoints":{}}}HTTP / 1.1 200OK Content-TYPE:application / json; charset=utf-8 Content-Length:268 Date:Wed,02Nov 2022 09:11:16GMT

[0135] {"apiVersion":"V1","hiro":{"connectors":[{"address":"ir / http.sock","transportProtocol":"Uds"},{"address":"172.19.0.27:32018","transportProtocol":"Tcp"}],"endpoints":[{"endpoints":"backend / h ttp.sock","protocol":"Http","transportProtocol":"Uds"}]},"glb":{"endpoints":{}}}Euler: / var / lib / kubelet / pods / 7ad79f34-b49f-488c-b28a-64dccbe4b532 / volumes / kubernetes.io-csi / sidercar / mount / ir#

[0136] Each call returns a result. As shown above, two identical results were returned. In fact, the returned results include a large number of identical results. To view abnormal results, you can execute the following command: `cat queryResult.txt|grep 'HTTP / 1.1'|grep -v '200 OK'` to view the abnormal return results of the SecretBox API call. An empty return result indicates that the Hiro application continued to process requests without service interruption throughout the entire Hiro application update process.

[0137] The hardware for implementing the service update method in this application is described below. Referring to FIG8, in one embodiment, the service update device 800 of this application includes a receiving module 801 and an update service module 802. The receiving module 801 is used to receive an update service package from a user, and the update service module 802 is used to run the second application indicated by the update service package, synchronize the current file operation information of the first application and the current file operation information of the second application, and close the first application.

[0138] As an example of a software functional unit, the update service module 802 may include code running on a cloud instance. The cloud instance may include at least one of a physical host (computing device), a virtual machine, or a container. Furthermore, there may be one or more cloud instances. For example, the update service module 802 may include code running on multiple hosts / virtual machines / containers. It should be noted that the multiple hosts / virtual machines / containers used to run the code may be distributed within the same region or in different regions. Further, the multiple hosts / virtual machines / containers used to run the code may be distributed within the same availability zone (AZ) or in different AZs, each AZ including one or more geographically proximate data centers. Typically, a region may include multiple AZs.

[0139] Similarly, multiple hosts / virtual machines / containers used to run this code can be distributed within the same Virtual Private Cloud (VPC) or across multiple VPCs. Typically, a VPC is set up within a region. Communication between two VPCs within the same region, as well as between VPCs in different regions, requires a communication gateway to be set up within each VPC to enable interconnection between VPCs.

[0140] As an example of a hardware functional unit, the update service module 802 may include at least one computing device, such as a server. Alternatively, the update service module 802 may also be a device implemented using an application-specific integrated circuit (ASIC) or a programmable logic device (PLD). The PLD may be implemented using a complex programmable logical device (CPLD), a field-programmable gate array (FPGA), generic array logic (GAL), or any combination thereof.

[0141] The multiple computing devices included in the update service module 802 can be distributed within the same region or in different regions. Similarly, the multiple computing devices included in the update service module 802 can be distributed within the same Availability Zone (AZ) or in different AZs. Likewise, the multiple computing devices included in the update service module 802 can be distributed within the same VPC or in multiple VPCs. These multiple computing devices can be any combination of computing devices such as servers, ASICs, PLDs, CPLDs, FPGAs, and GALs.

[0142] In other embodiments, the update service module 802 can be used to execute any step performed by the cloud instance in the service update method shown in Figures 4 and 5, and the receiving module 801 can be used to execute any step performed by the cloud instance in the service update method shown in Figures 4 and 5. The steps implemented by the receiving module 801 and the update service module 802 can be specified as needed. By implementing different steps in the service update method shown in Figures 4 and 5 through the receiving module 801 and the update service module 802 respectively, all the functions of the cloud instance can be realized.

[0143] This application also provides a computing device 900. As shown in FIG9, in one embodiment, the computing device 900 includes: a bus 902, a processor 904, a memory 906, and a communication interface 908. The processor 904, the memory 906, and the communication interface 908 communicate with each other via the bus 902. It should be understood that this application does not limit the number of processors and memory in the computing device 900.

[0144] Bus 902 can be a peripheral component interconnect (PCI) bus or an extended industry standard architecture (EISA) bus, etc. Buses can be categorized as address buses, data buses, control buses, etc. For ease of illustration, only one line is used in Figure 9, but this does not indicate that there is only one bus or one type of bus. Bus 902 can include pathways for transmitting information between various components of computing device 900 (e.g., memory 906, processor 904, communication interface 908).

[0145] Processor 904 may include any one or more processors such as a central processing unit (CPU), graphics processing unit (GPU), microprocessor (MP), or digital signal processor (DSP). The processor includes multiple processing cores.

[0146] The memory 906 may include volatile memory, such as random access memory (RAM). The memory 906 may also include non-volatile memory, such as read-only memory (ROM), flash memory, hard disk drive (HDD), or solid-state drive (SSD). In some embodiments, the memory 906 stores executable program code, which the processor 904 executes to implement the aforementioned receiving module 801 and update service module 802, thereby implementing the aforementioned service update method.

[0147] The communication interface 908 uses transceiver modules, such as, but not limited to, network interface cards and transceivers, to enable communication between the computing device 900 and other devices or communication networks.

[0148] This application also provides a computing device cluster. The computing device cluster includes at least one computing device. The computing device can be a server, such as a central server, an edge server, or a local server in a local data center. In some embodiments, the computing device can also be a terminal device such as a desktop computer, a laptop computer, or a smartphone.

[0149] As shown in Figure 10, the computing device cluster includes at least one computing device 900. The memory 906 in one or more computing devices 900 in the computing device cluster may store the same instructions for executing service update methods.

[0150] Please refer to Figure 11, which is a schematic diagram of computer devices in a computer cluster provided in an embodiment of this application being connected via a network. As shown in Figure 11, two computing devices 900A and 900B are connected via a network. Specifically, they are connected to the network through the communication interfaces in each computing device.

[0151] In one possible implementation, the memory in computing device 900A stores instructions for performing the functions of receiving module 801. Meanwhile, the memory in computing device 700B stores instructions for performing the functions of update service module 802.

[0152] It should be understood that the functions of computing device 900A shown in Figure 11 can also be performed by multiple computing devices. Similarly, the functions of computing device 900B can also be performed by multiple computing devices.

[0153] This application also provides a computer program product containing instructions. The computer program product may be a software or program product containing instructions, capable of running on a computing device or stored on any usable medium. When the computer program product is run on at least one computing device, it causes the at least one computing device to execute the service update method of this application.

[0154] Optionally, the computer program product is software that provides service updates for containers. Alternatively, the computer program product is software integrated into a container engine. Alternatively, the computer program product is an update service module within operations and maintenance software. Alternatively, the computer program product is the operations engine of a network device.

[0155] This application also provides a computer-readable storage medium. The computer-readable storage medium can be any available medium capable of being stored by a computing device, or a data storage device such as a data center containing one or more available media. The available medium can be a magnetic medium (e.g., floppy disk, hard disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., solid-state drive). The computer-readable storage medium includes instructions that instruct a computing device to execute the service update method of this application.

[0156] The terms "first," "second," etc., used in the specification, claims, and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments described herein can be implemented in a sequence other than that illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.

[0157] The above embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the protection scope of the technical solutions of the embodiments of this application.< / none> < / none> < / none> < / none> < / none> < / none>

Claims

1. A service update method, characterized in that, The method is applied to a cloud instance of a cloud service system, wherein the cloud instance runs a user's first application, and the method includes: The cloud instance receives an update service package from the user, the update service package being used to instruct a second application to replace the first application, the version of the second application being associated with the version of the first application; The cloud instance runs the second application indicated by the update service package; The cloud instance synchronizes the current file operation information of the first application and the current file operation information of the second application. The cloud instance shuts down the first application.

2. The method according to claim 1, characterized in that, The service update package is used to indicate the second application obtained by upgrading the first application, wherein the version of the second application is higher than the version of the first application.

3. The method according to claim 1, characterized in that, The service update package is used to instruct the rollback of the first application to obtain a second application, the version of which is lower than the version of the first application.

4. The method according to any one of claims 1 to 3, characterized in that, The first application is run by the first process of the cloud instance, and the cloud instance also includes a second process, which is the parent process of the first process; The cloud instance running the second application indicated by the update service package includes: The second process launches the third process based on the update service package; The third process runs the second application indicated by the update service package.

5. The method according to claim 4, characterized in that, The current file operation information of the first application is the current file descriptor of the first application, and the current file operation information of the second application is the current file descriptor of the second application. The cloud instance synchronizes the current file operation information of the first application and the current file operation information of the second application, including: The first process sends the current file descriptor of the first application to the third process; The third process updates the current file descriptor of the second application to the current file descriptor of the first application.

6. The method according to claim 5, characterized in that, The first process sends the current file descriptor to the third process, including: The first process sends the current file descriptor of the first application to the third process via a SOCKET.

7. The method according to any one of claims 1 to 6, characterized in that, The cloud instance is a container or a virtual machine.

8. The method according to any one of claims 1 to 7, characterized in that, The method further includes: The cloud instance deletes the service package of the first application.

9. A service update device, characterized in that, include: A receiving module is configured to receive an update service package from a user, the update service package being configured to instruct a second application to replace a first application, the version of the second application being associated with the version of the first application; The update service module is also used to run the second application indicated by the update service package; The update service module is also used to synchronize the current file operation information of the first application and the current file operation information of the second application. The update service module is also used to close the first application.

10. The service update device according to claim 9, characterized in that, The service update package is used to indicate the second application obtained by upgrading the first application, wherein the version of the second application is higher than the version of the first application.

11. The service update device according to claim 9, characterized in that, The service update package is used to instruct the rollback of the first application to obtain a second application, the version of which is lower than the version of the first application.

12. The service update apparatus according to any one of claims 9 to 11, characterized in that, The update service module includes a first process, a second process, and a third process, wherein the second process is the parent process of the first process; The first process is used to run the first application; The second process is used to launch the third process based on the update service package; The third process is used to run the second application indicated by the update service package.

13. The service update device according to claim 12, characterized in that, The current file operation information of the first application is the current file descriptor of the first application, the current file operation information of the second application is the current file descriptor of the second application, and the first process is used to send the current file descriptor of the first application to the third process; The third process is used to update the current file descriptor of the second application to the current file descriptor of the first application.

14. The service update device according to claim 13, characterized in that, Specifically, the first process is used to send the current file descriptor of the first application to the third process via a SOCKET.

15. The service update apparatus according to any one of claims 9 to 14, characterized in that, The service update device is a container or a virtual machine.

16. The service update apparatus according to any one of claims 9 to 11, characterized in that, The update service module is also used to delete the service package of the first application.

17. A computing device cluster, characterized in that, The system includes at least one computing device, each computing device including a processor and a memory; the processor of the at least one computing device is configured to execute instructions stored in the memory of the at least one computing device to cause the cluster of computing devices to perform the method as described in any one of claims 1 to 8.

18. A computer-readable storage medium, characterized in that, It includes computer program instructions, which, when executed by a cluster of computing devices, perform the method as described in any one of claims 1 to 8.

19. A computer program product containing instructions, characterized in that, When the instruction is executed by the computing device cluster, the computing device cluster causes the computing device cluster to perform the method as described in any one of claims 1 to 8.