~gandelman-a/charms/oneiric/nova-cloud-controller/custom_ppa

« back to all changes in this revision

Viewing changes to hooks/nova-cloud-controller-common

  • Committer: Adam Gandelman
  • Date: 2011-07-05 22:24:11 UTC
  • Revision ID: adamg@canonical.com-20110705222411-uptuspbpq618gc51
Add hooks for shared-db and amqp joined + changed

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
#!/bin/bash
2
2
SERVICES="nova-api nova-network nova-objectstore nova-scheduler"
3
3
NOVA_CONF="/etc/nova/nova.conf"
 
4
RABBIT_USER="nova-rabbit"
 
5
 
 
6
DB_USER="nova"
 
7
NOVA_DB="nova"
 
8
 
 
9
DEFAULT_ETH=$(ip route  | grep default | awk '{ print $5 }')
 
10
IP=$(ifconfig  $DEFAULT_ETH | grep 'inet addr' | awk '{ print $2 }' | cut -d: -f2)
4
11
 
5
12
function set_or_update {
6
13
  # set or update a key=value config option in nova.conf
24
31
    CTL=$1
25
32
  fi
26
33
  ACTION=$2
27
 
  if [[ -z $2 ]] || [[ -z $ACTION ]] ; then
 
34
  if [[ -z $CTL ]] || [[ -z $ACTION ]] ; then
28
35
    ensemble-log "ERROR nova_ctl: Not enough arguments"
29
36
    exit 1
30
37
  fi