summaryrefslogtreecommitdiff
path: root/ironic/conductor
Commit message (Collapse)AuthorAgeFilesLines
* Merge "Do not validate driver on changing non-driver fields"Zuul2020-07-161-1/+5
|\
| * Do not validate driver on changing non-driver fieldsDmitry Tantsur2020-07-071-1/+5
| | | | | | | | | | | | This prevents setting maintenance on nodes with a broken driver. Change-Id: Ibd94d9d8ad5467f8430f77673a34507feb83da84
* | Merge "Wipe agent token during reboot or power off"Zuul2020-07-161-0/+7
|\ \
| * | Wipe agent token during reboot or power offDmitry Tantsur2020-07-151-0/+7
| | | | | | | | | | | | | | | | | | | | | Otherwise a reboot during fast-track will leave the newly booted agent without an ability to request a token. Change-Id: I963276efae5599bfed6cbb4df18e8dd3bd1b9839
* | | Merge "Fixes to skip validation of in-band deploy steps before agent boot"Zuul2020-07-161-1/+1
|\ \ \
| * | | Fixes to skip validation of in-band deploy steps before agent bootShivanand Tendulker2020-07-161-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Validation should not fail even if any deploy step requested in the deployment template is not available, unless inband deploy steps are retrieved. Change-Id: I173e6b1a8037698d41f355c7ef55f7389594be1e
* | | | Merge "Allow deleting nodes with a broken driver"Zuul2020-07-162-0/+16
|\ \ \ \ | |/ / / |/| | |
| * | | Allow deleting nodes with a broken driverDmitry Tantsur2020-07-072-0/+16
| | |/ | |/| | | | | | | | | | | | | | | | The only reason we need a driver is to stop serial console. Only try to load the driver in this case. Change-Id: I5a4e0a40659042087b7a466baae0a8c3dc136211
* | | Merge "Minor agent token log handling"Zuul2020-07-092-0/+2
|\ \ \
| * | | Minor agent token log handlingJulia Kreger2020-06-292-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Agent token heartbeat failures can return InvalidParameterValue which was missed as an expected exception of the heartbeat action. This change adds the exception to the expected list so oslo_messaging doesn't generate a backtrace in the conductor log. Change-Id: Ia3dd7bb19cbdc325acc8445c7308843067b51a2b
* | | | agent_base: support inserting in-band deploy stepsDmitry Tantsur2020-07-081-0/+7
| |_|/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently all almost all of the deployment process is contained in a single deploy step called deploy, on the deploy interface. This restricts the customisation that can be applied via deploy steps, since steps may only be added before or after this step. This change allows deploy interfaces inheriting agent_base.AgentDeployMixin to be used with in-band deploy steps. It is implemented by decomposing the reboot_and_finish_deploy call into three deploy steps: * tear_down_agent (priority 40) * switch_to_tenant_network (priority 30) * boot_instance (priority 20) All steps with priorities between 99 and 41 can run in-band. Backwards compatibility with drivers that do not support decomposed steps is maintained via a 'has_decomposed_deploy_steps' method on the agent heartbeat mixin. The old reboot_and_finish_deploy call is also left for compatibility but does nothing since the new steps will be automatically run. Change-Id: Ie4fdd195efa941165e22bd4ce9484988a1760b2d Story: #2006963 Task: #40151
* | | Merge "Log when a node should be fast-track-able but it's not"Zuul2020-07-081-5/+19
|\ \ \ | |_|/ |/| |
| * | Log when a node should be fast-track-able but it's notDmitry Tantsur2020-07-031-5/+19
| | | | | | | | | | | | Change-Id: I27fee44d8c89ed5dff310822af2a103e5e6e682c
* | | Clean up nodes in DELETING on conductor restartDmitry Tantsur2020-07-031-1/+1
|/ / | | | | | | Change-Id: Iad6cb02ee4f17b7c5987719b3a0603df210c840d
* | Merge "Fix fast-track with the direct deploy interface"Zuul2020-06-231-1/+2
|\ \
| * | Fix fast-track with the direct deploy interfaceDmitry Tantsur2020-06-191-1/+2
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Several small fixes: 1) Make sure the deploy.deploy step returns DEPLOYWAIT after running prepare_image otherwise the conductor wrongly assumes that the deploy is done. 2) Handle the case when provision_state==DEPLOYWAIT when returning from an asynchronous deploy step. 3) Do not assume that prepare_image is always the last command to run, sometimes get_deploy_steps sneaks in. 4) Do not issue a deprecation warning when receiving "agent is busy" on get_deploy_steps, this is normal for fast-track. Change-Id: I19274c48bd36fca19961a7d78467ec8c29f85905
* | Merge "Fix agent token and URL handling during fast-track deployment"Zuul2020-06-194-55/+32
|\ \
| * | Fix agent token and URL handling during fast-track deploymentDmitry Tantsur2020-06-164-55/+32
| |/ | | | | | | | | | | | | | | We wipe these fields on some conditions, most notable - on starting the deployment. Make the removal of these fields to always go through the helpers in conductor/utils (and remove an unused one). Change-Id: Idb952588bb8a6d5131764f29c6225762ba5d55cc
* | Merge "Block port deletions where vif is present"Zuul2020-06-182-11/+36
|\ \ | |/ |/|
| * Block port deletions where vif is presentJulia Kreger2020-06-022-11/+36
| | | | | | | | | | | | | | | | | | | | | | | | | | We must not allow users to be able to delete ports when a VIF record is present. If they are able to, then the user risks orphaning ports in neutron which could result in address depletion prevent the port from being able to be used again. Co-Authored-By: Madhuri Kumari <madhuri.kumari@intel.com> Story: 2006710 Task: 37074 Change-Id: I9f8eaf94a375984ea2f567f0a87c2ed1ed5cb3b7
* | Merge "If the "[conductor]XXX_timeout" is less than 0,disable periodic task"Zuul2020-06-051-9/+3
|\ \
| * | If the "[conductor]XXX_timeout" is less than 0,disable periodic taske2020-05-111-9/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | "[conductor]clean_callback_timeout","[conductor]inspect_wait_timeout" and "[conductor]inspect_wait_timeout" are a negative value will cause an error on start up from now on. Change-Id: Id3bef9a753be7f0c468ea3033698f0e9cd276a64 Story: 2007600 Task: 39576
* | | Fix fast track when exiting cleaningJulia Kreger2020-06-031-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When exiting cleaning, previously the agent token was purged from ironic's database and agents continuing to run would not be able to heartbeat to the conductor. With agent token, this would orphan the agent such that it thought it had an agent token, yet the conductor did not. Change-Id: Id6f8609bcda369649d0f677aceed26ed5e72a313
* | | Add agent_token param to docstringsRiccardo Pittau2020-05-262-0/+2
| | | | | | | | | | | | | | | | | | Where required, adding param entry for the agent_token. Change-Id: Id19f9dc542e5678600d320e0dc4de689ad1b6f95
* | | Collect ramdisk logs also during cleaningDmitry Tantsur2020-05-141-0/+5
|/ / | | | | | | Change-Id: Ia60996b4198e6fcfba6094af26498869589e175e
* | Merge "In-band deploy steps: correctly wipe driver_internal_info"Zuul2020-04-272-23/+23
|\ \
| * | In-band deploy steps: correctly wipe driver_internal_infoDmitry Tantsur2020-04-242-23/+23
| | | | | | | | | | | | | | | | | | | | | | | | Also fix a docstring and add a missing TODO. Follow-up to commit 4795c4a8b8896129228fba5a09b87d0551f6e140. Change-Id: I99c28776d135c57311c6a9d4bbd799cc2b642839 Story: #2006963
* | | Merge "Delay validating deploy templates until we get all steps"Zuul2020-04-263-19/+39
|\ \ \
| * | | Delay validating deploy templates until we get all stepsDmitry Tantsur2020-04-213-19/+39
| |/ / | | | | | | | | | | | | | | | | | | In-band steps are not known before the agent is running. Change-Id: Ib99017cdb8936714856716fcd612b49caa692459 Story: #2006963
* | | Merge "Support executing in-band deploy steps"Zuul2020-04-263-5/+24
|\ \ \ | |/ /
| * | Support executing in-band deploy stepsMark Goddard2020-04-213-5/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch introduces changes necessary to execute in-band deploy steps among the already supported out-of-band ones: * Load in-band deploy steps on the first heartbeat. * Duplicates some clean step functions and changes others to make them usable for deploy steps. * Modifies the conductor to delay validation of deploy steps and templates that may be run in-band. * Modifies the agent's execute_deploy_step to gracefully support both in-band and out-of-band steps. Co-Authored-By: Dmitry Tantsur <dtantsur@redhat.com> Change-Id: I6744029cac9b13ae1b973b19983c5605d35b7397 Depends-On: https://review.opendev.org/698770 Story: 2006963 Task: 37789
* | | Merge "Improve the command status checks in the agent's process_next_step"Zuul2020-04-231-0/+6
|\ \ \ | |/ /
| * | Improve the command status checks in the agent's process_next_stepDmitry Tantsur2020-04-161-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 1) When dealing with in-band deploy steps, the command list won't be empty on first boot, it will contain get_deploy_steps. Account for that when detecting the first boot situation. 2) Ignore priorities when checking which step is running. They may differ when an in-band step is shadowed by an out-of-band one (and IPA does not allow duplicated steps). 3) Make sure to return control to the conductor when agent doesn't have any current commands (may happen if process_next_steps is called on the first heartbeat, which will be the case for deploy steps). 4) Clarify log messages in presence of both in-band and OOB steps. Story: #2006963 Change-Id: Ie98a4138e5d960d896d00945685b686a50ae928e
* | | Merge "Release reservation when stoping the ironic-conductor service"Zuul2020-04-171-0/+2
|\ \ \ | |/ / |/| |
| * | Release reservation when stoping the ironic-conductor serviceshenxindi2020-04-101-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If a conductor hostname is changed while reservations are issued to a conductor with one hostname, such as 'hostname' and then the process is restarted with 'new_hostname', then the queries would not match the node and effectively the nodes would become inaccessible until the reservation is cleared. This patch clears the reservation when stoping the ironic-conductor service to avoid the nodes becoming inaccessible. Ref to: https://review.opendev.org/#/c/711765/ Change-Id: Id31cd30564ff26df0bbe4976ffe3f268b0dd3d7b
* | | Merge "Fix missing print format in log messages"Zuul2020-04-161-1/+1
|\ \ \
| * | | Fix missing print format in log messageszhu.fanglei2020-04-151-1/+1
| |/ / | | | | | | | | | | | | | | | | | | This is to add missing print format and add missing ws between words in log messages. Change-Id: I7a36386361b3d46fe35cd2176598029501311f3d
* | | Add my new address to .mailmapAeva Black2020-04-135-11/+12
|/ / | | | | | | | | | | | | This commit updates the mailmap file and changes my alias in a few places within old comments. Change-Id: Ica0e184109d794b8e129d567b5606d7fe84ff384
* | Merge "Add node lessee field"Zuul2020-04-071-1/+1
|\ \
| * | Add node lessee fieldTzu-Mainn Chen2020-04-071-1/+1
| |/ | | | | | | | | | | | | | | | | | | | | | | This change adds a `lessee` field to nodes, and exposes it to policy. It also updates the non-admin node list API to match for both owner and lessee; and updates the allocation conductor to match owner allocations with nodes with the appropriate lessee. Change-Id: Ib31b49c7143ec8fd6cb486fc24038215b197c418 Story: 2006506 Task: 37930
* | Merge "Nodes in maintenance didn't fail, when they should have"Zuul2020-04-072-4/+9
|\ \ | |/ |/|
| * Nodes in maintenance didn't fail, when they should haveRuby Loo2020-01-162-4/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In this code in base_manager.py, _fail_if_in_state() [1]: if the node is in maintenance, nothing is done. This means that when a node in maintenance is in mid deployment or cleaning and their conductor dies, it won't get put into a failed state [2]. This fixes it. [1] https://opendev.org/openstack/ironic/src/commit/8294afa6231629f9734f19ea5b3b0253ee9b8957/ironic/conductor/base_manager.py#L485 [2] https://opendev.org/openstack/ironic/src/commit/8294afa6231629f9734f19ea5b3b0253ee9b8957/ironic/conductor/base_manager.py#L235 Story #2007098 Task #38134 Change-Id: Ide70619271455685d09671ae16d744fc9ae58a02
* | Merge "Make deploy step failure logging indicate the error"Zuul2020-04-021-1/+4
|\ \
| * | Make deploy step failure logging indicate the errorJulia Kreger2020-04-011-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Deploy step logging would previously only log the step to the API user, instead of anything the API user could use to try and determine what is wrong. Example: - Trying to power on a machine as part of deploy.deploy() - Power-on operation fails - Only the deploy step is listed as the error, and no additional information to troubleshoot the issue, which forced the operator to go examine logs and find the error. Change-Id: If60b96dcafa446de090df56089760eda3a21109d
* | | Fix the remaining hacking issuesDmitry Tantsur2020-03-313-28/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixes W504 and E117, resulting in some indentation changes. Also fixes code that exceeds the complexity requirement, that is bumped to 20 (mostly to avoid refactoring the agent heartbeat call, resulting in conflicts for the deploy steps work). Change-Id: I8e49f2c039b0ddfca9138f8e148708b7e8b5df7e
* | | Bump hacking to 3.0.0Dmitry Tantsur2020-03-311-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The new version enables a lot of standard flake8 checks. Some of them are temporary disabled to reduce the scope of this patch: * Complexity check requires a few functions to be rewritten (apparently, it was not enabled previously). * Indentation check failures are numerous and potentially contradictive. These checks will be enabled in follow-ups. W606 is removed from excludes since we no longer hit it. Change-Id: I1e5a6f8e5e90c55cfc6f740b26c30196512d3be3
* | | Merge "Generalize clean step functions to support deploy steps"Zuul2020-03-281-8/+8
|\ \ \
| * | | Generalize clean step functions to support deploy stepsDmitry Tantsur2020-03-251-8/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This change updates various agent cleaning functions to also support deploy steps via a new step_type argument. It does not yet make it possible to run in-band deploy steps. The agent's get_clean_steps call has been modified to not fail if there are no cached steps. This is going to be normal for both cleaning and deploy in the future, and it is impossible to hit now because of the way cleaning is started. Change-Id: I789b130e7e490e23924338a024397973957272ac Story: #2006963
* | | | Merge "Raise human-friendly messages on attempt to use pre-deploy steps drivers"Zuul2020-03-282-3/+18
|\ \ \ \ | |/ / /
| * | | Raise human-friendly messages on attempt to use pre-deploy steps driversDmitry Tantsur2020-03-252-3/+18
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a follow up to commit 529c3ff06693d0a1aa13081acff92010fe855c50. It adds a proper exception on missing deploy steps and provides a proper deprecation for the compatibility code when trying to continue deploy for a node in the DEPLOYING state. Change-Id: I6dc176c12a913cb481164a90881bb1c3107b36eb Story: #2006963