Swift-init mistakes an unrelated process for a swift process, which starts with the same pid
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack Object Storage (swift) |
Fix Released
|
Undecided
|
Takashi Kajinami |
Bug Description
Swift-init uses pid files to detect existing swift processes by pid.
However, it mistakes an unrelated process for a swift process and makes a wrong decision, when an unrelated process starts with the same pid after an swift process unfortunately dies without removing its pid file.
Here I show a detailed sequence.
1. Swift process starts with pid P0 when an operator first starts it with swift-init.
2. Swift process unfortunately dies, without removing its pid file.
3. Another process, not swift process, starts with the same PID P0.
4. The operator tries to start the dead swift process with swift-init.
5. Swift-init finds the pid file and mistakes the unrelated process for an living swift process and never starts the swift process.
Changed in swift: | |
assignee: | nobody → Takashi Kajinami (kajinamit) |
status: | New → In Progress |
Changed in swift: | |
milestone: | none → 2.4.0 |
status: | Fix Committed → Fix Released |
Reviewed: https:/ /review. openstack. org/116203 /git.openstack. org/cgit/ openstack/ swift/commit/ ?id=ab9f63402de 6d554528699a029 55854ac28264c5
Committed: https:/
Submitter: Jenkins
Branch: master
commit ab9f63402de6d55 4528699a0295585 4ac28264c5
Author: Takashi Kajinami <email address hidden>
Date: Mon Nov 24 21:44:03 2014 +0900
Add process name checking into swift-init
Swift-init uses pid files to detect existing swift processes by pid.
However, it mistakes an unrelated process for a swift process and makes
a wrong decision, when the unrelated process is running with pid written
in swift pid files.
This patch adds process name checking into swift-init and enable it to remove
invalid pid files in such situation.
Change-Id: Ibca026bdfbdacd d92c8763e1eb15d 98293c70656
Closes-Bug: #1327106