Bug 758651

Summary: service katello start - on busy port 5000 returns 0 (ok)
Product: [Retired] Katello Reporter: Garik Khachikyan <gkhachik>
Component: InfrastructureAssignee: Miroslav Suchý <msuchy>
Status: CLOSED UPSTREAM QA Contact: Katello QA List <katello-qa-list>
Severity: low Docs Contact:
Priority: low    
Version: 1.0CC: bkearney, cwelton, lzap, mkoci, msuchy
Target Milestone: ---Keywords: Triaged
Target Release: 1.x   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: katello-1.1.10 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-10-29 14:30:16 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Bug Depends On:    
Bug Blocks: 752863    

Description Garik Khachikyan 2011-11-30 10:55:12 UTC
Description of problem:
Making the port 5000 (default one in /etc/katello/thin.yml) busy (ssh -L 5000:localhost:80 root@localhost) brings then `service katello start` to react as "[OK]" while the thin instance was failed to start up.

Would be better to do a netstat check before returning from the init/katello->start procedure.

It would be important especially for the case when there would be servers = 1 there (one thin instance which failed)

Fortunately `service katello status` tells the truth :)


Version-Release number of selected component (if applicable):
katello-0.1.117-1.el6.x86_64

How reproducible:
always when the thin port is busy

Steps to Reproduce:
1. see above
2.
3.
  
Actual results:
`service katello start` returns 0 - instead the failure status would be appreciated

Expected results:
error code (with logging the failure cause)

Additional info:

Comment 2 Corey Welton 2011-11-30 15:17:12 UTC
Possibly related: https://bugzilla.redhat.com/show_bug.cgi?id=752863

Comment 3 Lukas Zapletal 2012-01-23 10:05:00 UTC
Thin does not report any error when port is already used.

Reported upstream:

https://thin.lighthouseapp.com/projects/7212-thin/tickets/150-thin-does-not-report-error-when-port-is-used

We might do an explicit check, but since we would need to load configuration (port numbers) and do this in a loop, it is not an easy task. Setting low priority.

Comment 4 Miroslav Suchý 2012-09-04 11:55:43 UTC
https://github.com/Katello/katello/pull/575

Comment 5 Miroslav Suchý 2012-09-04 11:56:07 UTC
https://github.com/Katello/katello/pull/575

Comment 6 Miroslav Suchý 2012-09-05 09:55:24 UTC
Merged.
Commit 	6da9ee9

Comment 7 Lukas Zapletal 2012-10-29 14:30:16 UTC
Part of Katello 1.1 release