Opened 20 months ago

Closed 3 weeks ago

#1186 closed defect (fixed)

start_rasdaman.sh should have proper exit code

Reported by: gmerticariu Owned by: bphamhuu
Priority: minor Milestone: 10.0
Component: rasserver Version: development
Keywords: Cc: pbaumann
Complexity: Medium

Description (last modified by dmisev)

start_rasdaman.sh should not attempt starting rasdaman if rasmgr is already running. Exit code 0 in this case.

start_rasdaman.sh should return a non-zero code (1) when it fails to start rasdaman.

stop_rasdaman.sh should wait until rasmgr is really down or a timeout (10 seconds) is reached. If the timeout is reached and rasmgr is still there it should exit with 1.

Change History (5)

comment:1 Changed 18 months ago by dmisev

  • Component changed from undecided to rasserver
  • Description modified (diff)
  • Milestone set to 10.0
  • Summary changed from start_rasdaman should end successfully only if rasdaman starts correctly to start_rasdaman.sh should have proper exit code

comment:2 Changed 10 months ago by dmisev

  • Owner changed from gmerticariu to drusu
  • Status changed from new to assigned

comment:3 Changed 10 months ago by dmisev

  • Description modified (diff)

comment:4 Changed 3 weeks ago by dmisev

  • Owner changed from drusu to bphamhuu

I think most of this has been fixed, but needs to be checked.

comment:5 in reply to: ↑ description Changed 3 weeks ago by bphamhuu

  • Resolution set to fixed
  • Status changed from assigned to closed

Replying to gmerticariu:

start_rasdaman.sh should not attempt starting rasdaman if rasmgr is already running. Exit code 0 in this case.

it is correct.

 start_rasdaman.sh 
start_rasdaman.sh: starting rasdaman server complex...
nohup: appending output to ‘nohup.out’
start_rasdaman.sh: starting all rasdaman servers...
start_rasdaman.sh: done.
[rasdaman@gonzo rasdaman]$ echo $?
0
[rasdaman@gonzo rasdaman]$ start_rasdaman.sh 
start_rasdaman.sh: starting rasdaman server complex...
nohup: appending output to ‘nohup.out’
start_rasdaman.sh: starting all rasdaman servers...
start_rasdaman.sh: done.
[rasdaman@gonzo rasdaman]$ echo $?
0

start_rasdaman.sh should return a non-zero code (1) when it fails to start rasdaman.

It is correct.

 start_rasdaman.sh 
start_rasdaman.sh: starting rasdaman server complex...
nohup: appending output to ‘nohup.out’
start_rasdaman.sh: starting all rasdaman servers...
start_rasdaman.sh: failed starting rasservers; please check the logs for more information.
start_rasdaman.sh: shutting down rasdaman... sleep: missing operand
Try 'sleep --help' for more information.
    Could not execute command.
[rasdaman@gonzo rasdaman]$ echo $?
1

stop_rasdaman.sh should wait until rasmgr is really down or a timeout (10 seconds) is reached. If the timeout is reached and rasmgr is still there it should exit with 1.

cannot reproduce.

Note: See TracTickets for help on using tickets.