The following sequence would trigger this error: * A project merges a change which renames a zuul.d/* config file * The scheduler is restarted When the scheduler starts, it needs to read in every in-repo config file. Previously it would issue cat jobs for every project-branch in the system which would then get the list of files and their contents from the git repos. Now it relies on the cache in ZooKeeper to provide that list and their contents. That cache is updated whenever a config change merges. When that happens, Zuul knows that the cache is invalid for that project-branch, so it issues a cat job and stores the results in the cache. This is how the cache is populated (generally speaking; it is also populated on startup if any new projects or branches have been added and are not present in the cache). Because we use the results of the cat job after the change merges, the error is not observed immediately. Only later when we rely on the values in ZK does the error manifest, and that is because the contents in ZK are a superset of all the files Zuul has seen. The reason that we did not simply delete the entire contents of the project-branch cache when we invalidate it is because a cat job is run for a specific tenant, with a specific tenant-project-config (TPC). This TPC may list extra files to include for only this project in this tenant. Therefore, two cat jobs run on the same project-branch but for different tenants may return a different set of files. If we naively removed all the files, we would end up with the smallest subset in the cache, which would be incorrect. Obviously we do need to delete files if they really don't exist in the repo. We can do this safely if we delete files from the cache iff they do not appear in the set returned by the cat job, but do match the set of files we expect for this particular TPC. In that case we know that if the file really existed, the cat job would have returned it. That is what this change implements. A test is added which shuts down and restarts the scheduler in the middle of the test. This is the first such test, so a little adjustment in the test framework is needed to accommodate this. Finally, a release note is included since operators may need to perform a manual step after upgrading in order to reconcile the cache with reality. A small change is made to the file filter used when loading dynamic configs in order to make the directory matching more correct and consistent between the two cases. Change-Id: I9a1ee94cf0b55ac04a8f0cc12ac7507cab18d44b
Zuul
Zuul is a project gating system.
The latest documentation for Zuul v3 is published at: https://zuul-ci.org/docs/zuul/
If you are looking for the Edge routing service named Zuul that is related to Netflix, it can be found here: https://github.com/Netflix/zuul
If you are looking for the Javascript testing tool named Zuul, it can be found here: https://github.com/defunctzombie/zuul
Getting Help
There are two Zuul-related mailing lists:
- zuul-announce
-
A low-traffic announcement-only list to which every Zuul operator or power-user should subscribe.
- zuul-discuss
-
General discussion about Zuul, including questions about how to use it, and future development.
You will also find Zuul developers in the #zuul channel on Freenode IRC.
Contributing
To browse the latest code, see: https://opendev.org/zuul/zuul To clone the latest code, use git clone https://opendev.org/zuul/zuul
Bugs are handled at: https://storyboard.openstack.org/#!/project/zuul/zuul
Suspected security vulnerabilities are most appreciated if first reported privately following any of the supported mechanisms described at https://zuul-ci.org/docs/zuul/user/vulnerabilities.html
Code reviews are handled by gerrit at https://review.opendev.org
After creating a Gerrit account, use git review to submit patches. Example:
# Do your commits
$ git review
# Enter your username if prompted
Join #zuul on Freenode to discuss development or usage.
License
Zuul is free software. Most of Zuul is licensed under the Apache License, version 2.0. Some parts of Zuul are licensed under the General Public License, version 3.0. Please see the license headers at the tops of individual source files.
Python Version Support
Zuul requires Python 3. It does not support Python 2.
Since Zuul uses Ansible to drive CI jobs, Zuul can run tests anywhere Ansible can, including Python 2 environments.