CN111966413A - Configuration method and device - Google Patents
Configuration method and device Download PDFInfo
- Publication number
- CN111966413A CN111966413A CN202010820817.9A CN202010820817A CN111966413A CN 111966413 A CN111966413 A CN 111966413A CN 202010820817 A CN202010820817 A CN 202010820817A CN 111966413 A CN111966413 A CN 111966413A
- Authority
- CN
- China
- Prior art keywords
- upgraded
- target
- cloud host
- configuration parameter
- configuration
- 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
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/44—Arrangements for executing specific programs
- G06F9/4401—Bootstrapping
- G06F9/4411—Configuring for operating with peripheral devices; Loading of device drivers
Landscapes
- Engineering & Computer Science (AREA)
- Software Systems (AREA)
- Theoretical Computer Science (AREA)
- Computer Security & Cryptography (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Stored Programmes (AREA)
Abstract
The application provides a configuration method and a configuration device, wherein a configuration parameter upgrading calling request is obtained and used for indicating that the configuration parameters of a cloud host to be upgraded are adjusted, target configuration parameters carried in the configuration parameter upgrading calling request are extracted, and validity check is carried out on the target configuration parameters so as to determine whether the target configuration parameters have validity or not; if the target configuration parameter has validity, the configuration parameter of the cloud host to be upgraded is adjusted to the target configuration parameter, so that the validity of the target configuration parameter is checked in the process of dynamically adjusting the configuration parameter of the cloud host to be upgraded, the target configuration parameter configured for the cloud host to be upgraded is an effective configuration parameter, the normal operation of the cloud host to be upgraded can be ensured after the configuration parameter of the cloud host to be upgraded is adjusted to the target configuration parameter, and the success rate of online upgrade is improved.
Description
Technical Field
The present application relates to the field of data processing technologies, and in particular, to a configuration method and apparatus.
Background
With the rapid development of the cloud computing industry, higher and higher requirements are put on configuration parameters of a cloud host, so that the cloud host has higher computing processing capacity. In order to enable the cloud host to have higher computing processing capacity, configuration parameters of the cloud host, such as a virtual processor and a memory used by the cloud host, may be configured according to the current computing processing capacity, but at present, upgrading of the configuration parameters for the cloud host may have a problem of failed upgrading.
Disclosure of Invention
In view of this, an object of the present application is to provide a configuration method and an apparatus, which are used to check validity of configuration parameters of a cloud host to be upgraded in a process of dynamically adjusting the configuration parameters, so as to improve a success rate of online upgrade.
In one aspect, the present application provides a configuration method, including:
acquiring a configuration parameter upgrading calling request, wherein the configuration parameter upgrading calling request is used for indicating the adjustment of the configuration parameters of the cloud host to be upgraded;
extracting target configuration parameters carried in the configuration parameter upgrading calling request;
performing a validity check on the target configuration parameter to determine whether the target configuration parameter has a validity;
and if the target configuration parameters have validity, adjusting the configuration parameters of the cloud host to be upgraded to the target configuration parameters.
Optionally, the method further includes: and if the successful configuration parameter upgrading message is acquired, updating the configuration file of the cloud host to be upgraded based on the target configuration parameters so as to call the target configuration parameters in the configuration file in the starting process of the cloud host to be upgraded.
Optionally, the obtaining of the upgrade invoking request for the configuration parameter includes: the configuration parameter upgrading calling request is obtained through an online upgrading interface, the online upgrading interface is used for receiving the configuration parameter upgrading calling request for adjusting any configuration parameter of the cloud host to be upgraded, and the online upgrading interface corresponds to a configuration parameter checking function and a configuration parameter adjusting function;
the configuration parameter adjusting function is used for indicating the validity of the configuration parameters to be checked, and the configuration parameter adjusting function is used for indicating the adjustment of the configuration parameters of the cloud host to be upgraded.
Optionally, the checking the validity of the target configuration parameter to determine whether the target configuration parameter has validity includes:
checking the effectiveness of the number of target virtual processors in the target configuration parameters to determine whether the number of the target virtual processors is greater than or equal to the number of virtual processors currently configured by the cloud host to be upgraded and is less than the total number of virtual processors available for the cloud host to be upgraded;
if the number of the target virtual processors is greater than or equal to the number of the virtual processors currently configured in the cloud host to be upgraded and smaller than the total number of the virtual processors available for the cloud host to be upgraded, determining that the number of the target virtual processors has validity;
and/or
The checking the target configuration parameter for validity to determine whether the target configuration parameter has validity comprises:
checking the effectiveness of the target memory quantity in the target configuration parameters to determine whether the target memory quantity is greater than or equal to the currently configured memory quantity of the cloud host to be upgraded and is less than the total number of memories available for the cloud host to be upgraded;
and if the target memory number is greater than or equal to the currently configured memory number of the cloud host to be upgraded and less than the total number of the memories available for the cloud host to be upgraded, determining that the target memory number has validity.
In another aspect, the present application provides a configuration apparatus, the apparatus comprising:
the system comprises an acquisition unit, a configuration parameter upgrading calling request and a configuration parameter upgrading calling unit, wherein the configuration parameter upgrading calling request is used for indicating that the configuration parameters of the cloud host to be upgraded are adjusted;
the extracting unit is used for extracting the target configuration parameters carried in the configuration parameter upgrading calling request;
a checking unit, configured to perform validity check on the target configuration parameter to determine whether the target configuration parameter has validity;
and the processing unit is used for adjusting the configuration parameters of the cloud host to be upgraded to the target configuration parameters if the target configuration parameters have validity.
Optionally, the apparatus further comprises: and the updating unit is used for updating the configuration file of the cloud host to be upgraded based on the target configuration parameter if the configuration parameter upgrading success message is acquired, so as to call the target configuration parameter in the configuration file in the starting process of the cloud host to be upgraded.
Optionally, the obtaining unit is configured to obtain the configuration parameter upgrade call request through an online upgrade interface, where the online upgrade interface is configured to receive the configuration parameter upgrade call request for adjusting any configuration parameter of the cloud host to be upgraded, and the online upgrade interface corresponds to a configuration parameter checking function and a configuration parameter adjusting function;
the configuration parameter adjusting function is used for indicating the validity of the configuration parameters to be checked, and the configuration parameter adjusting function is used for indicating the adjustment of the configuration parameters of the cloud host to be upgraded.
Optionally, the checking unit is configured to perform validity check on the number of target virtual processors in the target configuration parameter to determine whether the number of target virtual processors is greater than or equal to the number of virtual processors currently configured in the cloud host to be upgraded and is less than the total number of virtual processors available to the cloud host to be upgraded; if the number of the target virtual processors is greater than or equal to the number of the virtual processors currently configured in the cloud host to be upgraded and smaller than the total number of the virtual processors available for the cloud host to be upgraded, determining that the number of the target virtual processors has validity;
and/or
The checking unit is used for checking the effectiveness of the target memory quantity in the target configuration parameters to determine whether the target memory quantity is greater than or equal to the currently configured memory quantity of the cloud host to be upgraded and is less than the total number of memories available for the cloud host to be upgraded; and if the target memory number is greater than or equal to the currently configured memory number of the cloud host to be upgraded and less than the total number of the memories available for the cloud host to be upgraded, determining that the target memory number has validity.
In yet another aspect, the present application provides a configuration device, including: a processor and a memory;
the processor is used for acquiring a configuration parameter upgrading calling request, wherein the configuration parameter upgrading calling request is used for indicating the adjustment of the configuration parameters of the cloud host to be upgraded, extracting target configuration parameters carried in the configuration parameter upgrading calling request, and checking the effectiveness of the target configuration parameters to determine whether the target configuration parameters have effectiveness; if the target configuration parameters have validity, adjusting the configuration parameters of the cloud host to be upgraded to the target configuration parameters;
the memory is used for storing the configuration parameters of the cloud host to be upgraded.
In still another aspect, the present application provides a storage medium having computer program code stored therein, where the computer program code realizes the above configuration method when executed.
According to the configuration method and device, the configuration parameter upgrading calling request is obtained and used for indicating the adjustment of the configuration parameters of the cloud host to be upgraded, the target configuration parameters carried in the configuration parameter upgrading calling request are extracted, and the target configuration parameters are checked for validity so as to determine whether the target configuration parameters have validity; if the target configuration parameter has validity, the configuration parameter of the cloud host to be upgraded is adjusted to the target configuration parameter, so that the validity of the target configuration parameter is checked in the process of dynamically adjusting the configuration parameter of the cloud host to be upgraded, the target configuration parameter configured for the cloud host to be upgraded is an effective configuration parameter, the normal operation of the cloud host to be upgraded can be ensured after the configuration parameter of the cloud host to be upgraded is adjusted to the target configuration parameter, and the success rate of online upgrade is improved.
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 it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
Fig. 1 is a flowchart of a configuration method provided in an embodiment of the present application;
FIG. 2 is a flow chart of another configuration method provided by embodiments of the present application;
FIG. 3 is a schematic diagram illustrating an application of a configuration method provided by an embodiment of the present application;
FIG. 4 is a schematic structural diagram of a configuration device according to an embodiment of the present disclosure;
fig. 5 is a schematic structural diagram of another configuration device provided in 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.
Referring to fig. 1, a flowchart of a configuration method provided in an embodiment of the present application is shown, which may include the following steps:
101. and acquiring a configuration parameter upgrading calling request, wherein the configuration parameter upgrading calling request is used for indicating the adjustment of the configuration parameters of the cloud host to be upgraded. The configuration parameter upgrading calling request can be obtained under the condition that the computing processing capacity of the cloud host to be upgraded is changed, the configuration parameter upgrading calling request indicates which configuration parameter of the cloud host to be upgraded is to be adjusted, the configuration parameter upgrading calling request can be executed in the normal operation of the cloud host to be upgraded, so that the configuration parameter of the cloud host to be upgraded is adjusted under the condition that the normal operation of the cloud host to be upgraded is not interrupted, and a user does not need to close or restart the cloud host to be upgraded.
The configuration parameter upgrading calling request comprises the following steps: the identifier and the target configuration parameter of the cloud host to be upgraded, such as the identifier of the cloud host to be upgraded, may be represented by, but not limited to, an ID (Identity Document) of the cloud host to be upgraded. For the cloud host to be upgraded, the number of virtual processors and the number of memories used by the cloud host to be upgraded are two main technical indexes of the cloud host to be upgraded, the performance of one cloud host to be upgraded is determined, and the adjustment of the configuration parameters of the cloud host to be upgraded is mainly performed according to the number of virtual processors and the number of memories, so the target configuration parameters in the configuration parameter upgrade call request can include but are not limited to: the system comprises the number of target virtual processors and the number of target memories, wherein the number of the target virtual processors is used for indicating the number of virtual processors used by the cloud host to be upgraded after online upgrade adjustment, and the number of the target memories is used for indicating the number of memories used by the cloud host to be upgraded after online upgrade adjustment.
In this embodiment, the identifier of the cloud host to be upgraded and the target configuration parameter in the configuration parameter upgrade invoking request may be input by a user, or selected from provided data by the user, and the content carried in the configuration parameter upgrade invoking request is not limited in this embodiment.
102. And extracting the target configuration parameters carried in the configuration parameter upgrading calling request. The configuration parameter upgrade call request can be generated by packaging according to a preset format, and the target configuration parameters, the length of the identifier of the cloud host to be upgraded, and corresponding fields can be specified in the preset format, so that the target configuration parameters are extracted from the configuration parameter upgrade call request based on the preset format, wherein the preset format is not limited in this embodiment.
103. A validity check is performed on the target configuration parameter to determine whether the target configuration parameter has a validity. Because the cloud host to be upgraded is a virtual machine running on the physical machine, some configurations of the cloud host to be upgraded are limited by the physical machine, and if the number of virtual processors used by the cloud host to be upgraded is limited by a logic core of a processor of the physical machine, in this embodiment, it is necessary to perform validity check on the target configuration parameter to check whether the target configuration parameter is a valid configuration parameter, and if the target configuration parameter is within a range defined by the configuration parameter of the physical machine where the cloud host to be upgraded is located, it is determined that the target configuration parameter is a valid configuration parameter, and the target configuration parameter has validity.
Taking the number of the virtual processors as an example, the virtual processors in the cloud host to be upgraded are simulated by logic cores on a processor of a physical machine, and one logic core corresponds to one virtual processor of the cloud host to be upgraded. For example, the number of processors of the physical machine is 2, the number of logic cores of each processor is 64, the total number of logic cores is 128, and 128 virtual processors can be simulated at most, if the number of virtual processors exceeds 128, for example, 156 virtual processors are configured to exceed the computing power of 128 logic cores, so that the computing power of the cloud host to be upgraded cannot meet the requirement, the user experience is reduced, and therefore validity check needs to be performed before configuration parameter adjustment is performed on the cloud host to be upgraded.
If the target configuration parameters include: the checking process of the number of virtual processors and/or the number of memories is as follows:
checking the effectiveness of the number of the target virtual processors in the target configuration parameters to determine whether the number of the target virtual processors is greater than or equal to the number of the virtual processors currently configured in the cloud host to be upgraded and whether the number of the target virtual processors is less than the total number of the virtual processors available in the cloud host to be upgraded; and if the number of the target virtual processors is greater than or equal to the number of the virtual processors currently configured in the cloud host to be upgraded and less than the total number of the virtual processors available for the cloud host to be upgraded, determining that the number of the target virtual processors has effectiveness.
Checking the effectiveness of the target memory quantity in the target configuration parameters to determine whether the target memory quantity is greater than or equal to the currently configured memory quantity of the cloud host to be upgraded and whether the target memory quantity is less than the total number of the memories available for the cloud host to be upgraded; and if the target memory number is greater than or equal to the current configured memory number of the cloud host to be upgraded and less than the total number of the memories available for the cloud host to be upgraded, determining that the target memory number has validity.
The number of the currently configured virtual processors is the number of the virtual processors configured by the cloud host to be upgraded before the configuration parameter is adjusted through the configuration parameter upgrading call request, the same number of the currently configured memories is the number of the memories configured by the cloud host to be upgraded before the configuration parameter is adjusted through the configuration parameter upgrading call request, and the number of the currently configured virtual processors and the number of the memories can be obtained from the configuration file of the cloud host to be upgraded.
The total number of the virtual processors available for the cloud host to be upgraded is the number of logic cores available for the physical machine where the cloud host to be upgraded is located, the number of the memories available for the cloud host to be upgraded is the number of the memories available for the physical machine where the cloud host to be upgraded is located, the number of the target virtual processors is smaller than the total number of the available virtual processors, and the number of the target memories is smaller than the total number of the available memories, so that the configuration parameters of the cloud host to be upgraded are within the range defined by the configuration parameters of the physical machine where the cloud host to be upgraded operates, namely within the bearable range of.
104. And if the target configuration parameters have validity, adjusting the configuration parameters of the cloud host to be upgraded to the target configuration parameters.
If the target configuration parameters are valid, the target configuration parameters are within the configuration parameter limit range of the physical machine where the cloud host to be upgraded is located, and the configuration parameters of the cloud host to be upgraded can be adjusted. And adjusting the configuration parameters of the cloud host to be upgraded to the target configuration parameters, which indicates that the configuration parameters of the cloud host to be upgraded are successfully upgraded, and immediately enabling the target configuration parameters to be valid, so that the cloud host to be upgraded can be reconfigured based on the target configuration parameters, for example, the virtual processors used by the cloud host to be upgraded are reconfigured based on the number of the target virtual processors.
105. And if the target configuration parameters do not have validity, forbidding to adjust the configuration parameters of the cloud host to be upgraded. If the target configuration parameters are valid, the target configuration parameters are beyond the configuration parameter limit range of the physical machine where the cloud host to be upgraded is located, and the configuration parameters of the cloud host to be upgraded are forbidden to be adjusted. If the configuration parameters of the cloud host to be upgraded are forbidden to be adjusted, the configuration parameter upgrading of the cloud host to be upgraded is failed, in this case, a configuration parameter upgrading failure message can be fed back to indicate that the target configuration parameters exceed the configuration parameter limit range of the physical machine where the cloud host to be upgraded is located, and a user can determine whether to adjust the configuration parameters of the physical machine or virtualize the cloud host to be upgraded on other physical machines by taking the configuration parameter limit range as a reference.
The configuration method comprises the steps of obtaining a configuration parameter upgrading call request, wherein the configuration parameter upgrading call request is used for indicating the adjustment of the configuration parameters of the cloud host to be upgraded, extracting target configuration parameters carried in the configuration parameter upgrading call request, and checking the effectiveness of the target configuration parameters to determine whether the target configuration parameters have effectiveness; if the target configuration parameter has validity, the configuration parameter of the cloud host to be upgraded is adjusted to the target configuration parameter, so that the validity of the target configuration parameter is checked in the process of dynamically adjusting the configuration parameter of the cloud host to be upgraded, the target configuration parameter configured for the cloud host to be upgraded is an effective configuration parameter, the normal operation of the cloud host to be upgraded can be ensured after the configuration parameter of the cloud host to be upgraded is adjusted to the target configuration parameter, and the success rate of online upgrade is improved.
Referring to fig. 2, which shows a flowchart of another configuration method provided in the embodiment of the present application, on the basis of fig. 1, the method may further include the following steps:
106. and if the successful upgrading message of the configuration parameters is acquired, updating the configuration file of the cloud host to be upgraded based on the target configuration parameters so as to call the target configuration parameters in the configuration file in the starting process of the cloud host to be upgraded.
The configuration parameter upgrade success message is obtained when the configuration parameters of the cloud host to be upgraded are adjusted to the target configuration parameters, and is used for indicating that the configuration parameters of the cloud host to be upgraded are adjusted to the target configuration parameters through the configuration parameter upgrade call request. If the successful upgrade message of the configuration parameters is obtained, the configuration file of the cloud host to be upgraded can be further updated based on the target configuration parameters, for example, the configuration parameters in the configuration file of the cloud host to be upgraded are adjusted to the target configuration parameters, for example, the number of virtual processors in the configuration file is adjusted to the number of target virtual processors, the number of memories in the configuration file is adjusted to the number of target memories, so that the management of the configuration file of the cloud host to be upgraded is realized, and the configuration parameters in the configuration file can be updated along with the upgrade call request of the configuration parameters.
The configuration file of the cloud host to be upgraded is called in the starting process of the cloud host to be upgraded, so that the adjusted configuration parameters in the configuration file can be called when the cloud host to be upgraded is started again after the configuration file is adjusted, the starting configuration of the cloud host to be upgraded is successful, and the configuration parameters are prevented from being restored to the configuration parameters before the cloud host to be upgraded is started again.
In this embodiment, the configuration parameter upgrading invoking request may be acquired through an online upgrading interface, where the online upgrading interface is configured to receive the configuration parameter upgrading invoking request for adjusting any configuration parameter of the cloud host to be upgraded, so as to provide a uniform interface for adjusting each configuration parameter externally, and when any configuration parameter in the cloud host to be upgraded is adjusted, the configuration parameter upgrading invoking request may be acquired through the online upgrading interface.
The online upgrade interface corresponds to a configuration parameter check function and a configuration parameter adjustment function, the configuration parameter adjustment function is used for indicating the validity of the check configuration parameters, the configuration parameter adjustment function is used for indicating the adjustment of the configuration parameters of the cloud host to be upgraded, so that the configuration parameters of the cloud host to be upgraded are adjusted through the configuration parameter check function and the configuration parameter adjustment function corresponding to the online upgrade interface, and the configuration parameters of the cloud host to be upgraded are adjusted through the uniform online upgrade interface.
The configuration parameter checking function and the configuration parameter adjusting function can adopt English names, and the functions of the corresponding functions can be determined by the English names, for example, the name of the configuration parameter checking function is Hotpluggcheck (), and the name of the configuration parameter adjusting function is HotpluggAction (), so that the functions of the online upgrading interface are named clearly and the input parameter meaning is clear, and the online upgrading interface is an interface with clear meaning.
The following describes the configuration method provided in this embodiment with reference to an example, where a cloud host to be upgraded is a virtual machine running in a physical machine, a Libvirt component is a component for managing virtual machine instances, and the Libvirt component can manage multiple types of virtual machine instances including QEMU (Quick Emulator, an open source simulator and a virtual machine hypervisor), so that the configuration method provided in this embodiment can be integrated in the Libvirt component, for example, an online upgrade module is provided in the Libvirt component, and a function capable of implementing the configuration method is integrated in the online upgrade module, so that the configuration method is executed by the online upgrade module, where a process of the configuration method is shown in fig. 3:
in fig. 3, the Libvirt component provides an online upgrade interface, which can be called by the Openstack component, and receives a configuration parameter upgrade call request sent by the Openstack component, where the configuration parameter upgrade call request carries target configuration parameters, and the target configuration parameters include: the number of the target virtual processors and the number of the target virtual memories are judged through an online upgrading module in the Libvirt component, whether the number of the target virtual processors is larger than or equal to the number of virtual processors currently configured in the cloud host to be upgraded and whether the number of the target virtual processors is smaller than the total number of virtual processors available in the cloud host to be upgraded; and if the number of the target virtual processors is greater than or equal to the number of the virtual processors currently configured on the cloud host to be upgraded and less than the total number of the virtual processors available for the cloud host to be upgraded, performing processor upgrading to instruct to adjust the configuration parameters of the cloud host to be upgraded, such as adding the virtual processors to the cloud host to be upgraded.
Judging whether the number of target memories is greater than or equal to the number of currently configured memories of the cloud host to be upgraded and whether the number of the target memories is less than the total number of the usable memories of the cloud host to be upgraded through an online upgrading module in the Libvirt component; and if the target memory number is more than or equal to the current configured memory number of the cloud host to be upgraded and less than the total number of the memories available for the cloud host to be upgraded, performing memory upgrading to indicate and adjust the configuration parameters of the cloud host to be upgraded, such as adding a virtual memory to the cloud host to be upgraded.
And under the condition of successful upgrading, the online upgrading module updates the configuration file of the cloud host to be upgraded, and updates the number of the virtual processors and the number of the virtual memories in the configuration file, so that the cloud host to be upgraded is used next time.
While, for purposes of simplicity of explanation, the foregoing method embodiments have been described as a series of acts or combination of acts, it will be appreciated by those skilled in the art that the present application is not limited by the order of acts or acts described, as some steps may occur in other orders or concurrently with other steps in accordance with the application. Further, those skilled in the art should also appreciate that the embodiments described in the specification are preferred embodiments and that the acts and modules referred to are not necessarily required in this application.
Referring to fig. 4, an alternative structure of a configuration apparatus provided in an embodiment of the present application is shown, which may include: an acquisition unit 10, an extraction unit 20, an examination unit 30 and a processing unit 40.
The obtaining unit 10 is configured to obtain a configuration parameter upgrade invoking request, where the configuration parameter upgrade invoking request is used to instruct to adjust a configuration parameter of a cloud host to be upgraded. The configuration parameter upgrade call request may be obtained when the computing processing capability of the cloud host to be upgraded is changed, the configuration parameter upgrade call request indicates which configuration parameter of the cloud host to be upgraded is to be adjusted, and the configuration parameter upgrade call request may be executed during normal operation of the cloud host to be upgraded, so that the configuration parameter of the cloud host to be upgraded is adjusted without interrupting the normal operation of the cloud host to be upgraded, so that a user does not need to close or restart the cloud host to be upgraded, and for the form of the configuration parameter upgrade call request, reference is made to the above method embodiment, which is not described in this embodiment.
The obtaining unit 10 may obtain the configuration parameter upgrade call request through an online upgrade interface, where the online upgrade interface is configured to receive the configuration parameter upgrade call request for adjusting any configuration parameter of the cloud host to be upgraded, and the online upgrade interface corresponds to the configuration parameter checking function and the configuration parameter adjusting function. The configuration parameter adjusting function is configured to instruct to check validity of the configuration parameters, and the configuration parameter adjusting function is configured to instruct to adjust the configuration parameters of the cloud host to be upgraded, so that the checking unit 30 may invoke the configuration parameter checking function to check validity of the target configuration parameters, and the processing unit 40 may invoke the configuration parameter adjusting function to adjust the configuration parameters of the cloud host to be upgraded.
And the extracting unit 20 is configured to extract the target configuration parameter carried in the configuration parameter upgrade invoking request. The configuration parameter upgrade call request can be generated by packaging according to a preset format, and the target configuration parameters, the length of the identifier of the cloud host to be upgraded, and corresponding fields can be specified in the preset format, so that the target configuration parameters are extracted from the configuration parameter upgrade call request based on the preset format, wherein the preset format is not limited in this embodiment.
A checking unit 30, configured to perform validity check on the target configuration parameter to determine whether the target configuration parameter has validity.
Because the cloud host to be upgraded runs on the virtual machine of the physical machine, some configurations of the cloud host to be upgraded are limited by the physical machine, and if the number of virtual processors used by the cloud host to be upgraded is limited by a logic core of a processor of the physical machine, in this embodiment, validity check needs to be performed on the target configuration parameter to check whether the target configuration parameter is a valid configuration parameter, for example, check that the target configuration parameter is within a range defined by the configuration parameter of the physical machine where the cloud host to be upgraded is located, and if the target configuration parameter is within the range defined by the configuration parameter of the physical machine, determine that the target configuration parameter is a valid configuration parameter, where the target configuration parameter has validity.
In this embodiment, the process of checking the validity of the target configuration parameter by the checking unit 30 includes, but is not limited to, the following ways:
one way, validity checks the target virtual processor number in the target configuration parameters: checking the effectiveness of the number of the target virtual processors in the target configuration parameters to determine whether the number of the target virtual processors is greater than or equal to the number of the virtual processors currently configured in the cloud host to be upgraded and whether the number of the target virtual processors is less than the total number of the virtual processors available in the cloud host to be upgraded; and if the number of the target virtual processors is greater than or equal to the number of the virtual processors currently configured in the cloud host to be upgraded and less than the total number of the virtual processors available for the cloud host to be upgraded, determining that the number of the target virtual processors has effectiveness.
In another mode, the target memory quantity in the target configuration parameters is checked for validity: checking the effectiveness of the target memory quantity in the target configuration parameters to determine whether the target memory quantity is greater than or equal to the currently configured memory quantity of the cloud host to be upgraded and whether the target memory quantity is less than the total number of the memories available for the cloud host to be upgraded; and if the target memory number is greater than or equal to the current configured memory number of the cloud host to be upgraded and less than the total number of the memories available for the cloud host to be upgraded, determining that the target memory number has validity.
The processing unit 40 is configured to adjust the configuration parameters of the cloud host to be upgraded to the target configuration parameters if the target configuration parameters have validity, and the processing unit 40 is further configured to prohibit adjustment of the configuration parameters of the cloud host to be upgraded if the target configuration parameters do not have validity.
If the target configuration parameters are valid, the target configuration parameters are within the configuration parameter limit range of the physical machine where the cloud host to be upgraded is located, and the configuration parameters of the cloud host to be upgraded can be adjusted. And adjusting the configuration parameters of the cloud host to be upgraded to the target configuration parameters, which indicates that the configuration parameters of the cloud host to be upgraded are successfully upgraded, and immediately enabling the target configuration parameters to be valid, so that the cloud host to be upgraded can be reconfigured based on the target configuration parameters, for example, the virtual processors used by the cloud host to be upgraded are reconfigured based on the number of the target virtual processors.
If the target configuration parameters are valid, the target configuration parameters are beyond the configuration parameter limit range of the physical machine where the cloud host to be upgraded is located, and the configuration parameters of the cloud host to be upgraded are forbidden to be adjusted. If the configuration parameters of the cloud host to be upgraded are forbidden to be adjusted, the configuration parameter upgrading of the cloud host to be upgraded is failed, in this case, a configuration parameter upgrading failure message can be fed back to indicate that the target configuration parameters exceed the configuration parameter limit range of the physical machine where the cloud host to be upgraded is located, and a user can determine whether to adjust the configuration parameters of the physical machine or virtualize the cloud host to be upgraded on other physical machines by taking the configuration parameter limit range as a reference.
The configuration device acquires a configuration parameter upgrading call request, wherein the configuration parameter upgrading call request is used for indicating the adjustment of the configuration parameters of the cloud host to be upgraded, extracting target configuration parameters carried in the configuration parameter upgrading call request, and checking the effectiveness of the target configuration parameters to determine whether the target configuration parameters have effectiveness; if the target configuration parameter has validity, the configuration parameter of the cloud host to be upgraded is adjusted to the target configuration parameter, so that the validity of the target configuration parameter is checked in the process of dynamically adjusting the configuration parameter of the cloud host to be upgraded, the target configuration parameter configured for the cloud host to be upgraded is an effective configuration parameter, the normal operation of the cloud host to be upgraded can be ensured after the configuration parameter of the cloud host to be upgraded is adjusted to the target configuration parameter, and the success rate of online upgrade is improved.
Referring to fig. 5, which shows an alternative structure of another configuration apparatus provided in the embodiment of the present application, on the basis of the configuration apparatus shown in fig. 4, the configuration apparatus may further include: and the updating unit 50 is configured to update the configuration file of the cloud host to be upgraded based on the target configuration parameter if the configuration parameter upgrade success message is acquired, so as to call the target configuration parameter in the configuration file in the starting process of the cloud host to be upgraded.
The configuration parameter upgrade success message is obtained when the configuration parameters of the cloud host to be upgraded are adjusted to the target configuration parameters, and is used for indicating that the configuration parameters of the cloud host to be upgraded are adjusted to the target configuration parameters through the configuration parameter upgrade call request. If the successful upgrade message of the configuration parameters is obtained, the configuration file of the cloud host to be upgraded can be further updated based on the target configuration parameters, for example, the configuration parameters in the configuration file of the cloud host to be upgraded are adjusted to the target configuration parameters, for example, the number of virtual processors in the configuration file is adjusted to the number of target virtual processors, the number of memories in the configuration file is adjusted to the number of target memories, so that the management of the configuration file of the cloud host to be upgraded is realized, and the configuration parameters in the configuration file can be updated along with the upgrade call request of the configuration parameters.
The configuration file of the cloud host to be upgraded is called in the starting process of the cloud host to be upgraded, so that the adjusted configuration parameters in the configuration file can be called when the cloud host to be upgraded is started again after the configuration file is adjusted, the starting configuration of the cloud host to be upgraded is successful, and the configuration parameters are prevented from being restored to the configuration parameters before the cloud host to be upgraded is started again.
An embodiment of the present application further provides a configuration device, where the configuration device includes: a processor and a memory.
The processor is used for acquiring a configuration parameter upgrading calling request, wherein the configuration parameter upgrading calling request is used for indicating the configuration parameters of the cloud host to be upgraded to be adjusted, extracting target configuration parameters carried in the configuration parameter upgrading calling request, and checking the effectiveness of the target configuration parameters to determine whether the target configuration parameters have effectiveness; if the target configuration parameter has validity, the configuration parameter of the cloud host to be upgraded is adjusted to the target configuration parameter, and for the execution process of the processor, reference is made to the above method embodiment, which is not described herein again.
And the memory is used for storing the configuration parameters of the cloud host to be upgraded.
The embodiment of the application also provides a storage medium, wherein the storage medium stores computer program codes, and the configuration method is realized when the computer program codes are executed.
It should be noted that, various embodiments in this specification may be described in a progressive manner, and features described in various embodiments in this specification may be replaced with or combined with each other, each embodiment focuses on differences from other embodiments, and similar parts between various embodiments may be referred to each other. For the device-like embodiment, since it is basically similar to the method embodiment, the description is simple, and for the relevant points, reference may be made to the partial description of the method embodiment.
Finally, it should also be noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
The previous description of the disclosed embodiments is provided to enable any person skilled in the art to make or use the present application. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the application. Thus, the present application is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.
The foregoing is only a preferred embodiment of the present application and it should be noted that those skilled in the art can make several improvements and modifications without departing from the principle of the present application, and these improvements and modifications should also be considered as the protection scope of the present application.
Claims (10)
1. A method of configuration, the method comprising:
acquiring a configuration parameter upgrading calling request, wherein the configuration parameter upgrading calling request is used for indicating the adjustment of the configuration parameters of the cloud host to be upgraded;
extracting target configuration parameters carried in the configuration parameter upgrading calling request;
performing a validity check on the target configuration parameter to determine whether the target configuration parameter has a validity;
and if the target configuration parameters have validity, adjusting the configuration parameters of the cloud host to be upgraded to the target configuration parameters.
2. The method of claim 1, further comprising: and if the successful configuration parameter upgrading message is acquired, updating the configuration file of the cloud host to be upgraded based on the target configuration parameters so as to call the target configuration parameters in the configuration file in the starting process of the cloud host to be upgraded.
3. The method of claim 1, wherein obtaining the configuration parameter upgrade call request comprises: the configuration parameter upgrading calling request is obtained through an online upgrading interface, the online upgrading interface is used for receiving the configuration parameter upgrading calling request for adjusting any configuration parameter of the cloud host to be upgraded, and the online upgrading interface corresponds to a configuration parameter checking function and a configuration parameter adjusting function;
the configuration parameter adjusting function is used for indicating the validity of the configuration parameters to be checked, and the configuration parameter adjusting function is used for indicating the adjustment of the configuration parameters of the cloud host to be upgraded.
4. The method of claim 1, wherein the checking the target configuration parameter for validity to determine whether the target configuration parameter has validity comprises:
checking the effectiveness of the number of target virtual processors in the target configuration parameters to determine whether the number of the target virtual processors is greater than or equal to the number of virtual processors currently configured by the cloud host to be upgraded and is less than the total number of virtual processors available for the cloud host to be upgraded;
if the number of the target virtual processors is greater than or equal to the number of the virtual processors currently configured in the cloud host to be upgraded and smaller than the total number of the virtual processors available for the cloud host to be upgraded, determining that the number of the target virtual processors has validity;
and/or
The checking the target configuration parameter for validity to determine whether the target configuration parameter has validity comprises:
checking the effectiveness of the target memory quantity in the target configuration parameters to determine whether the target memory quantity is greater than or equal to the currently configured memory quantity of the cloud host to be upgraded and is less than the total number of memories available for the cloud host to be upgraded;
and if the target memory number is greater than or equal to the currently configured memory number of the cloud host to be upgraded and less than the total number of the memories available for the cloud host to be upgraded, determining that the target memory number has validity.
5. A configuration apparatus, characterized in that the apparatus comprises:
the system comprises an acquisition unit, a configuration parameter upgrading calling request and a configuration parameter upgrading calling unit, wherein the configuration parameter upgrading calling request is used for indicating that the configuration parameters of the cloud host to be upgraded are adjusted;
the extracting unit is used for extracting the target configuration parameters carried in the configuration parameter upgrading calling request;
a checking unit, configured to perform validity check on the target configuration parameter to determine whether the target configuration parameter has validity;
and the processing unit is used for adjusting the configuration parameters of the cloud host to be upgraded to the target configuration parameters if the target configuration parameters have validity.
6. The apparatus of claim 5, further comprising: and the updating unit is used for updating the configuration file of the cloud host to be upgraded based on the target configuration parameter if the configuration parameter upgrading success message is acquired, so as to call the target configuration parameter in the configuration file in the starting process of the cloud host to be upgraded.
7. The apparatus according to claim 5, wherein the obtaining unit is configured to obtain the configuration parameter upgrade call request through an online upgrade interface, the online upgrade interface is configured to receive the configuration parameter upgrade call request for adjusting any configuration parameter of the cloud host to be upgraded, and the online upgrade interface corresponds to a configuration parameter checking function and a configuration parameter adjusting function;
the configuration parameter adjusting function is used for indicating the validity of the configuration parameters to be checked, and the configuration parameter adjusting function is used for indicating the adjustment of the configuration parameters of the cloud host to be upgraded.
8. The apparatus according to claim 6, wherein the checking unit is configured to perform validity check on a target number of virtual processors in the target configuration parameters to determine whether the target number of virtual processors is greater than or equal to a number of virtual processors currently configured by the cloud host to be upgraded and is less than a total number of virtual processors available for the cloud host to be upgraded; if the number of the target virtual processors is greater than or equal to the number of the virtual processors currently configured in the cloud host to be upgraded and smaller than the total number of the virtual processors available for the cloud host to be upgraded, determining that the number of the target virtual processors has validity;
and/or
The checking unit is used for checking the effectiveness of the target memory quantity in the target configuration parameters to determine whether the target memory quantity is greater than or equal to the currently configured memory quantity of the cloud host to be upgraded and is less than the total number of memories available for the cloud host to be upgraded; and if the target memory number is greater than or equal to the currently configured memory number of the cloud host to be upgraded and less than the total number of the memories available for the cloud host to be upgraded, determining that the target memory number has validity.
9. A configuration device, characterized in that the configuration device comprises: a processor and a memory;
the processor is used for acquiring a configuration parameter upgrading calling request, wherein the configuration parameter upgrading calling request is used for indicating the adjustment of the configuration parameters of the cloud host to be upgraded, extracting target configuration parameters carried in the configuration parameter upgrading calling request, and checking the effectiveness of the target configuration parameters to determine whether the target configuration parameters have effectiveness; if the target configuration parameters have validity, adjusting the configuration parameters of the cloud host to be upgraded to the target configuration parameters;
the memory is used for storing the configuration parameters of the cloud host to be upgraded.
10. A storage medium, characterized in that the storage medium has stored therein computer program code, which when executed implements the configuration method of any one of claims 1 to 4.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010820817.9A CN111966413A (en) | 2020-08-14 | 2020-08-14 | Configuration method and device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010820817.9A CN111966413A (en) | 2020-08-14 | 2020-08-14 | Configuration method and device |
Publications (1)
Publication Number | Publication Date |
---|---|
CN111966413A true CN111966413A (en) | 2020-11-20 |
Family
ID=73387753
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202010820817.9A Pending CN111966413A (en) | 2020-08-14 | 2020-08-14 | Configuration method and device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN111966413A (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN114461297A (en) * | 2021-12-30 | 2022-05-10 | 天翼云科技有限公司 | Method and device for adjusting processor characteristic information |
-
2020
- 2020-08-14 CN CN202010820817.9A patent/CN111966413A/en active Pending
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN114461297A (en) * | 2021-12-30 | 2022-05-10 | 天翼云科技有限公司 | Method and device for adjusting processor characteristic information |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US10212563B2 (en) | Updating web resources | |
CN107346252B (en) | Application updating method and device | |
US9525587B2 (en) | Updating web resources | |
US20170322826A1 (en) | Setting support program, setting support method, and setting support device | |
CN107480117B (en) | Recovery method and device for automatic page table single data | |
CN109634641B (en) | Application program updating method and device, electronic equipment and medium | |
CN114257551A (en) | Distributed current limiting method and system and storage medium | |
CN110908681A (en) | Method and device for upgrading software | |
CN113111669B (en) | Increment-based front-end multi-language internationalized translation method and device | |
CN111966413A (en) | Configuration method and device | |
CN111158716B (en) | Version upgrade calling method and device, computer system and readable storage medium | |
CN114675902B (en) | Management method and management device for software version based on embedded equipment | |
WO2021038335A1 (en) | Method for onboarding a network function package in onap | |
CN112882733B (en) | Application updating method and device, electronic equipment and storage medium | |
CN114490124A (en) | Method, device, equipment and medium for calling Application Programming Interface (API) | |
CN115237631A (en) | Easily-extensible data sharing system and method based on data sharing plug-in | |
CN112667491B (en) | Function test method and device for virtual machine | |
CN113687908A (en) | PMEM virtual machine creation method, device, equipment and readable storage medium | |
CN113741913A (en) | Picture configuration method, device and system and storage medium | |
CN111078257A (en) | Loading method and related device of H5 application package | |
CN109669771B (en) | Dependency environment alternation method and device | |
CN111782380B (en) | Application operation control method and device, electronic device and storage medium | |
CN112148428B (en) | Java virtual machine memory monitoring method, computer equipment and storage medium | |
CN116909645A (en) | System starting method, device, equipment and storage medium | |
CN114237885A (en) | Container resource adjusting method and device, storage medium and electronic equipment |
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 |