Bug 917657 - Swift services don't contain "openstack-swift-" in the `status`
Summary: Swift services don't contain "openstack-swift-" in the `status`
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat OpenStack
Classification: Red Hat
Component: openstack-swift
Version: 2.0 (Folsom)
Hardware: x86_64
OS: Linux
unspecified
medium
Target Milestone: snapshot1
: 3.0
Assignee: Pete Zaitcev
QA Contact: Jaroslav Henner
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-03-04 13:21 UTC by Jaroslav Henner
Modified: 2016-04-26 13:42 UTC (History)
3 users (show)

Fixed In Version: openstack-swift-1.7.4-12.el6ost
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-05-29 15:04:44 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
Candidate 1 (16.21 KB, patch)
2013-04-09 03:48 UTC, Pete Zaitcev
apevec: review+
Details | Diff


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2013:0878 0 normal SHIPPED_LIVE Red Hat OpenStack 3.0 ("Grizzly") Preview bug fix and enhancement update 2013-05-29 19:01:24 UTC

Description Jaroslav Henner 2013-03-04 13:21:03 UTC
Description of problem:


Version-Release number of selected component (if applicable):
openstack-swift-1.7.4-9.el6ost.noarch

How reproducible:
Always

Steps to Reproduce:
1.
2.
3.
  
Actual results:
for svc in /etc/init.d/openstack*; do $svc status; done
openstack-nova-compute (pid  5899) is running...
account-server (pid  3912) is running...
account-auditor (pid  5166) is running...
account-reaper (pid  5172) is running...
account-replicator (pid  3930) is running...
container-server (pid  3839) is running...
container-auditor (pid  5186) is running...
container-replicator (pid  3774) is running...
container-updater dead but pid file exists
object-server (pid  4007) is running...
object-auditor dead but pid file exists
object-replicator (pid  4025) is running...
object-updater dead but pid file exists


Expected results:
for svc in /etc/init.d/openstack*; do $svc status; done
openstack-nova-compute (pid  5899) is running...
openstack-swift-account-server (pid  3912) is running...
openstack-swift-account-auditor (pid  5166) is running...
openstack-swift-account-reaper (pid  5172) is running...
openstack-swift-account-replicator (pid  3930) is running...
openstack-swift-container-server (pid  3839) is running...
...

Additional info:

Comment 1 Pete Zaitcev 2013-03-04 20:03:28 UTC
Wait a moment, do you want openstack-swift-account return openstack-swift-account or openstack-swift-account-server?

Comment 2 Ayal Baron 2013-03-12 13:37:42 UTC
Pete, on the face of it this sounds like an easy fix?

Comment 3 Pete Zaitcev 2013-03-13 03:09:32 UTC
Code-wise it's not hard. But it's unpleasant.

Currently out scripts punt status to swift-init, which comes from upstream
and has no idea that we renamed all the services. So, I see two possible
approaches:

 1. Patch swift-init to print openstack-blah to match. I do not see
upstream agreeing to this, so it's going to be a patch to carry forever.

 2. Reimplement status checking in scripts. It's just reading some PID
files and issuing kill -0. It's not entirely future-proof.

So frankly I was going to ask Jaroslav if we could just WONTFIX this,
unless this is needed for some kind of systemd thingie.

Comment 4 Ayal Baron 2013-03-13 19:21:07 UTC
(In reply to comment #3)
> Code-wise it's not hard. But it's unpleasant.
> 
> Currently out scripts punt status to swift-init, which comes from upstream
> and has no idea that we renamed all the services. So, I see two possible
> approaches:
> 
>  1. Patch swift-init to print openstack-blah to match. I do not see
> upstream agreeing to this, so it's going to be a patch to carry forever.
> 
>  2. Reimplement status checking in scripts. It's just reading some PID
> files and issuing kill -0. It's not entirely future-proof.
> 
> So frankly I was going to ask Jaroslav if we could just WONTFIX this,
> unless this is needed for some kind of systemd thingie.

Ok, doesn't seem worth the hassle at this point.
If we can try upstream to rename, great.  If not, I think we can close wontfix.

Comment 5 Pete Zaitcev 2013-04-09 03:48:33 UTC
Created attachment 732960 [details]
Candidate 1

Okay, I was utterly wrong about the way our scripts worked. To make little
amends, here's the fix for the original problem.

Note, however, that the bug report expressed a desire to see status for
"openstack-swift-object-server", but this just makes no sense: the executable
is called "swift-object-server", while service is "openstack-swift-object".

Also, $(basename $0) is not used on purpose: we have the name in meta-
comments already, so it's copypasted from there, to ensure once again.

Comment 10 Pete Zaitcev 2013-05-09 00:02:08 UTC
I think I committed it... The branches confuse me. The "git push" said:

Total 18 (delta 17), reused 0 (delta 0)
remote: *** No rules for rh-grizzly-rhel-6.  Happy hacking!
To ssh://zaitcev.redhat.com/rpms/openstack-swift
   835556a..3ea78a1  rh-grizzly-rhel-6 -> rh-grizzly-rhel-6

Okay?

Modified in openstack-swift-1.4.7-12.

Comment 12 Jaroslav Henner 2013-05-20 10:38:49 UTC
Working.

for svc in /etc/init.d/openstack-swift*; do echo $svc; $svc status; echo; done
/etc/init.d/openstack-swift-account
openstack-swift-account (pid  30753) is running...

/etc/init.d/openstack-swift-account-auditor
openstack-swift-account-auditor (pid  30782) is running...

/etc/init.d/openstack-swift-account-reaper
openstack-swift-account-reaper (pid  30810) is running...

/etc/init.d/openstack-swift-account-replicator
openstack-swift-account-replicator (pid  30838) is running...

/etc/init.d/openstack-swift-container
openstack-swift-container (pid  31036) is running...

/etc/init.d/openstack-swift-container-auditor
openstack-swift-container-auditor (pid  31065) is running...

/etc/init.d/openstack-swift-container-replicator
openstack-swift-container-replicator (pid  31093) is running...

/etc/init.d/openstack-swift-container-updater
openstack-swift-container-updater (pid  31008) is running...

/etc/init.d/openstack-swift-object
openstack-swift-object (pid  30937) is running...

/etc/init.d/openstack-swift-object-auditor
openstack-swift-object-auditor (pid  30880) is running...

/etc/init.d/openstack-swift-object-replicator
openstack-swift-object-replicator (pid  30909) is running...

/etc/init.d/openstack-swift-object-updater
openstack-swift-object-updater (pid  30966) is running...

Comment 14 errata-xmlrpc 2013-05-29 15:04:44 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

http://rhn.redhat.com/errata/RHBA-2013-0878.html


Note You need to log in before you can comment on or make changes to this bug.