summaryrefslogtreecommitdiff
path: root/devstack
diff options
context:
space:
mode:
Diffstat (limited to 'devstack')
-rwxr-xr-xdevstack/plugin.sh34
-rwxr-xr-xdevstack/upgrade/resources.sh26
-rw-r--r--devstack/upgrade/settings7
-rwxr-xr-xdevstack/upgrade/shutdown.sh16
-rwxr-xr-xdevstack/upgrade/upgrade.sh6
5 files changed, 66 insertions, 23 deletions
diff --git a/devstack/plugin.sh b/devstack/plugin.sh
index fa3ade9..6bbd291 100755
--- a/devstack/plugin.sh
+++ b/devstack/plugin.sh
@@ -68,15 +68,17 @@ function configure_designate {
68 iniset $DESIGNATE_CONF coordination backend_url $DESIGNATE_COORDINATION_URL 68 iniset $DESIGNATE_CONF coordination backend_url $DESIGNATE_COORDINATION_URL
69 fi 69 fi
70 70
71 # Pool Manager Configuration 71 if is_service_enabled designate-pool-manager; then
72 iniset $DESIGNATE_CONF service:pool_manager pool_id $DESIGNATE_POOL_ID 72 # Pool Manager Configuration
73 iniset $DESIGNATE_CONF service:pool_manager cache_driver $DESIGNATE_POOL_MANAGER_CACHE_DRIVER 73 iniset $DESIGNATE_CONF service:pool_manager pool_id $DESIGNATE_POOL_ID
74 iniset $DESIGNATE_CONF service:pool_manager periodic_recovery_interval $DESIGNATE_PERIODIC_RECOVERY_INTERVAL 74 iniset $DESIGNATE_CONF service:pool_manager cache_driver $DESIGNATE_POOL_MANAGER_CACHE_DRIVER
75 iniset $DESIGNATE_CONF service:pool_manager periodic_sync_interval $DESIGNATE_PERIODIC_SYNC_INTERVAL 75 iniset $DESIGNATE_CONF service:pool_manager periodic_recovery_interval $DESIGNATE_PERIODIC_RECOVERY_INTERVAL
76 76 iniset $DESIGNATE_CONF service:pool_manager periodic_sync_interval $DESIGNATE_PERIODIC_SYNC_INTERVAL
77 # Pool Manager Cache 77
78 if [ "$DESIGNATE_POOL_MANAGER_CACHE_DRIVER" == "sqlalchemy" ]; then 78 # Pool Manager Cache
79 iniset $DESIGNATE_CONF pool_manager_cache:sqlalchemy connection `database_connection_url designate_pool_manager` 79 if [ "$DESIGNATE_POOL_MANAGER_CACHE_DRIVER" == "sqlalchemy" ]; then
80 iniset $DESIGNATE_CONF pool_manager_cache:sqlalchemy connection `database_connection_url designate_pool_manager`
81 fi
80 fi 82 fi
81 83
82 # API Configuration 84 # API Configuration
@@ -93,7 +95,7 @@ function configure_designate {
93 iniset $DESIGNATE_CONF service:mdns listen ${DESIGNATE_SERVICE_HOST}:${DESIGNATE_SERVICE_PORT_MDNS} 95 iniset $DESIGNATE_CONF service:mdns listen ${DESIGNATE_SERVICE_HOST}:${DESIGNATE_SERVICE_PORT_MDNS}
94 96
95 # Worker Configuration 97 # Worker Configuration
96 if is_service_enabled designate-worker; then 98 if ! is_service_enabled designate-pool-manager; then
97 iniset $DESIGNATE_CONF service:worker enabled True 99 iniset $DESIGNATE_CONF service:worker enabled True
98 iniset $DESIGNATE_CONF service:worker notify True 100 iniset $DESIGNATE_CONF service:worker notify True
99 iniset $DESIGNATE_CONF service:worker poll_max_retries $DESIGNATE_POLL_RETRIES 101 iniset $DESIGNATE_CONF service:worker poll_max_retries $DESIGNATE_POLL_RETRIES
@@ -299,13 +301,17 @@ function start_designate {
299 301
300 run_process designate-central "$DESIGNATE_BIN_DIR/designate-central --config-file $DESIGNATE_CONF" 302 run_process designate-central "$DESIGNATE_BIN_DIR/designate-central --config-file $DESIGNATE_CONF"
301 run_process designate-api "$DESIGNATE_BIN_DIR/designate-api --config-file $DESIGNATE_CONF" 303 run_process designate-api "$DESIGNATE_BIN_DIR/designate-api --config-file $DESIGNATE_CONF"
302 run_process designate-pool-manager "$DESIGNATE_BIN_DIR/designate-pool-manager --config-file $DESIGNATE_CONF"
303 run_process designate-zone-manager "$DESIGNATE_BIN_DIR/designate-zone-manager --config-file $DESIGNATE_CONF"
304 run_process designate-mdns "$DESIGNATE_BIN_DIR/designate-mdns --config-file $DESIGNATE_CONF" 304 run_process designate-mdns "$DESIGNATE_BIN_DIR/designate-mdns --config-file $DESIGNATE_CONF"
305 run_process designate-agent "$DESIGNATE_BIN_DIR/designate-agent --config-file $DESIGNATE_CONF" 305 run_process designate-agent "$DESIGNATE_BIN_DIR/designate-agent --config-file $DESIGNATE_CONF"
306 run_process designate-sink "$DESIGNATE_BIN_DIR/designate-sink --config-file $DESIGNATE_CONF" 306 run_process designate-sink "$DESIGNATE_BIN_DIR/designate-sink --config-file $DESIGNATE_CONF"
307 run_process designate-worker "$DESIGNATE_BIN_DIR/designate-worker --config-file $DESIGNATE_CONF" 307 if is_service_enabled designate-pool-manager; then
308 run_process designate-producer "$DESIGNATE_BIN_DIR/designate-producer --config-file $DESIGNATE_CONF" 308 run_process designate-pool-manager "$DESIGNATE_BIN_DIR/designate-pool-manager --config-file $DESIGNATE_CONF"
309 run_process designate-zone-manager "$DESIGNATE_BIN_DIR/designate-zone-manager --config-file $DESIGNATE_CONF"
310 else
311 run_process designate-worker "$DESIGNATE_BIN_DIR/designate-worker --config-file $DESIGNATE_CONF"
312 run_process designate-producer "$DESIGNATE_BIN_DIR/designate-producer --config-file $DESIGNATE_CONF"
313 fi
314
309 315
310 316
311 # Start proxies if enabled 317 # Start proxies if enabled
diff --git a/devstack/upgrade/resources.sh b/devstack/upgrade/resources.sh
index 1097286..bfe91bd 100755
--- a/devstack/upgrade/resources.sh
+++ b/devstack/upgrade/resources.sh
@@ -6,6 +6,7 @@ source $GRENADE_DIR/grenaderc
6source $GRENADE_DIR/functions 6source $GRENADE_DIR/functions
7 7
8source $TOP_DIR/openrc admin admin 8source $TOP_DIR/openrc admin admin
9source $TOP_DIR/stackrc
9 10
10set -o xtrace 11set -o xtrace
11 12
@@ -17,6 +18,9 @@ DESIGNATE_ZONE_EMAIL=hostmaster@example.com
17DESIGNATE_RRSET_NAME=www.example.com. 18DESIGNATE_RRSET_NAME=www.example.com.
18DESIGNATE_RRSET_TYPE=A 19DESIGNATE_RRSET_TYPE=A
19DESIGNATE_RRSET_RECORD=10.0.0.1 20DESIGNATE_RRSET_RECORD=10.0.0.1
21# used with dig to look up in DNS
22DIG_FLAGS="-p $DESIGNATE_SERVICE_PORT_DNS @$SERVICE_HOST"
23DIG_TIMEOUT=30
20 24
21function _set_designate_user { 25function _set_designate_user {
22 OS_TENANT_NAME=$DESIGNATE_PROJECT 26 OS_TENANT_NAME=$DESIGNATE_PROJECT
@@ -25,6 +29,25 @@ function _set_designate_user {
25 OS_PASSWORD=$DESIGNATE_PASS 29 OS_PASSWORD=$DESIGNATE_PASS
26} 30}
27 31
32function _ensure_recordset_present {
33 local record_name=$1
34 local record_type=$2
35 local record_value=$3
36
37 if [ "$DESIGNATE_BACKEND_DRIVER" = "fake" ] ; then
38 # if the backend is fake, there will be no actual DNS records
39 return 0
40 fi
41
42 if ! timeout $DIG_TIMEOUT sh -c "while ! dig +short $DIG_FLAGS $record_name $record_type | grep \"$record_value\"; do sleep 1; done"; then
43 die $LINENO "Error: record $record_name ($record_type) not found in DNS"
44 fi
45
46 # Display for debugging
47 dig $DIG_FLAGS $record_name $record_type
48
49 return 0
50}
28 51
29function create { 52function create {
30 53
@@ -121,7 +144,8 @@ function verify {
121} 144}
122 145
123function verify_noapi { 146function verify_noapi {
124 : 147 env
148 _ensure_recordset_present $DESIGNATE_RRSET_NAME $DESIGNATE_RRSET_TYPE $DESIGNATE_RRSET_RECORD
125} 149}
126 150
127function destroy { 151function destroy {
diff --git a/devstack/upgrade/settings b/devstack/upgrade/settings
index 96641b2..af6949f 100644
--- a/devstack/upgrade/settings
+++ b/devstack/upgrade/settings
@@ -4,5 +4,8 @@ register_db_to_save designate
4devstack_localrc base enable_plugin designate https://git.openstack.org/openstack/designate 4devstack_localrc base enable_plugin designate https://git.openstack.org/openstack/designate
5devstack_localrc target enable_plugin designate https://git.openstack.org/openstack/designate 5devstack_localrc target enable_plugin designate https://git.openstack.org/openstack/designate
6 6
7devstack_localrc base enable_service designate-api designate-central designate-pool-manager designate-zone-manager designate-mdns designate-agent designate-sink designate horizon 7devstack_localrc base enable_service designate-api designate-central designate-producer designate-worker designate-mdns designate-agent designate-sink designate horizon
8devstack_localrc target enable_service designate-api designate-central designate-pool-manager designate-zone-manager designate-mdns designate-agent designate-sink designate horizon 8devstack_localrc target enable_service designate-api designate-central designate-producer designate-worker designate-mdns designate-agent designate-sink designate horizon
9
10BASE_RUN_SMOKE=False
11TARGET_RUN_SMOKE=False
diff --git a/devstack/upgrade/shutdown.sh b/devstack/upgrade/shutdown.sh
index 62e3297..8228d22 100755
--- a/devstack/upgrade/shutdown.sh
+++ b/devstack/upgrade/shutdown.sh
@@ -18,11 +18,21 @@ set -o xtrace
18 18
19stop_process designate-central 19stop_process designate-central
20stop_process designate-api 20stop_process designate-api
21stop_process designate-pool-manager
22stop_process designate-zone-manager
23stop_process designate-mdns 21stop_process designate-mdns
24stop_process designate-agent 22stop_process designate-agent
25stop_process designate-sink 23stop_process designate-sink
24if is_service_enabled designate-worker; then
25 stop_process designate-worker
26 stop_process designate-producer
27else
28 stop_process designate-pool-manager
29 stop_process designate-zone-manager
30fi
26 31
27# sanity check that service is actually down 32# sanity check that service is actually down
28ensure_services_stopped designate-api designate-central designate-pool-manager designate-zone-manager designate-mdns designate-agent designate-sink 33ensure_services_stopped designate-api designate-central designate-mdns designate-agent designate-sink
34if is_service_enabled designate-worker; then
35 ensure_services_stopped designate-worker designate-producer
36else
37 ensure_services_stopped designate-pool-manager designate-zone-manager
38fi
diff --git a/devstack/upgrade/upgrade.sh b/devstack/upgrade/upgrade.sh
index 29a880e..c40c795 100755
--- a/devstack/upgrade/upgrade.sh
+++ b/devstack/upgrade/upgrade.sh
@@ -72,8 +72,8 @@ $DESIGNATE_BIN_DIR/designate-manage --config-file $DESIGNATE_CONF \
72# Start designate 72# Start designate
73run_process designate-central "$DESIGNATE_BIN_DIR/designate-central --config-file $DESIGNATE_CONF" 73run_process designate-central "$DESIGNATE_BIN_DIR/designate-central --config-file $DESIGNATE_CONF"
74run_process designate-api "$DESIGNATE_BIN_DIR/designate-api --config-file $DESIGNATE_CONF" 74run_process designate-api "$DESIGNATE_BIN_DIR/designate-api --config-file $DESIGNATE_CONF"
75run_process designate-pool-manager "$DESIGNATE_BIN_DIR/designate-pool-manager --config-file $DESIGNATE_CONF" 75run_process designate-producer "$DESIGNATE_BIN_DIR/designate-producer --config-file $DESIGNATE_CONF"
76run_process designate-zone-manager "$DESIGNATE_BIN_DIR/designate-zone-manager --config-file $DESIGNATE_CONF" 76run_process designate-worker "$DESIGNATE_BIN_DIR/designate-worker --config-file $DESIGNATE_CONF"
77run_process designate-mdns "$DESIGNATE_BIN_DIR/designate-mdns --config-file $DESIGNATE_CONF" 77run_process designate-mdns "$DESIGNATE_BIN_DIR/designate-mdns --config-file $DESIGNATE_CONF"
78run_process designate-agent "$DESIGNATE_BIN_DIR/designate-agent --config-file $DESIGNATE_CONF" 78run_process designate-agent "$DESIGNATE_BIN_DIR/designate-agent --config-file $DESIGNATE_CONF"
79run_process designate-sink "$DESIGNATE_BIN_DIR/designate-sink --config-file $DESIGNATE_CONF" 79run_process designate-sink "$DESIGNATE_BIN_DIR/designate-sink --config-file $DESIGNATE_CONF"
@@ -88,7 +88,7 @@ if ! timeout $SERVICE_TIMEOUT sh -c "while ! wget --no-proxy -q -O- $DESIGNATE_S
88fi 88fi
89 89
90# Don't succeed unless the service come up 90# Don't succeed unless the service come up
91ensure_services_started designate-api designate-central designate-pool-manager designate-zone-manager designate-mdns designate-agent designate-sink 91ensure_services_started designate-api designate-central designate-producer designate-worker designate-mdns designate-agent designate-sink
92 92
93set +o xtrace 93set +o xtrace
94echo "*********************************************************************" 94echo "*********************************************************************"