CN109032643A - The method and apparatus of software upgrading - Google Patents
The method and apparatus of software upgrading Download PDFInfo
- Publication number
- CN109032643A CN109032643A CN201810837430.7A CN201810837430A CN109032643A CN 109032643 A CN109032643 A CN 109032643A CN 201810837430 A CN201810837430 A CN 201810837430A CN 109032643 A CN109032643 A CN 109032643A
- Authority
- CN
- China
- Prior art keywords
- server
- software
- version number
- service
- test
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
- 238000000034 method Methods 0.000 title claims abstract description 64
- 238000012360 testing method Methods 0.000 claims abstract description 130
- 238000004590 computer program Methods 0.000 claims description 12
- 238000001514 detection method Methods 0.000 claims description 3
- 238000009434 installation Methods 0.000 abstract 2
- 238000013461 design Methods 0.000 description 20
- 230000008569 process Effects 0.000 description 16
- 238000010586 diagram Methods 0.000 description 12
- 230000008859 change Effects 0.000 description 6
- 238000004891 communication Methods 0.000 description 4
- 230000000694 effects Effects 0.000 description 3
- 230000003993 interaction Effects 0.000 description 2
- 238000005516 engineering process Methods 0.000 description 1
- 230000006870 function Effects 0.000 description 1
- 238000011990 functional testing Methods 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 238000011056 performance test Methods 0.000 description 1
- 238000006467 substitution reaction Methods 0.000 description 1
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F8/00—Arrangements for software engineering
- G06F8/60—Software deployment
- G06F8/65—Updates
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/36—Preventing errors by testing or debugging software
- G06F11/3668—Software testing
- G06F11/3672—Test management
- G06F11/3688—Test management for test execution, e.g. scheduling of test suites
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- General Engineering & Computer Science (AREA)
- Software Systems (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Computer Security & Cryptography (AREA)
- Computer Hardware Design (AREA)
- Quality & Reliability (AREA)
- Debugging And Monitoring (AREA)
Abstract
The embodiment of the present application provides a kind of method and apparatus of software upgrading, this method comprises: the software of the second edition number is sent to second server, so that the software upgrading of the first version number of installation is the software of the second edition number by second server;Test case corresponding with the type of the software is sent to second server, so that second server uses the software of the testing case second edition number;Test result is obtained from second server;If the test result instruction test passes through, determine whether second server can be normally carried out business, if so, the software of the second edition number is sent to each third server, so that the software upgrading of the first version number of installation is the software of the second edition number by each third server;Second server and each third server are the server in same data center's hardware system.The application, which reduces software upgrading, influences the risk of entire data center's hardware system offer infrastructure service.
Description
Technical Field
The embodiment of the application relates to computer technologies, and in particular, to a method and an apparatus for updating software.
Background
The change of the data center hardware system is represented as a copy operation, that is, part or all of the servers included in the data center hardware system perform the same change operation, such as BIOS update change, BMC firmware update change, operating system kernel version or driver update change, and the like.
At present, when a certain software or hardware of a data center hardware system is changed, after a new version of the software or hardware needing to be changed is successfully tested offline on one server of the data center hardware system, all the servers needing to be changed are changed, and the risk that basic services of the data center hardware system cannot be normally performed exists.
Disclosure of Invention
The embodiment of the application provides a method and a device for updating software, so that the risk that the software change affects the whole data center hardware system to provide basic service is reduced.
In a first aspect, an embodiment of the present application provides a method for updating software, which is applied to a first server, and includes:
sending the software with the second version number to a second server so that the second server updates the installed software with the first version number into the software with the second version number;
sending a test case corresponding to the type of the software to the second server so that the second server adopts the test case to test the software with the second version number;
obtaining a test result from the second server;
if the test result indicates that the test is passed, determining whether the second server can normally carry out the service, and if so, sending the software with the second version number to each third server so that each third server updates the installed software with the first version number into the software with the second version number; the second server and each third server are servers in the same data center hardware system.
In one possible design, before sending the second version number of the software to the second server, the method further includes:
acquiring respective machine information of each server included in the data center hardware system; the machine information comprises the version number of each piece of software installed in the server and a manufacturer corresponding to each piece of software installed in the server;
and determining that the data center hardware system is provided with the software of the first version number and any server of which the manufacturer corresponding to the software is a preset manufacturer is the second server.
In one possible design, after determining the second server, the method further includes:
sending request information to the second server; the request information is used for indicating the second server to stop each ongoing service.
In one possible design, further comprising: after the second server stops each ongoing service, acquiring and storing configuration information of the second server and service data of each service from the second server;
if the test result indicates that the test passes, the method further comprises:
and sending the configuration information of the second server and the service data of each service to the second server so that the second server recovers the configuration according to the configuration information and recovers each service according to each service data.
In one possible design, the determining whether the second server is capable of performing the service normally includes:
if the first feedback information can be received every second preset time within the first preset time, determining that the second server can normally carry out the service; the first feedback information indicates that the second server can normally perform the service;
or,
if the second feedback information is not received within a third preset time length, determining that the second server can normally perform the service; the second feedback information indicates that the second server cannot normally perform the service.
In one possible design, if the test result indicates that the test does not pass, sending first control information to the second server; and the first control information instructs the second server to roll back to the state before the software is updated according to the configuration information and the service data.
In a possible design, if it is determined that the second server cannot normally perform a service, sending second control information to the second server; and the second control information indicates the second server to roll back to the state before the software is updated according to the configuration information and the service data.
In a second aspect, an embodiment of the present application provides a software updating method, applied to a second server, including:
acquiring software with a second version number from a first server, and updating the installed software with the first version number into the software with the second version number;
acquiring a test case corresponding to the type of the software from a first server, and testing the software with the second version number by adopting the test case;
sending a test result to the first server;
and if the test result indicates that the test is passed, detecting whether the second server can normally carry out the service.
In a third aspect, an embodiment of the present application provides an apparatus for updating software, including:
the sending module is used for sending the software with the second version number to a second server so that the second server can update the installed software with the first version number into the software with the second version number;
the sending module is used for sending the test case corresponding to the type of the software to the second server so that the second server adopts the test case to test the software with the second version number;
the acquisition module is used for acquiring the test result from the second server;
the determining module is used for determining whether the second server can normally carry out the service or not if the test result indicates that the test is passed;
the sending module is further configured to send software of a second version number to each third server if it is determined that the second server can normally perform a service, so that each third server updates the installed software of the first version number to the software of the second version number; the second server and the second server are servers in the same data center hardware system.
In one possible design, the obtaining module is further configured to: before the software with the second version number is sent to a second server, machine information of each server included in the data center hardware system is obtained; the machine information comprises the version number of each piece of software installed in the server and a manufacturer corresponding to each piece of software installed in the server;
and determining that the data center hardware system is provided with the software of the first version number and any server of which the manufacturer corresponding to the software is a preset manufacturer is the second server.
In one possible design, the sending module is further configured to:
after determining the second server, sending request information to the second server; the request information is used for indicating the second server to stop each ongoing service.
In one possible design, the obtaining module is further configured to: after the second server stops each ongoing service, acquiring and storing configuration information of the second server and service data of each service from the second server;
if the test result indicates that the test passes, the sending module is further configured to:
and sending the configuration information of the second server and the service data of each service to the second server so that the second server recovers the configuration according to the configuration information and recovers each service according to each service data.
In one possible design, the determining module is specifically configured to:
if the first feedback information can be received every second preset time within the first preset time, determining that the second server can normally carry out the service; the first feedback information indicates that the second server can normally perform the service;
or,
if the second feedback information is not received within a third preset time length, determining that the second server can normally perform the service; the second feedback information indicates that the second server cannot normally perform the service.
In a fourth aspect, an embodiment of the present application provides an apparatus for updating software, including:
the acquisition module is used for acquiring software with a second version number from a first server and updating the installed software with the first version number into the software with the second version number;
the acquisition module is used for acquiring a test case corresponding to the type of the software from a first server and testing the software with the second version number by adopting the test case;
the sending module is used for sending a test result to the first server;
and the detection module is used for detecting whether the software updating device can normally carry out the service or not if the test result indicates that the test is passed.
In a fifth aspect, an embodiment of the present application provides a server, including: a processor coupled with a memory;
the memory is used for storing a computer program;
the processor is configured to invoke a computer program stored in the memory to implement the method of the first aspect and any possible design of the first aspect.
In a sixth aspect, an embodiment of the present application provides a readable storage medium, which includes a program or instructions, and when the program or instructions are executed on a computer, the method described in the first aspect and any possible design of the first aspect is executed.
In a seventh aspect, an embodiment of the present application provides a server, including: a processor coupled with a memory;
the memory is used for storing a computer program;
the processor is configured to invoke the computer program stored in the memory to implement the method of the second aspect and any possible design of the second aspect.
In an eighth aspect, embodiments of the present application provide a readable storage medium, which includes a program or instructions, when the program or instructions is executed on a computer, the method described in the second aspect and any possible design of the second aspect is executed.
According to the software updating method, the offline test and the online test of the updated software are required to be performed on one server in the data center hardware system, and when the offline test and the online test are passed, the software is updated on the other servers in the data center hardware system which need to be updated, so that the risk that the software updating influences the whole data center hardware system to provide basic service is reduced.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings needed to be used in the description of the embodiments or the prior art will be briefly introduced below, and it is obvious that the drawings in the following description are some embodiments of the present application, and for those skilled in the art, other drawings can be obtained according to these drawings without inventive exercise.
FIG. 1 is a diagram of a system architecture provided by an embodiment of the present application;
FIG. 2 is an interaction diagram of a method for updating software provided by an embodiment of the present application;
FIG. 3 is a first schematic structural diagram of an apparatus for updating software according to an embodiment of the present disclosure;
fig. 4 is a schematic structural diagram of a software updating apparatus according to an embodiment of the present application;
fig. 5 is a schematic structural diagram of a server according to an embodiment of the present application
Fig. 6 is a schematic structural diagram of a server according to an embodiment of the present application.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are some embodiments of the present application, but not all embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
FIG. 1 is a diagram of a system architecture provided by an embodiment of the present application; referring to fig. 1, the system architecture includes: a server 11 for software updates and a data center hardware system 12;
the data center hardware system 12 includes a plurality of servers for providing basic services for services.
The following describes the software updating method provided by the present application with specific embodiments. In the embodiments described below, the server used for the software update is referred to as the first server.
Fig. 2 is an interaction diagram of a method for updating software provided in an embodiment of the present application, and as shown in fig. 2, the method of the embodiment may include:
step S101, the first server sends the software with the second version number to the second server;
step S102, the second server updates the installed software with the first version number into the software with the second version number;
step S103, the first server sends the test case corresponding to the type of the software to the second server;
step S104, the second server tests the software of the second version number according to the test case;
step S105, the second server sends the test result to the first server;
if the test result indicates that the test is not passed, executing the step 106 to the step S107, and if the test result indicates that the test is passed, executing the step S108;
step S106, the first server sends first control information to the second server; the first control information instructs the second server to roll back to the state before the software is changed according to the configuration information and the service data;
step S107, the second server rolls back to the state before the software is updated;
step S108, the first server determines whether the second server can normally carry out the service;
if the second server can normally perform the service, executing step S109 to step S110, and if the second server cannot normally perform the service, executing step S111 to step S112;
step S109, the first server sends the software with the second version number to each third server;
step S110, the third server updates the installed software with the first version number into the software with the second version number;
step S111, the first server sends second control information to the second server; the second control information indicates the second server to roll back to the state before the software is changed according to the configuration information and the service data;
and step S112, the second server controls the second server to roll back to the state before the software is changed.
Specifically, the second server and each third server in this embodiment all belong to a server in the same data center hardware system.
For example, if a certain software has a problem and needs to be updated to a higher version of software, the user may input a test instruction through the user interface of the auxiliary device, where the test instruction includes a version number of the software to be updated and a manufacturer corresponding to the software to be updated; after the auxiliary equipment acquires the test instruction, generating a test request, wherein the test request comprises the version number of the software to be updated and a manufacturer corresponding to the software to be updated; the auxiliary device sends the test request to the first server.
The first server receives the test request, and obtains respective machine information of each server included in the data center hardware system according to the test request, wherein the machine information is shown in table 1:
TABLE 1
After the respective machine information of each server included in the data center hardware system is obtained, the first server determines a second server from the servers included in the data center hardware system according to the respective machine information.
Specifically, the data center hardware system includes machine information of each server, and the software configuration information in the machine information includes version numbers of each piece of software installed in the corresponding server, and manufacturers corresponding to each piece of software installed in the server; determining a second server from the servers included in the data center hardware system according to the machine information, including:
and determining that the data center hardware system is provided with the software of the first version number and any server of which the manufacturer corresponding to the software is a preset manufacturer is a second server. The software is the software to be updated, and the first version number is the version number of the software to be updated included in the test request. The preset manufacturer is a manufacturer of the software with the first version number and a manufacturer of the software with the second version number; or, the preset manufacturer is a manufacturer of the software to be updated.
The first server randomly selects one server from at least one server which is provided with the software to be updated and the version number of the software to be updated is the first version number (namely the version number of the software to be updated included in the test request) as a second server according to the acquired machine information. At least one server is a server in a data center hardware system.
After determining a second server, the first server sends request information to the second server; the request information indicates that the second server stops each ongoing service; and after receiving the request information, the second server stops each ongoing service and sends a message of successful request to the first server. And if the second server does not stop the ongoing processes of the services after receiving the request information, the second server sends a request failure message to the first server.
And if the first server receives the message of successful request, the first server acquires and stores the configuration information of the second server and the service data of each service from the second server. The configuration information includes CPU information (such as a CPU model), hard disk information, a firmware version number, and the like of the second server.
After the first server stores the configuration information of the second server and the service data of each service, the first server sends the software with the second version number to the second server; and the second server updates the installed software with the first version number into the software with the second version number. The second version number is higher than the first version number, and the software of the first version number and the software of the second version number are the same software, and the manufacturers are the same, but the version numbers are different.
And after the first server receives the successfully updated message, determining the adopted test case according to the type of the software with the second version number. For example, if the type of the software with the second version number is functional software, the functional test case is determined to be used, and if the type of the software with the second version number is performance software, the performance test case is determined to be used, and the like.
And the first server sends the determined test case corresponding to the type of the software with the second version number to the second server, and the second server receives the test case and tests the software with the second version number according to the test case. This process belongs to the offline test process of the software of the second version number.
After the second server adopts the test case to test the software with the second version number, the second server sends the test result to the first server; and if the test result indicates that the software with the second version number passes the test, the first server determines whether the second server can normally perform the service. If the test result indicates that the test is not passed, the first server sends first control information to the second server; and the first control information instructs the second server to roll back to the state before the software to be updated is updated according to the configuration information and the service data.
Specifically, if the test result indicates that the test is passed, the first server sends the previously stored configuration information of the second server and the service data of each service to the second server; and after receiving the configuration information, the second server recovers the configuration of the second server according to the configuration information, and recovers each service which is in progress before stopping the service according to the service data of each service. The restoration of the configuration of the second server means that the other configurations except the software of the second version number are all restored to the configuration before the software update. It can be understood that if the second server does not affect other configurations in the process of updating the installed software with the first version number to the software with the second version number, the configuration of the second server does not need to be restored, and if the second server affects other configurations in the process of updating the installed software with the first version number to the software with the second version number, the configuration of the second server needs to be restored.
Determining whether the second server can normally perform the service includes:
if the first feedback information can be received every second preset time within the first preset time, determining that the second server can normally carry out the service; the first feedback information indicates that the second server can normally perform the service; wherein the first preset time period may be 24h, may also be 48h, and so on, and the second preset time period may be 1h, 2h, and so on.
Or,
if the second feedback information is not received within a third preset time length, determining that the second server can normally perform the service; the second feedback information indicates that the second server cannot normally perform the service. Wherein, the third preset time period may be 24h, may also be 48h, and so on.
The second feedback information and the third feedback information may be sent by the second server, or may be sent by another device. The method specifically comprises the following steps: after the second server passes the software test of the second version number, the second server can detect whether the second server can normally carry out the service, if the second server detects that the service can be normally carried out, second feedback information can be sent to the first server at intervals of preset time duration, and correspondingly, if the first server can receive the first feedback information at intervals of second preset time duration within the first preset time duration, the second server is determined to normally carry out the service. Or, the second server sends the second feedback information to the server when detecting that the second server cannot normally perform the service, and correspondingly, if the first server does not receive the second feedback information within the third preset time period, it is determined that the second server can normally perform the service.
The second server resumes the configuration to recover the services, namely, the second server restarts running the services after updating the software with the first version number into the software with the second version number, and then enters an on-line testing step for the software, and whether the normal service of the second server is influenced when the software with the second version number runs on line is determined by whether the second server can normally run the services after the software with the first version number is updated into the software with the second version number; if the second server can normally perform the service after the software of the first version number is updated to the software of the second version number, it is indicated that the software of the second version number does not affect the normal service of the second server, thereby solving bug of the software of the first version number, and it can be said that the software of the second version number really passes the test. If the second server cannot normally perform the service after the software of the first version number is updated to the software of the second version number, it is indicated that the software of the second version number affects the second server to normally perform the service, and the bug of the software of the second version number is not solved or a new bug exists, and the software of the second version number also fails to pass the test.
If the second server can not normally carry out the service, sending second control information to the second server; and the second control information instructs the second server to roll back to the state before the software to be updated is updated according to the configuration information and the service data.
Further, if the first server determines that the second server normally performs the service after the software to be updated is updated from the first version number to the second version number, the first server starts to update the software of the first version number installed in each third server; the third server is a server provided with the software of the first version number, or the third server is a server provided with the software to be updated in the data center hardware system but not the second server; that is to say, in this embodiment, one of the servers that needs to update the target software is selected to perform the offline test and the online test on the target software with a high version number, and when both the offline test and the online test pass, the target software is updated on the other servers that need to update the target software, so that the risk that the software update affects the basic service provided by the whole data center hardware system is reduced.
In the prior art, after the offline test of the target software with a high version number is successful, the target software is directly updated on other servers needing to update the target software, and if the online scene of the target software with the high version number has an influence on the service of the servers (the bug of the software with the first version number is not eliminated or a new bug is introduced), all the servers needing to update the target software cannot normally perform the service after the target software is updated, so that the whole data center hardware system is influenced to provide basic services.
Specifically, the process of updating the software of the first version number installed in each third server may be as follows.
One achievable process is: after the first server determines that the second server can normally perform service after software is updated, the first server determines that the software with the first version number is installed in the data center hardware system and the server, corresponding to the software, of which the manufacturer is a preset manufacturer is a third server according to the machine information obtained in the process. The third server may have a plurality of, or 1, or may not exist.
After determining each third server, the first server sends request information to each third server; the request information indicates that the third server stops each ongoing service; and after receiving the request information, each third server stops each ongoing service and sends a message of successful request to the first server. And if the ongoing processes of the services are not stopped after the third server receives the request information, each third server sends a request failure message to the first server.
And if the third server receives the message of successful request, the first server acquires and stores the configuration information of each third server and the service data of each service from each third server. The configuration information includes CPU information (such as a CPU model) of the third server, hard disk information, firmware version number, and the like.
After the first server stores the configuration information of each third server and the service data of each service, the first server sends the software with the second version number to each third server; and each third server updates the installed software with the first version number into the software with the second version number. The second version number is higher than the first version number, and the software of the first version number and the software of the second version number are the same software but different in version number.
After the first server receives the successful updating message, the first server sends the previously stored configuration information of each third server and the service data of each service to each third server; and after receiving the configuration information, the third servers recover the respective configurations according to the configuration information and recover the services which are carried out before the service is stopped according to the service data of the services. The restoration of the configuration of the third server means that the other configurations except the software of the second version number are all restored to the configuration before the software update. It can be understood that, if the third server does not affect other configurations in the process of updating the installed software with the first version number to the software with the second version number, the configuration of the third server does not need to be restored, and if the third server affects other configurations in the process of updating the installed software with the first version number to the software with the second version number, the configuration of the third server needs to be restored.
Another achievable process is: a user can input a deployment instruction through a user interface of the auxiliary device, wherein the deployment instruction comprises a version number of software to be updated (the first version number) and a manufacturer corresponding to the software to be updated (the manufacturer corresponding to the software of the first version number or the manufacturer corresponding to the software of the second version number); after the auxiliary equipment acquires the deployment instruction, generating a deployment request, wherein the deployment request comprises the version number of the software to be updated and a manufacturer corresponding to the software to be updated; the auxiliary device sends a deployment request to the first server.
The first server receives the deployment request, and obtains respective machine information of each server included in the data center hardware system according to the deployment request. The subsequent processes are the same as those achievable in the previous step, and are not described herein again.
According to the software updating method, the offline test and the online test of the updated software are required to be performed on one server in the data center hardware system, and when the offline test and the online test are passed, the software is updated on the other servers in the data center hardware system which need to be updated, so that the risk that the software updating influences the whole data center hardware system to provide basic service is reduced.
It should be understood that the sequence numbers of the above-mentioned processes do not mean the execution sequence, and the execution sequence of each process should be determined by its function and inherent logic, and should not constitute any limitation to the implementation process of the embodiments of the present application.
Fig. 3 is a first schematic structural diagram of a software updating apparatus provided in an embodiment of the present application, and as shown in fig. 3, the apparatus of the embodiment may include: a sending module 31, an obtaining module 32 and a determining module 33.
A sending module 31, configured to send the software with the second version number to a second server, so that the second server updates the installed software with the first version number to the software with the second version number;
the sending module 31 is configured to send a test case corresponding to the type of the software to the second server, so that the second server tests the software with the second version number by using the test case;
an obtaining module 32, configured to obtain a test result from the second server;
a determining module 33, configured to determine whether the second server can normally perform the service if the test result indicates that the test passes;
the sending module 31 is further configured to send, if it is determined that the second server can normally perform a service, software of a second version number to each third server, so that each third server updates the installed software of the first version number to the software of the second version number; the second server and each third server are servers in the same data center hardware system.
The apparatus of this embodiment may be configured to execute the technical solution of the first server in the foregoing method embodiment, and the implementation principle and the technical effect are similar, which are not described herein again.
In one possible design, the obtaining module 32 is further configured to: before sending the software with the second version number to a second server, acquiring respective machine information of each server included in the data center hardware system; the machine information comprises the version number of each piece of software installed in the server and a manufacturer corresponding to each piece of software installed in the server;
and determining that the data center hardware system is provided with the software of the first version number and any server of which the manufacturer corresponding to the software is a preset manufacturer is the second server.
In one possible design, the sending module 31 is further configured to:
after determining the second server, sending request information to the second server; the request information is used for indicating the second server to stop each ongoing service.
In one possible design, the obtaining module 31 is further configured to: after the second server stops each ongoing service, acquiring and storing configuration information of the second server and service data of each service from the second server;
if the test result indicates that the test is passed, the sending module 31 is further configured to:
and sending the configuration information of the second server and the service data of each service to the second server so that the second server recovers the configuration according to the configuration information and recovers each service according to each service data.
In one possible design, the determining module 33 is specifically configured to:
if the first feedback information can be received every second preset time within the first preset time, determining that the second server can normally carry out the service; the first feedback information indicates that the second server can normally perform the service;
or,
if the second feedback information is not received within a third preset time length, determining that the second server can normally perform the service; the second feedback information indicates that the second server cannot normally perform the service.
In one possible design, the sending module 31 is further configured to: if the test result indicates that the test is not passed, sending first control information to the second server; and the first control information instructs the second server to roll back to the state before the software is updated according to the configuration information and the service data.
In one possible design, the sending module 31 is further configured to: if the second server is determined not to be capable of normally carrying out the service, second control information is sent to the second server; and the second control information indicates the second server to roll back to the state before the software is updated according to the configuration information and the service data.
The apparatus of this embodiment may be configured to execute the technical solution of the first server in the foregoing method embodiment, and the implementation principle and the technical effect are similar, which are not described herein again.
Fig. 4 is a schematic structural diagram of a second device for updating software according to an embodiment of the present application, and as shown in fig. 3, the device according to the embodiment may include: an acquisition module 41, a sending module 42 and a detection module 43.
An obtaining module 41, configured to obtain software with a second version number from a first server, and update the installed software with the first version number to the software with the second version number;
the obtaining module 41 is configured to obtain a test case corresponding to the type of the software from a first server, and test the software with the second version number by using the test case;
a sending module 42, configured to send a test result to the first server;
a detecting module 43, configured to detect whether the software updating apparatus can perform a service normally if the test result indicates that the test passes.
The apparatus of this embodiment may be configured to execute the technical solution of the second server in the foregoing method embodiment, and the implementation principle and the technical effect are similar, which are not described herein again.
Fig. 5 is a first schematic structural diagram of a server according to an embodiment of the present application, including: comprising a processor 51, a memory 52 and a communication bus 53, the communication bus 53 being used for the connection of the various electronic devices, wherein,
the memory 52 is used for storing a computer program;
the processor 53 is configured to call the computer program stored in the memory to implement the method corresponding to the first server in the foregoing method embodiment.
The embodiment of the present application provides a readable storage medium, which includes a program or instructions, and when the program or instructions are run on a computer, the method corresponding to the first server in the above method embodiment is executed.
Fig. 6 is a schematic structural diagram of a server according to an embodiment of the present application, including: the system comprises a processor 61, a memory 62 and a communication bus 63, wherein the communication bus 63 is used for connecting various electronic devices; wherein,
the memory 62 is used for storing a computer program;
the processor 61 is configured to call the computer program stored in the memory to implement the method corresponding to the second server in the foregoing method embodiment.
The embodiment of the present application provides a readable storage medium, which includes a program or instructions, and when the program or instructions are run on a computer, the method corresponding to the second server in the above method embodiment is executed.
Those of ordinary skill in the art will understand that: all or a portion of the steps of implementing the above-described method embodiments may be performed by hardware associated with program instructions. The program may be stored in a computer-readable storage medium. When executed, the program performs steps comprising the method embodiments described above; and the aforementioned storage medium includes: various media that can store program codes, such as ROM, RAM, magnetic or optical disks.
Finally, it should be noted that: the above embodiments are only used for illustrating the technical solutions of the present application, and not for limiting the same; although the present application has been described in detail with reference to the foregoing embodiments, it should be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some or all of the technical features may be equivalently replaced; and the modifications or the substitutions do not make the essence of the corresponding technical solutions depart from the scope of the technical solutions of the embodiments of the present application.
Claims (18)
1. A method for updating software, applied to a first server, includes:
sending the software with the second version number to a second server so that the second server updates the installed software with the first version number into the software with the second version number;
sending a test case corresponding to the type of the software to the second server so that the second server adopts the test case to test the software with the second version number;
obtaining a test result from the second server;
if the test result indicates that the test is passed, determining whether the second server can normally carry out the service, and if so, sending the software with the second version number to each third server so that each third server updates the installed software with the first version number into the software with the second version number; the second server and each third server are servers in the same data center hardware system.
2. The method of claim 1, prior to sending the second version number of software to the second server, further comprising:
acquiring respective machine information of each server included in the data center hardware system; the machine information comprises the version number of each piece of software installed in the server and a manufacturer corresponding to each piece of software installed in the server;
and determining that the data center hardware system is provided with the software of the first version number and any server of which the manufacturer corresponding to the software is a preset manufacturer is the second server.
3. The method of claim 2, after determining the second server, further comprising:
sending request information to the second server; the request information is used for indicating the second server to stop each ongoing service.
4. The method of claim 3, further comprising:
after the second server stops each ongoing service, acquiring and storing configuration information of the second server and service data of each service from the second server;
if the test result indicates that the test passes, the method further comprises:
and sending the configuration information of the second server and the service data of each service to the second server so that the second server recovers configuration according to the configuration information and recovers each service according to each service data.
5. The method of claim 4, wherein the determining whether the second server is capable of performing normal traffic comprises:
if the first feedback information can be received every second preset time within the first preset time, determining that the second server can normally carry out the service; the first feedback information indicates that the second server can normally perform the service;
or,
if the second feedback information is not received within a third preset time length, determining that the second server can normally perform the service; the second feedback information indicates that the second server cannot normally perform the service.
6. The method of claim 4, wherein if the test result indicates that the test does not pass, sending first control information to the second server; and the first control information instructs the second server to roll back to the state before the software is updated according to the configuration information and the service data.
7. The method of claim 4, wherein if it is determined that the second server cannot normally perform the service, sending second control information to the second server; and the second control information indicates the second server to roll back to the state before the software is updated according to the configuration information and the service data.
8. A method for updating software, which is applied to a second server, comprises the following steps:
acquiring software with a second version number from a first server, and updating the installed software with the first version number into the software with the second version number;
acquiring a test case corresponding to the type of the software from a first server, and testing the software with the second version number by adopting the test case;
sending a test result to the first server;
and if the test result indicates that the test is passed, detecting whether the second server can normally carry out the service.
9. An apparatus for updating software, comprising:
the sending module is used for sending the software with the second version number to a second server so that the second server can update the installed software with the first version number into the software with the second version number;
the sending module is used for sending the test case corresponding to the type of the software to the second server so that the second server adopts the test case to test the software with the second version number;
the acquisition module is used for acquiring the test result from the second server;
the determining module is used for determining whether the second server can normally carry out the service or not if the test result indicates that the test is passed;
the sending module is further configured to send software of a second version number to each third server if it is determined that the second server can normally perform a service, so that each third server updates the installed software of the first version number to the software of the second version number; the second server and the second server are servers in the same data center hardware system.
10. The apparatus of claim 9, wherein the obtaining module is further configured to:
before the software with the second version number is sent to a second server, machine information of each server included in the data center hardware system is obtained; the machine information comprises the version number of each piece of software installed in the server and a manufacturer corresponding to each piece of software installed in the server;
and determining that the data center hardware system is provided with the software of the first version number and any server of which the manufacturer corresponding to the software is a preset manufacturer is the second server.
11. The apparatus of claim 10, the means for transmitting further configured to:
after determining the second server, sending request information to the second server; the request information is used for indicating the second server to stop each ongoing service.
12. The apparatus of claim 11, wherein the obtaining module is further configured to:
after the second server stops each ongoing service, acquiring and storing configuration information of the second server and service data of each service from the second server;
if the test result indicates that the test passes, the sending module is further configured to:
and sending the configuration information of the second server and the service data of each service to the second server so that the second server recovers the configuration according to the configuration information and recovers each service according to each service data.
13. The apparatus of claim 12, wherein the determining module is specifically configured to:
if the first feedback information can be received every second preset time within the first preset time, determining that the second server can normally carry out the service; the first feedback information indicates that the second server can normally perform the service;
or,
if the second feedback information is not received within a third preset time length, determining that the second server can normally perform the service; the second feedback information indicates that the second server cannot normally perform the service.
14. An apparatus for updating software, comprising:
the acquisition module is used for acquiring software with a second version number from a first server and updating the installed software with the first version number into the software with the second version number;
the acquisition module is used for acquiring a test case corresponding to the type of the software from a first server and testing the software with the second version number by adopting the test case;
the sending module is used for sending a test result to the first server;
and the detection module is used for detecting whether the software updating device can normally carry out the service or not if the test result indicates that the test is passed.
15. A server, comprising: a processor coupled with a memory;
the memory is used for storing a computer program;
the processor is used for calling the computer program stored in the memory so as to realize the method of any one of claims 1 to 7.
16. A readable storage medium, comprising a program or instructions for performing the method of any of claims 1 to 7 when the program or instructions are run on a computer.
17. A server, comprising: a processor coupled with a memory;
the memory is used for storing a computer program;
the processor is configured to invoke a computer program stored in the memory to implement the method of claim 8.
18. A readable storage medium, characterized by comprising a program or instructions, which when run on a computer, performs the method of claim 8.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810837430.7A CN109032643A (en) | 2018-07-26 | 2018-07-26 | The method and apparatus of software upgrading |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810837430.7A CN109032643A (en) | 2018-07-26 | 2018-07-26 | The method and apparatus of software upgrading |
Publications (1)
Publication Number | Publication Date |
---|---|
CN109032643A true CN109032643A (en) | 2018-12-18 |
Family
ID=64645781
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201810837430.7A Pending CN109032643A (en) | 2018-07-26 | 2018-07-26 | The method and apparatus of software upgrading |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN109032643A (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112685287A (en) * | 2020-11-30 | 2021-04-20 | 青岛海尔科技有限公司 | Product data testing method and device, storage medium and electronic device |
CN115378809A (en) * | 2022-08-18 | 2022-11-22 | 中国建设银行股份有限公司 | Software version upgrading method and device |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104978191A (en) * | 2015-06-24 | 2015-10-14 | 小米科技有限责任公司 | Application deployment method and server |
CN105607936A (en) * | 2015-12-25 | 2016-05-25 | 北京奇虎科技有限公司 | Server version updating method and device |
CN107391156A (en) * | 2017-07-31 | 2017-11-24 | 成都华为技术有限公司 | Method, management node and service node for distributed system transmission services |
CN108268266A (en) * | 2016-12-29 | 2018-07-10 | 中移(苏州)软件技术有限公司 | A kind of upgrade method and device |
-
2018
- 2018-07-26 CN CN201810837430.7A patent/CN109032643A/en active Pending
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104978191A (en) * | 2015-06-24 | 2015-10-14 | 小米科技有限责任公司 | Application deployment method and server |
CN105607936A (en) * | 2015-12-25 | 2016-05-25 | 北京奇虎科技有限公司 | Server version updating method and device |
CN108268266A (en) * | 2016-12-29 | 2018-07-10 | 中移(苏州)软件技术有限公司 | A kind of upgrade method and device |
CN107391156A (en) * | 2017-07-31 | 2017-11-24 | 成都华为技术有限公司 | Method, management node and service node for distributed system transmission services |
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112685287A (en) * | 2020-11-30 | 2021-04-20 | 青岛海尔科技有限公司 | Product data testing method and device, storage medium and electronic device |
CN112685287B (en) * | 2020-11-30 | 2023-11-28 | 青岛海尔科技有限公司 | Product data testing method and device, storage medium and electronic device |
CN115378809A (en) * | 2022-08-18 | 2022-11-22 | 中国建设银行股份有限公司 | Software version upgrading method and device |
CN115378809B (en) * | 2022-08-18 | 2024-04-26 | 中国建设银行股份有限公司 | Software version upgrading method and device |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US10491671B2 (en) | Method and apparatus for switching between servers in server cluster | |
US9960963B2 (en) | Dynamic client fail-over during a rolling patch installation based on temporal server conditions | |
CN105468717B (en) | Database operation method and device | |
US20160132420A1 (en) | Backup method, pre-testing method for environment updating and system thereof | |
EP2864873B1 (en) | Auto-update while running a client software application with update handshake between versions and runtime validation of the successor version | |
EP2916301A1 (en) | Self-service terminal (SST) backups and rollbacks | |
US20160342452A1 (en) | Method for checking whether hardware of intelligent terminal runs abnormally and intelligent terminal | |
CN111949551A (en) | Application program testing method, device, equipment and storage medium | |
US10880153B2 (en) | Method and system for providing service redundancy between a master server and a slave server | |
CN111897697A (en) | Server hardware fault repairing method and device | |
US10505787B2 (en) | Automatic recovery in remote management services | |
CN109032643A (en) | The method and apparatus of software upgrading | |
CN107491344B (en) | Method and device for realizing high availability of virtual machine | |
CN114237722A (en) | System starting method, device, equipment and engineering vehicle | |
CN117499412A (en) | Cluster optimization processing method based on high-availability link and related equipment thereof | |
CN106411643B (en) | BMC detection method and device | |
CN110362416A (en) | Page assembly loading method and device, electronic equipment, storage medium | |
CN114691241B (en) | Task execution method, device, electronic equipment and storage medium | |
CN107885574B (en) | Deployment method of virtual machine, service node, control device and control node | |
CN112650557B (en) | Command execution method and device | |
CN110851328B (en) | Method for detecting abnormal power failure of password card in PKCS #11 application | |
US10678558B2 (en) | Initializing a bare-metal host to an operational hypervisor | |
CN111782515A (en) | Web application state detection method and device, server and storage medium | |
CN111400094A (en) | Method, device, equipment and medium for restoring factory settings of server system | |
CN115344327B (en) | Application module switching method and device, electronic equipment and readable storage medium |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
RJ01 | Rejection of invention patent application after publication | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20181218 |