Backlog #2429

Compatibility with heartbeat

Added by novid Agha Hasani almost 7 years ago. Updated over 6 years ago.

Status:PendingStart date:11/05/2013
Priority:HighDue date:
Assignee:-% Done:

0%

Category:Packaging
Target version:-

Description

heartbeat for detect problem checks exit code, so when openebula will fail, must return exit 3 instead 0

we must change init script opennbula

1. /etc/init.d/opennebula

changing

status)
status_of_proc "oned" "$NAME" && exit 0 || exit $?
;;

to

status)
       # NEEDS to be heartbeat friendly...
       # so: put some "OK" in the output.
process=$(ps -ef | grep "/usr/bin/oned" | grep -v "grep" | wc -l)
if [ "$process" -gt 0 ]; then
echo "opennebula loaded OK" # drbd_pretty_status $PROC_DRBD 2>/dev/null
exit 0
else
echo >&2 "opennebula not loaded"
exit 3
fi # status_of_proc "oned" "$NAME" && exit 0 || exit $?
;;

2. /etc/init.d/opennebula-sunstone

  1. NEEDS to be heartbeat friendly...
  2. so: put some "OK" in the output.
    process=$(ps -ef | grep "/usr/lib/one/sunstone/sunstone-server.rb" | grep -v "grep" | wc -l)
    if [ "$process" -gt 0 ]; then
    echo "sunstone loaded OK"
    drbd_pretty_status $PROC_DRBD 2>/dev/null
    exit 0
    else
    echo >&2 "sunstone not loaded"
    exit 3
    fi
    ;;

3. /etc/init.d/appmarket

I am writing new init script for 'appmarket' too that attach it

file source related from github is : https://github.com/OpenNebula/one/tree/1a70cffab08276a6019fb876b3ce5f20875d1256/share/pkgs/Ubuntu

appmarket (2.5 KB) novid Agha Hasani, 11/05/2013 03:19 PM


Related issues

Related to Feature #2697: add systemd scripts for the OpenNebula init scripts Closed 01/30/2014

History

#1 Updated by Javi Fontan almost 7 years ago

Thanks!

We will take a look a these but seem OK.

I am adding a related ticket.

#2 Updated by novid Agha Hasani almost 7 years ago

Javi Fontan wrote:

Thanks!

We will take a look a these but seem OK.

I am adding a related ticket.

thx man

you can safely remove drbd_pretty_status $PROC_DRBD 2>/dev/null too :)

I used part of the init drbd script and mistake paste it here !

#3 Updated by Ruben S. Montero almost 7 years ago

  • Assignee set to Jaime Melis
  • Resolution deleted (fixed)

#4 Updated by Ruben S. Montero almost 7 years ago

  • Status changed from Pending to New

#5 Updated by Ruben S. Montero almost 7 years ago

  • Assignee deleted (Jaime Melis)
  • Target version changed from Release 4.4 to Release 4.6

#6 Updated by Jaime Melis over 6 years ago

  • Target version changed from Release 4.6 to Release 4.8

#7 Updated by Ruben S. Montero over 6 years ago

  • Assignee set to Javi Fontan

#8 Updated by Ruben S. Montero over 6 years ago

  • Related to Feature #2697: add systemd scripts for the OpenNebula init scripts added

#9 Updated by Ruben S. Montero over 6 years ago

  • Tracker changed from Feature to Backlog
  • Status changed from New to Pending
  • Assignee deleted (Javi Fontan)
  • Priority changed from Normal to High
  • Target version deleted (Release 4.8)

Also available in: Atom PDF