Swift upstart mechanism is broken on controllers
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Mirantis OpenStack |
Fix Released
|
Medium
|
MOS Packaging Team | ||
5.1.x |
Fix Released
|
High
|
Alexander Nevenchannyy | ||
6.0.x |
Fix Released
|
High
|
Alexander Nevenchannyy | ||
6.1.x |
Fix Released
|
Medium
|
Alexander Nevenchannyy | ||
7.0.x |
Fix Released
|
Medium
|
MOS Packaging Team |
Bug Description
Version: 6.1, #521
Steps to reproduce:
1. Install environment with Swift (3 controllers and 2 compute nodes)
2. Check swift-object-
root@node-4:~# swift-init all status | grep replicat
object-replicator running (8320 - /etc/swift/
container-
account-replicator running (8311 - /etc/swift/
3. Check the process is running:
root@node-4:~# ps aux | grep swift-object-
root 6809 0.0 0.0 10460 944 pts/3 S+ 12:59 0:00 grep --color=auto swift-object-
swift 8320 0.2 0.0 1554688 26088 ? Ssl Jun16 3:08 /usr/bin/python /usr/bin/
root@node-4:~# service swift-object-
swift-object-
4. Kill the process and confirm it is killed:
root@node-4:~# kill 8320
root@node-4:~# ps aux | grep swift-object-
root 13225 0.0 0.0 10460 940 pts/3 S+ 13:02 0:00 grep --color=auto swift-object-
Then you can see not appropriate behavior of upstart mechanism:
1. The "service swift-xxx start/stop/status" doesn't have valid information about the process status after the process is killed:
root@node-4:~# service swift-object-
swift-object-
root@node-4:~# ps aux | grep swift-object-
root 13225 0.0 0.0 10460 940 pts/3 S+ 13:02 0:00 grep --color=auto swift-object-
root@node-4:~# service swift-object-
start: Job is already running: swift-object-
2. The pid file is still there, while it should be removed, when process is killed:
root@node-4:~# ps -ef | grep object-replicator
swift 11609 1 0 13:22 ? 00:00:01 /usr/bin/python /usr/bin/
root 22261 24310 0 13:29 pts/3 00:00:00 grep --color=auto object-replicator
root@node-4:~# kill 11609
root@node-4:~# cat /var/run/
11609
Meanwhile, if after the process is killed you will run "service stop", it will give a message "Job failed while stopping", but it will delete the pid and "service status" will work fine:
root@node-4:~# kill 11609
root@node4: service swift-object-
stop: Job failed while stopping
root@node-4:~# service swift-object-
swift-object-
root@node-4:~# cat /var/run/
cat: /var/run/
Changed in mos: | |
importance: | Undecided → Medium |
tags: | added: swift |
Changed in mos: | |
status: | New → Confirmed |
tags: | added: 6.0-mu-5 done release-notes |
tags: |
added: release-notes-done-7.0 removed: done release-notes |
tags: |
added: release-notes-done rn6.0-mu-5 rn7.0 removed: 6.0-mu-5 release-notes-done-7.0 |
tags: | added: support |
"2. The pid file is still there, while it should be removed, when process is killed" unixhelp. ed.ac.uk/ CGI/man- cgi?signal+ 7
Please check http://
Could you please suggest how to catch and process SIGKILL?