summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Tear down console during unprovisioning9.1.5Jim Rollenhagen2018-05-184-25/+74
| | | | | | | | | | | | | | | | | | | | | | | Before this patch, when unprovisioning a node, the console was left running. This allowed a user to view the console even after the instance was gone. Stop the console during unprovisioning to block this. ConductorManager._set_console_mode will now bubble up any exceptions raised, so that we can explode as needed during unprovisioning. This does not have any side effects, as elsewhere it is run in it's own thread and execution was complete after handling the exception. Also change a few mock.ANY in the relevant unit tests to the actual task object, as cleanup. Conflicts: ironic/tests/unit/conductor/test_manager.py Change-Id: Iec128444d692e0b0fbc1737eb21b0e6f69b7ec1e Partial-Bug: #1769817 Story: #2002000 Task: #19634 (cherry picked from commit 7a8b26db6b48f5593786bb92cf09fa1d6afcc1ea)
* Merge "Remove too large configdrive for handling error" into stable/pikeZuul2018-04-273-5/+89
|\
| * Remove too large configdrive for handling errorHironori Shiina2018-04-253-5/+89
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When configdrive is too large, a node object cannot be saved to DB. If it happens, the node cannot moved to DEPLOYFAIL because saving the node is prevented again by the large configdrive in the object. In this case, the node gets stuck in DEPLOYING, which doesn't allow any state transition. This patch removes the configdrive from a node object when storing the configdrive fails. This also catches ConfigInvalid exception, which is mentioned in the docsting, and any unexpected exception from _store_configdrive() to avoid getting a node stuck in DEPLOYING. (cherry picked from commit 927c487a0f822ab789f38be5f895fe061e5e71cb) Change-Id: I83cf3e02622fc3ed8f5b5389f533e374c1b985f3 Closes-Bug: 1745630
* | Remove pycodestyle version pin. Add E402 and W503 to ignore.John L. Villalovos2018-04-203-3/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Rather than pinning pycodestyle, ignore the E402 and W503 error. Fix issue with E731 (Do not assign a lambda expression, use a def). W503 is something we will likely never enable as it is a personal style decision and can change depending on the code. There is no one right answer. Interestingly there is also a W504 which is the opposite check. E402 is one we should most likely fix. But it can be done in a follow patch or patches. List of various error codes: https://pycodestyle.readthedocs.io/en/latest/intro.html#error-codes Change-Id: Ie2c31a8a3c75beeef22453cab5878cf0094bdf3f (cherry picked from commit ca91d4d871bae437da2c6173e7a0aad5c3b44532)
* | Pin pycodestyle to <=2.3.1Jim Rollenhagen2018-04-111-0/+1
|/ | | | | | | | | | | | | | | | | | 2.4.0 broke our pep8 tests pretty hard: http://logs.openstack.org/20/531320/14/check/openstack-tox-pep8/c9d9d10/job-output.txt.gz#_2018-04-10_15_43_40_014738 Pin pycodestyle until we have time to fix all of those. Note that this is in the global-requirements blacklist to allow projects to manage those versions on their own: https://github.com/openstack/requirements/blob/b94a4e8c8fadbdc4c5cac9c4da6755a3c06a7824/blacklist.txt#L13 Conflicts: test-requirements.txt Change-Id: I6b0d458c702684779eb21e7022dd0f3193ac72d2 Story: 2001819 (cherry picked from commit fc15be6e329a41ab4cf634c53a54441694c41195)
* Merge "Change pxe dhcp options name to codes." into stable/pikeZuul2018-04-0911-51/+85
|\
| * Change pxe dhcp options name to codes.Vasyl Saienko2018-03-2011-51/+85
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There is difference between dhcp option names in different backends. This patch changes options name to code according to [0]. [0] https://www.iana.org/assignments/bootp-dhcp-parameters/bootp-dhcp-parameters.xhtml Closes-Bug: 1717236 This is an updated version of c377f5cbbd034e16b68a3fc30e138b03badc9c94 which problems with PXE and dnsmasq due to buggy dnsmasq code which uses siaddr field to specify tftp server. They are addressed now by always sending server-ip-address to make sure that dnsmasq works. More information about siaddr and option 150,66 can be found in informational RFC https://tools.ietf.org/html/rfc5859 Change-Id: I55487d867979bf6bb4cf228fcf6408beae955d2b (cherry picked from commit 228a2a7885e1b04d4180fe8daa2992884decaf6d)
* | Merge "Gate: run ironic tests in the regular multinode job" into stable/pike9.1.4Zuul2018-04-011-0/+4
|\ \
| * | Gate: run ironic tests in the regular multinode jobDmitry Tantsur2018-03-281-0/+4
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We don't specify any regex for this job, so it runs some tests. They only include test_network_basic_ops, which does not check that multitenancy is in effect. We have a test for it in ironic-tempest-plugin, but it does not run anywhere. There is a neutron test for the same, but it's not a smoke test and it has been skipped for quite some time. This change switches this job to the run the following tests: * all ironic tests (that are not skipped for any reason) * multinode tests from Nova Unfortunately, this patch uncovers that we don't run any tests for network attach/detach in practice. The devstack plugin has to be updated first to support more than one port per node. A TODO is left in the playbook. Change-Id: I46d94c29f858977604c0a3430257eca2bee977e3 (cherry picked from commit 5f03daf21f705a1002a4e06393b803005a8921cd)
* | Allow Swift endpoint overrideJacek Tomasiak2018-03-274-0/+27
|/ | | | | | | | | | | | | | | | | | | Swiftclient uses public endpoint by default. Ironic uses the base URL from Swift connection to build TempURLs for generated images. Some drivers (e.g. iLO) use those TempURLs to mount images as vmedia. With public URLs it will fail if the BMC doesn't have access to the public network. This change introduces an option to explicitly set the endpoint URL used for Swift. This is a stable-only change as the problem is fixed by refactoring changes in later releases. This is the only version where Ironic uses public Swift endpoints and there is no option to override this. Change-Id: I639a421fa06fff7ab07b8eab557531b8f36c5ed9 Closes-Bug: #1755164 Related-Bug: #1699547
* Don't validate local_link_connection when port has client-idMoshe Levi2018-03-083-0/+40
| | | | | | | | | | | | | | Infiniband ports do not require the local_link_connection field to be populated as the network topology is discoverable by the Infiniband Subnet Manager. This change removes the requirement for local_link_connection for Infiniband ports. Infiniband ports have a client-id in their extra field. Closes-Bug: #1753222 Change-Id: I2bfac4ccaf825bd9aa8ea0d2b447fcd7767acbc5 (cherry picked from commit dcebb77d9d7a2cebcc645dd632a12d224bd113c8)
* Clean nodes stuck in CLEANING state when ir-cond restartsZhenguo Niu2018-02-204-41/+64
| | | | | | | | | | | | | | When a conductor managing a node dies abruptly mid cleaing, the node will get stuck in the CLEANING state. This also moves _start_service() before creating CLEANING nodes in tests. Finally, it adds autospec to a few places where the tests fail in a mysterious way otherwise. Change-Id: Ia7bce4dff57569707de4fcf3002eac241a5aa85b Co-Authored-By: Dmitry Tantsur <dtantsur@redhat.com> Partial-Bug: #1651092 (cherry picked from commit 2921fe685d8f096717f8795494c1032025407fe4)
* Allow sqalchemy filtering by id and uuidRyan Bridges2018-02-193-12/+40
| | | | | | | | | | | | | | | | | | | | | | | These additions will allow us to filter nodes by node uuid and id. This filter API is used in many places throughout the code base. It is natural to expect that this API would allow us to filter by node id and uuid in addtion to the other supported parameters. This also fixes a 3 year old bug. This change from lucasagomes has a bug: https://review.openstack.org/#/c/197141/ In conductor/manager.py, he calls _fail_if_in_state() and uses the node_id as a filter. However this filter effectively does nothing because sqalchemy does not know how to filter by node id on the backend. My changes fix this problem and make the API more intuitive Closes-Bug: #1749755 Change-Id: I4efc0d5cd5d5d6108a334f954e1718203b47da0a (cherry picked from commit 366a44a1bb4e235f6382af02962ba2a192cffa4d)
* Merge "Zuul: Remove project name" into stable/pikeZuul2018-02-131-1/+0
|\
| * Zuul: Remove project nameJames E. Blair2018-02-121-1/+0
| | | | | | | | | | | | | | Zuul no longer requires the project-name for in-repo configuration. Omitting it makes forking or renaming projects easier. Change-Id: I0778500de4479d3654a998639a4e3b1e69d2d5ae
* | Merge "Do not pass credentials to the ramdisk on cleaning" into stable/pike9.1.3Zuul2018-02-085-5/+34
|\ \
| * | Do not pass credentials to the ramdisk on cleaningDmitry Tantsur2018-02-075-5/+34
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently the driver_info is passed as is to the ramdisk when calling get_clean_steps or execute_clean_step. This may lead to their exposure, as ironic<->ramdisk communication is currently not secure. This change applies the same logic we use in the API to filter the fields. Change-Id: I4fd44786fea6c7092d2b0029cea6d680d31babde Closes-Bug: #1744836 (cherry picked from commit c2185469c4a9246fa62ceae76676a08ed84e686d)
* | | Merge "Use zuul.override_checkout instead of custom branch_override var" ↵Zuul2018-02-0711-15/+11
|\ \ \ | | | | | | | | | | | | into stable/pike
| * | | Use zuul.override_checkout instead of custom branch_override varSam Betts2018-02-0511-15/+11
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | To override the branch correctly in both zuulv3's playbook loading we have to use override_checkout in the job. This variable already gives us the information we need to set the override branch, so use that instead of the custom branch_override variable so we don't have to define it twice in the job. Change-Id: Iec7be918f75e3400197748385b287fb945d761ac (cherry picked from commit dcc5546b49ad7a791a00284999e6db4a802792b1)
* | | [Devstack] Replace tap with vethVasyl Saienko2018-02-063-8/+13
|/ / | | | | | | | | | | | | | | | | | | | | This patch replace tap interfaces by veth pairs which ensures that port is always present in ovs even when VM is powered off. Closes-Bug: #1722158 Change-Id: I04ff6a97bebf15636a794b51f748c62eda627d36 (cherry picked from commit f357c76cd508ac53844141602c4ba0127b63a7de)
* | Merge "Add no-vendor interface to the idrac hardware types" into stable/pikeZuul2018-02-013-2/+15
|\ \
| * | Add no-vendor interface to the idrac hardware typesDmitry Tantsur2018-01-053-2/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Vendor interfaces must not be mandatory. Missing no-vendor implementation means that we require operators to enable the idrac vendor interface when the idrac hardware type is enabled. Change-Id: I6768a37bc268e367eaf93b12660a80d31eeca0c0 Closes-Bug: #1732166 (cherry picked from commit 4432fa9950f8300604528ae9b519bc78db37a768)
* | | Be more sane about cleaningJulia Kreger2018-01-313-1/+3
| |/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Seems that by default we now run cleaning on all jobs. However, this is extremely wasteful and time consuming. Also, if a cloud is IO resource constrained, it can result in jobs failing erroneously due to unpredictable IO performance, particularly with the multinode jobs. As such, slightly extend the wait timeout before we fail for nodes not being ready, and flag multinode jobs not to run cleaning. Change-Id: I12011743fa197caef08a3d6d1297d662dfa7640a (cherry picked from commit 904f44522b665da52ec44133fbb8fc46c00d0105)
* | Do not validate root partition size for whole disk images in iscsi deployDmitry Tantsur2018-01-163-0/+24
|/ | | | | | | | | On whole disk images a root partition is already created and populated, so validating its size makes no sense. We don't do it for direct deploy. Change-Id: I7a4114979afb310aeb77f99fbcf09ef7c54862d6 Closes-Bug: #1742451 (cherry picked from commit a7623d92dc4d7c7bcc436656b93c8fe963e79bfd)
* Use the tempest plugin from openstack/ironic-tempest-pluginJohn L. Villalovos2017-12-1412-116/+40
| | | | | | | | | | | | | | | | Follow-on patch will delete the openstack/ironic/ironic_tempest_plugin/ directory. But this will need to be done after this patch has been backported to the stable branches, otherwise the stable branches will break. Conflicts: playbooks/legacy/tempest-dsvm-ironic-ipa-partition-pxe_ipmitool-tinyipa-python3/run.yaml playbooks/legacy/tempest-dsvm-ironic-ipa-resourceclasses-partition-pxe_ipmitool-tinyipa/run.yaml playbooks/legacy/tempest-dsvm-ironic-pxe_ipa-full/run.yaml zuul.d/legacy-ironic-jobs.yaml Change-Id: I31bb088679ea122efaa91d362e613edb74c14254 (cherry picked from commit cf8b62e86b00bd4a5fe3bea4beaabbcc0cabd2d0)
* Remove experimental jobs and sort job definitions in project.yamlJohn L. Villalovos2017-11-0810-683/+16
| | | | | | | | | | | | | | | | | | Remove the experimental jobs as they are not used in stable/pike Remove the non-voting job: tempest-dsvm-ironic-ipa-partition-pxe_ipmitool-tinyipa-python3 as we did not get Python 3 support working in the Pike cycle. Sort the job definitions in in project.yaml to make it easier to compare and view. Move non-voting jobs to end of list. Delete unused playbooks due to deleting experimental jobs and the Python 3 job. Change-Id: Ia5c004bfde752f17d02ed784bd34cd9a60b6ff71
* Make the api format correctlyshuangyang.qian2017-11-081-5/+8
| | | | | | | | | make the format of the api:"Detach VIF from a node" normally and add the Request header of the parameters' table. Change-Id: Ica77a99439d9819f629c7f64c2906e5aa2cb5ddc (cherry picked from commit ff0970f3085115783abf11b24780022a2dd30fcc)
* Merge "Ensure ping actually succed" into stable/pikeZuul2017-11-031-8/+16
|\
| * Ensure ping actually succedVasyl Saienko2017-11-021-8/+16
| | | | | | | | | | | | | | Check return value from ping_ip_address() and make sure it is True Change-Id: I45d03ac02731935395dd69e10a835cd2950d0f5f (cherry picked from commit f4fc9a044cd6ffd853e874f8dd678287bc67ef79)
* | Merge "Add missing job to gate" into stable/pikeZuul2017-11-031-5/+6
|\ \ | |/ |/|
| * Add missing job to gateRuby Loo2017-10-301-5/+6
| | | | | | | | | | | | | | | | | | | | | | | | The job ironic-tempest-dsvm-ipa-wholedisk-bios-agent_ipmitool-tinyipa is done in the check queue, but wasn't being done in gate. This adds it to gate. To make it easier to detect mismatches between the jobs in check vs gate, the jobs are reordered so that they are in the same order in check and gate, and the non-voting ones are grouped together. Change-Id: Ic3d2571394be0e2b1eb73c044e1aea0ecdd3c864
* | Add job definitions yaml to zuul configurationVladyslav Drok2017-10-301-0/+197
|/ | | | | | | Due to the recent changes to zuulv3, we now need job definitions in addition to project definition and playbooks on stable branches. Change-Id: I22a7417847e18f34e8c9f2c84b8d3b7803740402
* Merge "[bfv] Set the correct iqn for pxe" into stable/pike9.1.2Zuul2017-10-253-4/+31
|\
| * [bfv] Set the correct iqn for pxeDerek Higgins2017-10-193-4/+31
| | | | | | | | | | | | | | | | Set the initiator iqn to the connecting node not the target. Closes-Bug: #1724275 Change-Id: Ife5570c2eebeded360ace8d37c699726b2661d44 (cherry picked from commit 217b3f84ac96497d6ea5871a8ea824170368026c)
* | Merge "Move ironic legacy jobs into the ironic tree" into stable/pikeZuul2017-10-2331-0/+2674
|\ \
| * | Move ironic legacy jobs into the ironic treeSam Betts2017-10-2031-0/+2674
| |/ | | | | | | | | | | | | | | | | | | | | | | This patch moves the legacy ironic CI jobs into the ironic tree instead of storing them in openstack-infra/openstack-zuul-jobs to give us control as we migrate the legacy jobs to the new ansible roles. This also removes branch specifics from project.yaml, leaving only the jobs we need to run on current release. Change-Id: Ib728fadbdab2eb9f1ba5112297a32dbdbfd1d5fd (cherry picked from commit 4b37c29b5e180d68e744e8114e2f414023d1376a)
* | Merge "Finish the guide on upgrading to hardware types" into stable/pikeZuul2017-10-231-25/+38
|\ \
| * | Finish the guide on upgrading to hardware typesDmitry Tantsur2017-10-201-25/+38
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This change adds missing information about the iDrac, CIMC and UCSM drivers, as well as socat variants of the ipmitool drivers. Added a column for the inspect interface. The resulting table is sorted by the classic driver name to reflect how people are likely to use it. Change-Id: I645c0a2a33dedecce37796a7eef7480dceef262a (cherry picked from commit 87e142f6cee53c65c21fd2b797547f3e93886005)
* | | Merge "Documentation for 'oneview' hardware type" into stable/pikeZuul2017-10-232-14/+131
|\ \ \ | |/ /
| * | Documentation for 'oneview' hardware typeFellype Cavalcante2017-10-202-14/+131
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Updated driver documentation for ``oneview`` hardware type for boot, console, deploy, inspect, management and power interfaces. Co-Authored-By: Xavier <marcusrafael@lsd.ufcg.edu.br> Change-Id: I08a3b4b43ce9518b0b783a3da5c47a3733587666 Closes-Bug: 1715885 (cherry picked from commit 692d291ecaa2e83f4ad360464690287dc8701f1f)
* | | Merge "Upgrade guide for `snmp` hardware type" into stable/pikeZuul2017-10-231-0/+1
|\ \ \ | |/ /
| * | Upgrade guide for `snmp` hardware typeShivanand Tendulker2017-10-201-0/+1
| |/ | | | | | | | | | | Change-Id: Iec4743e8f3502033111ea984a2d59d75ff4d9357 Closes-Bug: #1704977 (cherry picked from commit 130602b83ff6b500c475dbf0d3c989ff23019b22)
* | [docs] describe vendor passthru in hw typesPavlo Shchelokovskyy2017-10-201-0/+44
|/ | | | | | | | | add a `Vendor` section to `Upgrade to Hardware Types` page that describes changes to take when migrating a classic driver that was using a `VendorMixin` functionality to a hardware type. Change-Id: Ic2b80726165f960c4b71d396c2dc5078eda4ead2 (cherry picked from commit 522e95dbc5501be46c556c469848dd57ba22b9a7)
* Merge "ipmitool: reboot: Don't power off node if already off" into stable/pikeZuul2017-10-195-11/+64
|\
| * ipmitool: reboot: Don't power off node if already offJohn L. Villalovos2017-10-015-11/+64
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Commit ee5d4942a1c33736ffe05ec01619142be400c2f4 changed the existing behavior so that if an ipmitool command fails when attempting to set the power state it causes a failure. The problem with that approach is that on some systems if the system is already in the desired power state, an error will be generated when ipmitool tries to change it to the desired power state. Now when doing a reboot command we check beforehand to see if the node is already off, if so then don't attempt to power off the node again. Also optimize ironic/conductor/utils.py node_power_action() so that it only checks a node's power status if it might perform an action based on the node's power status. Change-Id: If838aae871753ebfbdf359e0bbe3afcc54c4b559 Closes-Bug: #1718794 (cherry picked from commit 8ceaad42ff363581efd2f43737456d479ea980d7)
* | Merge "Reduce complexity of node_power_action() function" into stable/pikeZuul2017-10-192-25/+190
|\ \ | |/
| * Reduce complexity of node_power_action() functionJohn L. Villalovos2017-10-012-25/+190
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | While attempting to modify the node_power_action() function it caused the complexity to exceed the 'pep8' check limits. This patch reduces the complexity of the node_power_action() function by refactoring it. This will allow future changes to node_power_action() to be allowed. Added unit tests to test the functions that were pulled out. This patch is required to be back-ported in order to back-port the commit 8ceaad42ff363581efd2f43737456d479ea980d7. Change-Id: I7f84ff23401997c2b92759c306a7bff0589c7f4c (cherry picked from commit 0d788525dfa0a7dee11b005318478a7cee597055)
* | Fix mis-formatted log messagesJohn L. Villalovos2017-10-103-2/+3
|/ | | | | | | | | | | | | Fix errors in log messages. These were detected by a patch that catches these types of errors. Submitting these fixes first as the patch to detect the errors will likely take more time to get merged. Conflicts: ironic/drivers/modules/oneview/deploy_utils.py Closes-Bug: #1722597 Change-Id: Ibe451f9cd97971cb83366fdc6f7f5c31d2af4793 (cherry picked from commit df5da4ce7a32e64e34a489b741bd911f9c55ea34)
* Adds more exception handling for ironic-conductor heartbeatD G Lee2017-09-263-0/+25
| | | | | | | | | | | | | | When heartbeat thread of ironic-conductor server is reporting heartbeat, it will be interrupted by database exceptions except 'DBConnectionError'. So add 'Exception' in _conductor_service_record_keepalive to catch all possible exceptions raised from database to ensure the heartbeat thread not to exit. And also log the exception information. When the database recovers from an exception, heartbeat thread will continue to report heartbeat. Change-Id: I0dc3ada945275811ef7272d500823e0a57011e8f Closes-Bug: #1696296 (cherry picked from commit 56b8eae918fe525b16979eed5fbba1c525356030)
* Document setting discover_hosts_in_cells_interval in nova.confDmitry Tantsur2017-09-202-11/+30
| | | | | | | | | | | By default, starting with Ocata, an operator needs to run a nova-manage command after each node is enrolled to make sure it's correctly mapped to a cell. This is not something we can ask in all cases (especially if Ironic UI is used), so let us document running a periodic task for it instead. Change-Id: I0c7bf29b0e27bef7205880ebc164d3a82e7b0be8 Closes-Bug: #1715646 (cherry picked from commit 2427ffca8bd0e2ab5127020ae6ffea9decfdc915)