summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Do deepcopy when copying templatespike-eolstable/pikerabi2019-11-111-3/+4
| | | | | | | | | test_template is defined as a dict, so do a deepcopy instead. Change-Id: I0f7d222d5f95aa8e8ed73ae0d7a100470271e113 Closes-Bug: #1766448 (cherry picked from commit 685f95b49de6800d8ed6eebeb32ea3a1dc64fc26)
* Merge "Set stack.thread_group_mgr for cancel_update" into stable/pikeZuul2019-10-251-0/+1
|\
| * Set stack.thread_group_mgr for cancel_updaterabi2019-10-251-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In change I84d2b34d65b3ce7d8d858de106dac531aff509b7, we changed to call self._converge_create_or_update() in a sub-thread. However, thread_group_mgr is not set for cancel_update (with rollback), which in turn calls converge_stack. This patch, however, does not enable the test test_cancel_update_server_with_port, even though bug #1607714 is marked as fixed. Change-Id: Ie674fd556418f6aa8e79654458cbe43648851db2 Closes-Bug: #1713952 (cherry picked from commit 3adca03db643275ffda9c1a3203a6e88d7c9d9e2)
* | Merge "Eliminate client race condition in convergence delete" into stable/pikeZuul2019-10-256-14/+37
|\ \
| * | Eliminate client race condition in convergence deleteZane Bitter2019-10-146-14/+37
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously when doing a delete in convergence, we spawned a new thread to start the delete. This was to ensure the request returned without waiting for potentially slow operations like deleting snapshots and stopping existing workers (which could have caused RPC timeouts). The result, however, was that the stack was not guaranteed to be DELETE_IN_PROGRESS by the time the request returned. In the case where a previous delete had failed, a client request to show the stack issued soon after the delete had returned would likely show the stack status as DELETE_FAILED still. Only a careful examination of the updated_at timestamp would reveal that this corresponded to the previous delete and not the one just issued. In the case of a nested stack, this could leave the parent stack effectively undeletable. (Since the updated_at time is not modified on delete in the legacy path, we never checked it when deleting a nested stack.) To prevent this, change the order of operations so that the stack is first put into the DELETE_IN_PROGRESS state before the delete_stack call returns. Only after the state is stored, spawn a thread to complete the operation. Since there is no stack lock in convergence, this gives us the flexibility to cancel other in-progress workers after we've already written to the Stack itself to start a new traversal. The previous patch in the series means that snapshots are now also deleted after the stack is marked as DELETE_IN_PROGRESS. This is consistent with the legacy path. Change-Id: Ib767ce8b39293c2279bf570d8399c49799cbaa70 Story: #1669608 Task: 23174 (cherry picked from commit e63778efc91869efbd41e2f96b0c554aef1c80e5) (cherry picked from commit a13476e7875cca6424abe4c699c1ffc87d9ba4bb)
* | | Merge "Delete snapshots using contemporary resources" into stable/pikeZuul2019-10-253-15/+63
|\ \ \ | |/ / | | / | |/ |/|
| * Delete snapshots using contemporary resourcesZane Bitter2019-10-143-15/+63
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When deleting a snapshot, we used the current resources in the stack to call delete_snapshot() on. However, there is no guarantee that the resources that existed at the time the snapshot was created were of the same type as any current resources of the same name. Use resources created using the template in the snapshot to do the snapshot deletion. This also solves the problem addressed in df1708b1a83f21f249aa08827fa88a25fc62c9e5, whereby snapshots had to be deleted before the stack deletion was started in convergence because otherwise the 'latest' template contained no resources. That allows us to once again move the snapshot deletion after the start of the stack deletion, which is consistent with when it happens in the legacy path. Amongst other things, this ensures that any failures can be reported correctly. Story: #1669608 Task: 24279 Change-Id: I1d239e9fcda30fec4795a82eba20c3fb11e9e72a (cherry picked from commit 5ec5a061ea48efb8407b7da5b6a9055b56132ea3) (cherry picked from commit 990acd83018e929992b02786bfebc1532d017bbb)
* | Unskip StackSnapshotRestoreTestrabi2019-10-151-2/+1
|/ | | | | | | Bug #1694371 seems to be fixed now. Change-Id: I80b703742c22a253f9c198680ee3d4c9be6efab9 (cherry picked from commit 4c1dac7d3a0780354045ab9aceb4006859fbc3e9)
* Fix translate tenants in flavorricolin2019-10-041-1/+1
| | | | | | | Closes-Bug: #1719762 Change-Id: Ibb5a1d176de30bb82bb874f0d66f181251fa5b11 (cherry picked from commit 4a6aecc5df264fd5cc6c860763cea10e1ea23e23)
* Unlimited cinder quotas throws exceptionNakul Dahiwade2019-09-162-2/+22
| | | | | | | | | | | | | | Cinder-quota-resource is supposed to support a value of -1 to indicate an unlimited quota for a particular key (volumes, gigabytes or snapshots). However the implementation had an iterator error (you cannot modify a dict as you are iterating over it) and no unit tests to expose that bug. This commit fixes the issue. Change-Id: Iea28fdc38c51df5e87e6957a6e4797feea9057ee Story: 2002550 Task: 22112 (cherry picked from commit 5c2627af9e9ae02ea09de2d9eae285402ccae8cd)
* Do not perform the tenant stack limit check for admin userNakul Dahiwade2019-09-051-5/+7
| | | | | | | | | | | Removing stack creation limit for admin since admin can view all stacks, and stacks created by other tenants would have been counted in the limit check. Change-Id: Ie2e9251245e7e16309661154e17724e5984c21e6 Story: 2003487 Task: 24756 (cherry picked from commit 22b14ff975f885c26b861d4d1b22577cca189e04)
* Retry on DB deadlock in event_create()Zane Bitter2019-07-241-0/+2
| | | | | | Change-Id: I50c106a2b80a707ba8296efed86194526d6e5da6 Task: 30196 (cherry picked from commit 41b9a650dfd9a78614272a1fd8f23c617261266a)
* Add local bindep.txt and limit bandit versionElod Illes2019-07-043-1/+54
| | | | | | | | | | | | | | | | | | | | | | As it was announced [1] global bindep-fallback.txt was removed and now projects need to have a local bindep.txt to be able to install binary dependencies for testing. In test jobs the script tools/test-setup.sh is called which requires mysql and postgres servers and clients to be installed. [1] http://lists.openstack.org/pipermail/openstack-discuss/2019-June/007272.html (cherry picked from commit d116b216965bbfc80840f5bfc994b731e2d29d81) Note(elod.illes): patch was modified so that the test-requires files are kept. An upper constraint was also added for bandit. This actually freezes requirements (required by bandit) on stable branch. Change-Id: If9befe4115c64c2fda52321002ba5fe1124eaf7c (cherry picked from commit 916fd05627dddce33a577038f983e17295cc44e8) (cherry picked from commit ec50bb8fa46f909d642f1f3af4f3c3d558d11de8) (cherry picked from commit 478f752ee4a01bc9f03d99af7e15980b9e45c2db)
* Merge "Fix multi region issue for software deployment" into stable/pikeZuul2019-06-073-9/+27
|\
| * Fix multi region issue for software deploymentFeilong Wang2018-11-133-9/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Except commit Iec6f3606c9fdf8474f393b0990356f34d38bcf75 we still need this one to make sure the region name can be populated as deployment metadata. Task: 22854 Story: 2002781 Depends-On: https://review.openstack.org/#/c/617593 Change-Id: Id87935bdb1484e66f6066361d80e245d08d9ab66 (cherry picked from commit 73d5b2cabe74faa2a55deef48928b1a46658ac21)
* | Merge "Return None for attributes of sd with no actions" into stable/pikeZuul2019-06-072-7/+9
|\ \
| * | Return None for attributes of sd with no actionsRabi Mishra2019-05-312-7/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If the 'actions' property of a deployment is [], we don't create a software deployment in heat and resource_id of the software deployment is None. However, there is a possibility that we access the attributes of the sd in the template and that results in TypeError as we try to make an rpc call to show the software deployment for None. Change-Id: Iefd3cdd20bb51c63e7267ae0628e0f15544c0427 Task: 33516 (cherry picked from commit ee061103477ed7c9b4692a8b90817a127064fbcd)
* | | Merge "Fix regression with SW deployments when region not configured" into ↵Zuul2019-06-071-3/+5
|\ \ \ | | | | | | | | | | | | stable/pike
| * | | Fix regression with SW deployments when region not configuredZane Bitter2019-05-311-3/+5
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The region name eventually has to pass through an os-collect-config.conf file, the format of which is unable to distinguish between the JSON null (equivalent to None in Python) and the string "null". This means that Story 2002781 caused a regression for users who didn't have the region_name_for_services config option explicitly set in heat.conf. To avoid this, only specify the region when we know what it is. Change-Id: I23493b1c477d082c478f87167de2c1859ba5ace7 Depends-On: https://review.opendev.org/662290 Story: #2005797 Task: 33527 Task: 33528 (cherry picked from commit d580565abff2997002eff856535bdfd2ddb44da7)
* | | Blacklist bandit 1.6.0 and cap Sphinx on Python2gao.hanxiang2019-05-312-3/+5
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There's a regression[0] in bandit 1.6.0 which causes bandit to stop respecting excluded directories, and our tests throw a bunch of violations. Blacklist this version, but allow newer versions as there is already a pull request[1] to fix it, and I expect it will be included in the next release. Ignore the bandit check B413, which was added in bandit 1.5.0 and prevents importing PyCrypto. PyCrypto wasn't removed from Heat until Queens. Also fix the requirements job which was broken by https://review.opendev.org/657890 adding a cap on Sphinx on Python 2. [0] https://github.com/PyCQA/bandit/issues/488 [1] https://github.com/PyCQA/bandit/pull/489 Change-Id: Ieabcd4e8c5e5354125a63e89b9b60931c760858a Co-Authored-By: Zane Bitter <zbitter@redhat.com> Depends-On: https://review.opendev.org/662335 (cherry picked from commit 011fa22c42506e63229cca7e5fc65f81b6e0aabf)
* | Merge "Support region_name for software deployment" into stable/pikeZuul2019-05-292-4/+8
|\ \
| * | Support region_name for software deploymentFeilong Wang2019-02-032-4/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In magnum, we're running into a problem that the heat-container-agent can't get the region name. As a result, it can't get the correct Heat endpoint, which is causing problems. This patch fixes this from heat side. Task: 22661 Story: 2002781 Change-Id: Iec6f3606c9fdf8474f393b0990356f34d38bcf75 (cherry picked from commit fe7d98bdde01cbf60bbf09bf46c5c6990f6b807e) (cherry picked from commit 6b7e2585f2e7a39088f74f577ed76f141fe06fe7)
* | | OpenDev Migration PatchOpenDev Sysadmins2019-04-194-22/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit was bulk generated and pushed by the OpenDev sysadmins as a part of the Git hosting and code review systems migration detailed in these mailing list posts: http://lists.openstack.org/pipermail/openstack-discuss/2019-March/003603.html http://lists.openstack.org/pipermail/openstack-discuss/2019-April/004920.html Attempts have been made to correct repository namespaces and hostnames based on simple pattern matching, but it's possible some were updated incorrectly or missed entirely. Please reach out to us via the contact information listed at https://opendev.org/ with any questions you may have.
* | | Merge "Catch socket.timeout for connectivity error when streaming" into ↵Zuul2019-04-171-1/+3
|\ \ \ | | | | | | | | | | | | stable/pike
| * | | Catch socket.timeout for connectivity error when streamingRabi Mishra2019-02-011-1/+3
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | While fetching remote templates, if there is network issue while reading data chunks socket.timeout is raised. Change-Id: I4ebb495706ea3c505a92254b1f03e326b0fa34b6 Story: #2004686 Task: 28694 (cherry picked from commit e3d54b74fad45d786f4c80fff8af5245ecdd1713)
* | | Replace openstack.org git:// URLs with https://pike-em9.0.7Ian Wienand2019-03-242-9/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a mechanically generated change to replace openstack.org git:// URLs with https:// equivalents. This is in aid of a planned future move of the git hosting infrastructure to a self-hosted instance of gitea (https://gitea.io), which does not support the git wire protocol at this stage. This update should result in no functional change. For more information see the thread at http://lists.openstack.org/pipermail/openstack-discuss/2019-March/003825.html Change-Id: Icbf2f64cad6862e5b0617a5be6cb8b3e93971061
* | | Merge "Retry on DB deadlock when updating resource" into stable/pikeZuul2019-03-201-0/+2
|\ \ \ | |/ / |/| |
| * | Retry on DB deadlock when updating resourceZane Bitter2019-01-041-0/+2
| |/ | | | | | | | | | | | | | | | | | | | | Updating a row in the DB using UPDATE...WHERE... seems to be prone to deadlocks. We already fixed added retries for updates of the Stack table (bug 1578615); do the same with the Resource table. Depends-On: https://review.openstack.org/#/c/622853/ Change-Id: I3928f1acc3c354711a27523215784a8cf8767581 Closes-Bug: #1732969 (cherry picked from commit e919b723bc6f6604d3165d143de51715fbf057e7)
* | Merge "Fix for None base_url for Monasca client" into stable/pike9.0.6Zuul2019-01-281-0/+4
|\ \
| * | Fix for None base_url for Monasca clientJoseph Davis2018-12-141-0/+4
| |/ | | | | | | | | | | | | | | | | | | | | | | The fix done for bug 1713050 could not be backported to Pike due to the differences in monascaclient version. This commit makes a fix by including the auth_url, project_name, and project_domain_id in the Client setup parameters. Reference I154c0360946043f6dbb12ef756aa01d674f6de8f for more context. Change-Id: I9f9e6a0f393c7748d4e8a9ed1a6ec9b537d0b7fd Closes-Bug: #1713050
* | Merge "Check for server in attachements when checking for detach complete" ↵Zuul2019-01-234-6/+14
|\ \ | | | | | | | | | into stable/pike
| * | Check for server in attachements when checking for detach completerabi2018-10-094-6/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It's possible that the volume is already attached to another server, which can happen by marking a VolumeAttachment resource unhealthy after removing the volume from the server. Change-Id: Ia77e0462bf732224b491591d22584cbcfa779956 Story: #2003850 Task: 26643 (cherry picked from commit 3b59f9ad98427ea152e0d55397d102998883d429)
* | | Use fedora 29 image from nodepool mirrorRabi Mishra2019-01-236-9/+13
| |/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It seems fedora 27 cloud images are not available. Also includes a few more changes to fix the gate: - Bumps flavor for test_server_signal_userdata_format_software_config - Add heat-agents as required project We removed[1] these scripts from heat-templates. [1] https://review.openstack.org/#/c/584777/ Change-Id: I199afcbaa5050226a333779ac22aea3451f94b04 (cherry picked from commit b5333aea94237fe8388ef5bdf2f758d5fedfc887 and a2f74772e19ea5b3a1ffc7f2fb7ecfabe41e4450)
* | Merge "Update resource definitions after legacy in-place update" into ↵Zuul2018-10-243-3/+41
|\ \ | |/ |/| | | stable/pike
| * Update resource definitions after legacy in-place updateZane Bitter2018-09-263-3/+41
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since we remove a resource's definition after it is deleted, we must also update a resource's definition after it is updated. Otherwise, a resource that depended on the now-deleted resource prior to its last in-place update could remain in the template, leaving the stack inoperable since it is unable to calculate its own dependencies. We already update the template in the backup stack when updating resources in-place, and in the main stack when creating replacement resources. Also update the main template when resources are updated in-place, not just when they are replaced. Change-Id: I97ddc6a970ffd27bfd40bb8f6bec8d1cbf28a815 Story: #2003612 Task: 24946 Task: 25740 (cherry picked from commit 75c912181d75f2d4db365a784687b761694ed15a and 8bb1cef48f1b5bc06954af63f35721937919d6d2)
* | Merge "Ignore spurious nested stack locks in convergence" into stable/pikeZuul2018-10-081-4/+11
|\ \ | |/ |/|
| * Ignore spurious nested stack locks in convergenceZane Bitter2018-09-071-4/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Several operations (e.g. stack check) are yet to be converted to convergence-style workflows, and still create locks. While we try to always remove dead locks, it's possible that if one of these gets left behind we won't notice, since convergence doesn't actually use stack locks for most regular operations. When doing _check_status_complete() on a nested stack resource, we wait for the operation to release the nested stack's lock before reporting the resource completed, to ensure that for legacy operations the nested stack is ready to perform another action on as soon as the resource is complete. For convergence stacks this is an unnecessary DB call, and it can lead to resources never completing if a stray lock happens to be left in the database. Only check the nested stack's stack lock for operations where we are not taking a resource lock. This corresponds exactly to legacy-style operations. This is modified from master to inline the _should_lock_on_action() method, which does not exist on this branch. Change-Id: I4eb20ad82cc3e9434da34500fafa3880567d0959 Story: #1727142 Task: 24939 (cherry picked from commit 83ae156927f879af59d7db518f888280ef369428)
* | Merge "Unit tests: Fix mock errors with too few side effects" into stable/pikeZuul2018-09-244-80/+79
|\ \
| * | Unit tests: Fix mock errors with too few side effectsZane Bitter2018-08-104-80/+79
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When a mock hasn't been provided with a long-enough list of side-effects for the number of times it is called, it raises StopIteration (instead of something sensible like AssertionError). Prior to Python 3.7, this exception could bubble up until it just stopped a task. (In Python 3.7 it will eventually be caught and turned into a RuntimeError.) To ensure that any errors of this sort are not handled silently, and to enable us to test for them prior to using Python 3.7, catch any StopIteration errors coming from plugin-provided non-generator functions and convert them to RuntimeError exceptions. This reveals many errors in the unit tests, which are also fixed by this patch. This backport contains fewer fixes than master, because many of the errors were introduced in the process of moving from mox to mock in the Rocky release cycle. Change-Id: I5a1eff6b704dff7c17edcbbe58cdbc380ae6abc9 Story: #2003412 Task: 24553 (cherry picked from commit 38fad07c0a01072ee4e17815f6ad0e5c2ce1f64a)
* | | Merge "Ignore conditions when reparsing ResourceDefinition" into stable/pikeZuul2018-09-242-8/+26
|\ \ \
| * | | Ignore conditions when reparsing ResourceDefinitionZane Bitter2018-09-032-8/+26
| | |/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In the legacy path we reparse a resource definition to refer to a different StackDefinition when copying a resource definition into the existing template (as the resource is updated) or into the backup stack's template. However, the resources 'condition' may reference conditionals that are not defined in the template it is being copied into (e.g. during a stack update that creates a new condition), and in this case the destination template will become unusable. Since the fact that we care about the resource definition at all indicates that the condition was enabled, just ignore the condition after reparsing. This is consistent with what we do for 'if' macros, which is to resolve the condition part during reparsing. Change-Id: I59a374435f6275badc8124efbd7b7db2e36e2de5 Story: #2003558 Task: 24847 (cherry picked from commit 92101b18e260665718fb9d795c3f6ee2148f8ac5)
* | | Fix .zuul.yamlAndreas Jaeger2018-09-051-1/+0
|/ / | | | | | | | | | | | | * Remove template install-guide-jobs, it runs on specific branches and should stay in project-config. Change-Id: I54f06b902fa395cee4520db353e62a3b3a933bd9
* | import zuul job settings from project-configDoug Hellmann2018-08-281-0/+12
|/ | | | | | | | | | | | | | | | | | | | This is a mechanically generated patch to complete step 1 of moving the zuul job settings out of project-config and into each project repository. Because there will be a separate patch on each branch, the branch specifiers for branch-specific jobs have been removed. Because this patch is generated by a script, there may be some cosmetic changes to the layout of the YAML file(s) as the contents are normalized. See the python3-first goal document for details: https://governance.openstack.org/tc/goals/stein/python3-first.html Change-Id: I1d81c1b136ddc79c0470fb5dedbdcc2f1c83f636 Story: #2002586 Task: #24298
* Merge "Fixing unicode issue when to_dict is called on py2.7 env" into ↵9.0.5Zuul2018-08-082-2/+48
|\ | | | | | | stable/pike
| * Fixing unicode issue when to_dict is called on py2.7 envSeyeong Kim2018-04-192-2/+48
| | | | | | | | | | | | | | | | | | | | When using non-unicode old style user id such as Gāo Unicode error popup on py2.7 environment Fixing it on common/context.py Change-Id: I95e49f359410049ff5b254cd1b8ee16402c8719d Closes-Bug: #1761629 (cherry picked from commit 4d71926b3afc50c3f16378de260b86a85e8d721d)
* | Merge "Ignore NotFound error in prepare_for_replace" into stable/pikeZuul2018-08-062-5/+26
|\ \
| * | Ignore NotFound error in prepare_for_replacerabi2018-07-312-5/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If the port is already deleted in neutron, we don't need to do anything. Change-Id: I9275610931a174919076330ec443f54f68cc1371 Story: #2003015 Task: 23035 (cherry picked from commit 3d542935fbe7def5e785c26a1b6a8b468cfeaa48)
* | | Merge "Reset resource replaced_by field for rollback" into stable/pikeZuul2018-08-013-2/+63
|\ \ \
| * | | Reset resource replaced_by field for rollbackrabi2018-08-013-2/+63
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We seem to leave replaced_by field of a resource after rollback (if a stack cancel is issued before the replacement resource is added to the stack). This in turn results in the stack getting stuck in IN_PROGRESS for further updates. Change-Id: I3361ad90e303d24a16a943408fe0f6c406cf785f Co-Authored-By: Zane Bitter <zbitter@redhat.com> Task: #19582 Story: #2001974 (cherry picked from commit a544ce43dc8e1bcdaf7657d7f35e03464f85241e)
* | | Ignore RESOLVE translation errors when translating before_propsrabi2018-07-314-14/+57
|/ / | | | | | | | | | | | | | | | | | | | | When translating name to id, if we don't find the resource it's better to ignore the error and return the non-translated value for before properties. Change-Id: Ic25c35098cff8b68e184a336b21f2e8df70bb1ee Story: #2003015 Task: 23103 (cherry picked from commit 8c39f3bb8b08ad37cb5411b448ef2acde6345d55)