zuuls fails to reload/stop due to missing PID
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Zuul |
New
|
Undecided
|
Unassigned |
Bug Description
I've noticed zuul failing to reload the configuration and not able to stop due to a missing PID.
I investigated and root caused the issue.
Steps to reproduce:
1. Create an invalid layout.yaml file. In my case I had (abbreviated to relevant lines). Notice the "failure-message" property value on line 7 is long and doesn't have quotes:
1 includes:
2 - python-file: openstack_
3
4 pipelines:
5 - name: check
6 description: Newly uploaded patchsets enter this pipeline to receive an initial +/-1 Verified vote from Jenkins.
7 failure-message: Build failed. For information on how to proceed, see https:/
manager: IndependentPipe
2. When you install zuul this via puppet, the badly formatted file is attempted to be used by zuul. Zuul will keep running, but not the previous configuration.
3. sudo service zuul start
will succeed, the pid will exist for a few seconds, and then disappear.
zuul-server process will keep running.
4. sudo service zuul stop will fail due to missing pid.
Running manually using -d option shows the stack trace:
zuul@ci:~$ zuul-server -d
Traceback (most recent call last):
File "/usr/local/
sys.
File "/usr/local/
server.main()
File "/usr/local/
self.
File "/usr/local/
event.wait()
File "/usr/local/
self.
File "/usr/local/
self.
File "/usr/local/
data = yaml.load(
File "/usr/lib/
return loader.
File "/usr/lib/
node = self.get_
File "/usr/lib/
document = self.compose_
File "/usr/lib/
node = self.compose_
File "/usr/lib/
node = self.compose_
File "/usr/lib/
item_value = self.compose_
File "/usr/lib/
node = self.compose_
File "/usr/lib/
node.
File "/usr/lib/
node = self.compose_
File "/usr/lib/
while not self.check_
File "/usr/lib/
self.
File "/usr/lib/
if self.check_
File "/usr/lib/
self.
File "/usr/lib/
return self.fetch_value()
File "/usr/lib/
self.
yaml.scanner.
in "/etc/zuul/
Sure enough, adding quotes to line 7
Expected result is that this stack trace should be included in the zuul-debug.log file to aid in debugging and resolving.
Changed in zuul: | |
assignee: | nobody → Ramy Asselin (ramy-asselin) |
Another workaround is to verify the configuration first before attempting to reload. bin/zuul- server -t
e.g. /usr/local/
diff showing a puppet script changed to verify before reloading: /github. com/rasselin/ os-ext- testing/ commit/ bdc879da182b20c e6868cf6ad8890a f0d7c74739
https:/