* nova-volume has been removed in Grizzly
* part of delete-nova-volume
Change-Id: Iba91d69950767823d77aaaa93243b0f476dbb04d
... | ... |
@@ -35,9 +35,9 @@ source $TOP_DIR/openrc |
35 | 35 |
# Import exercise configuration |
36 | 36 |
source $TOP_DIR/exerciserc |
37 | 37 |
|
38 |
-# If cinder or n-vol are not enabled we exit with exitcode 55 so that |
|
38 |
+# If cinder is not enabled we exit with exitcode 55 so that |
|
39 | 39 |
# the exercise is skipped |
40 |
-is_service_enabled cinder n-vol || exit 55 |
|
40 |
+is_service_enabled cinder || exit 55 |
|
41 | 41 |
|
42 | 42 |
# Boot this image, use first AMI image if unset |
43 | 43 |
DEFAULT_IMAGE_NAME=${DEFAULT_IMAGE_NAME:-ami} |
... | ... |
@@ -73,7 +73,7 @@ fi |
73 | 73 |
|
74 | 74 |
# Volumes |
75 | 75 |
# ------- |
76 |
-if [[ "$ENABLED_SERVICES" =~ "n-vol" || "$ENABLED_SERVICES" =~ "c-vol" ]]; then |
|
76 |
+if [[ "$ENABLED_SERVICES" =~ "c-vol" ]]; then |
|
77 | 77 |
VOLUME_ZONE=`euca-describe-availability-zones | head -n1 | cut -f2` |
78 | 78 |
die_if_not_set VOLUME_ZONE "Failure to find zone for volume" |
79 | 79 |
|
... | ... |
@@ -9,7 +9,7 @@ echo "Begin DevStack Exercise: $0" |
9 | 9 |
echo "*********************************************************************" |
10 | 10 |
|
11 | 11 |
# This script exits on an error so that errors don't compound and you see |
12 |
-# only the first error that occured. |
|
12 |
+# only the first error that occurred. |
|
13 | 13 |
set -o errexit |
14 | 14 |
|
15 | 15 |
# Print the commands being run so that we can see the command that triggers |
... | ... |
@@ -33,9 +33,9 @@ source $TOP_DIR/openrc |
33 | 33 |
# Import exercise configuration |
34 | 34 |
source $TOP_DIR/exerciserc |
35 | 35 |
|
36 |
-# If cinder or n-vol are not enabled we exit with exitcode 55 which mean |
|
36 |
+# If cinder is not enabled we exit with exitcode 55 which mean |
|
37 | 37 |
# exercise is skipped. |
38 |
-is_service_enabled cinder n-vol || exit 55 |
|
38 |
+is_service_enabled cinder || exit 55 |
|
39 | 39 |
|
40 | 40 |
# Instance type to create |
41 | 41 |
DEFAULT_INSTANCE_TYPE=${DEFAULT_INSTANCE_TYPE:-m1.tiny} |
... | ... |
@@ -140,22 +140,6 @@ if [[ "$ENABLED_SERVICES" =~ "n-cpu" ]]; then |
140 | 140 |
--role_id $RESELLER_ROLE |
141 | 141 |
fi |
142 | 142 |
|
143 |
-# Volume |
|
144 |
-if [[ "$ENABLED_SERVICES" =~ "n-vol" ]]; then |
|
145 |
- if [[ "$KEYSTONE_CATALOG_BACKEND" = 'sql' ]]; then |
|
146 |
- VOLUME_SERVICE=$(get_id keystone service-create \ |
|
147 |
- --name=volume \ |
|
148 |
- --type=volume \ |
|
149 |
- --description="Volume Service") |
|
150 |
- keystone endpoint-create \ |
|
151 |
- --region RegionOne \ |
|
152 |
- --service_id $VOLUME_SERVICE \ |
|
153 |
- --publicurl "http://$SERVICE_HOST:8776/v1/\$(tenant_id)s" \ |
|
154 |
- --adminurl "http://$SERVICE_HOST:8776/v1/\$(tenant_id)s" \ |
|
155 |
- --internalurl "http://$SERVICE_HOST:8776/v1/\$(tenant_id)s" |
|
156 |
- fi |
|
157 |
-fi |
|
158 |
- |
|
159 | 143 |
# Heat |
160 | 144 |
if [[ "$ENABLED_SERVICES" =~ "heat" ]]; then |
161 | 145 |
HEAT_USER=$(get_id keystone user-create --name=heat \ |
... | ... |
@@ -462,7 +462,7 @@ function _cleanup_service_list () { |
462 | 462 |
# ``ENABLED_SERVICES`` list, if they are not already present. |
463 | 463 |
# |
464 | 464 |
# For example: |
465 |
-# enable_service n-vol |
|
465 |
+# enable_service qpid |
|
466 | 466 |
# |
467 | 467 |
# This function does not know about the special cases |
468 | 468 |
# for nova, glance, and quantum built into is_service_enabled(). |
... | ... |
@@ -484,7 +484,7 @@ function enable_service() { |
484 | 484 |
# ``ENABLED_SERVICES`` list, if they are present. |
485 | 485 |
# |
486 | 486 |
# For example: |
487 |
-# disable_service n-vol |
|
487 |
+# disable_service rabbit |
|
488 | 488 |
# |
489 | 489 |
# This function does not know about the special cases |
490 | 490 |
# for nova, glance, and quantum built into is_service_enabled(). |
... | ... |
@@ -513,8 +513,8 @@ function disable_all_services() { |
513 | 513 |
|
514 | 514 |
|
515 | 515 |
# Remove all services starting with '-'. For example, to install all default |
516 |
-# services except nova-volume (n-vol) set in ``localrc``: |
|
517 |
-# ENABLED_SERVICES+=",-n-vol" |
|
516 |
+# services except rabbit (rabbit) set in ``localrc``: |
|
517 |
+# ENABLED_SERVICES+=",-rabbit" |
|
518 | 518 |
# Uses global ``ENABLED_SERVICES`` |
519 | 519 |
# disable_negated_services |
520 | 520 |
function disable_negated_services() { |
521 | 521 |
deleted file mode 100644 |
... | ... |
@@ -1,126 +0,0 @@ |
1 |
-# lib/n-vol |
|
2 |
-# Install and start Nova volume service |
|
3 |
- |
|
4 |
-# Dependencies: |
|
5 |
-# - functions |
|
6 |
-# - DATA_DIR must be defined |
|
7 |
-# - KEYSTONE_AUTH_* must be defined |
|
8 |
-# - NOVA_DIR, NOVA_BIN_DIR, NOVA_STATE_PATH must be defined |
|
9 |
-# SERVICE_{TENANT_NAME|PASSWORD} must be defined |
|
10 |
-# _configure_tgt_for_config_d() from lib/cinder |
|
11 |
- |
|
12 |
-# stack.sh |
|
13 |
-# --------- |
|
14 |
-# install_nvol |
|
15 |
-# configure_nvol |
|
16 |
-# init_nvol |
|
17 |
-# start_nvol |
|
18 |
-# stop_nvol |
|
19 |
-# cleanup_nvol |
|
20 |
- |
|
21 |
-# Save trace setting |
|
22 |
-XTRACE=$(set +o | grep xtrace) |
|
23 |
-set +o xtrace |
|
24 |
- |
|
25 |
- |
|
26 |
-# Defaults |
|
27 |
-# -------- |
|
28 |
- |
|
29 |
-# Name of the LVM volume group to use/create for iscsi volumes |
|
30 |
-VOLUME_GROUP=${VOLUME_GROUP:-stack-volumes} |
|
31 |
-VOLUME_NAME_PREFIX=${VOLUME_NAME_PREFIX:-volume-} |
|
32 |
- |
|
33 |
- |
|
34 |
-# cleanup_nvol() - Remove residual data files, anything left over from previous |
|
35 |
-# runs that a clean run would need to clean up |
|
36 |
-function cleanup_nvol() { |
|
37 |
- # kill instances (nova) |
|
38 |
- # delete image files (glance) |
|
39 |
- # This function intentionally left blank |
|
40 |
- : |
|
41 |
-} |
|
42 |
- |
|
43 |
-# configure_nvol() - Set config files, create data dirs, etc |
|
44 |
-function configure_nvol() { |
|
45 |
- # sudo python setup.py deploy |
|
46 |
- # iniset $XXX_CONF ... |
|
47 |
- # This function intentionally left blank |
|
48 |
- : |
|
49 |
-} |
|
50 |
- |
|
51 |
-# init_nvol() - Initialize databases, etc. |
|
52 |
-function init_nvol() { |
|
53 |
- # Configure a default volume group called '`stack-volumes`' for the volume |
|
54 |
- # service if it does not yet exist. If you don't wish to use a file backed |
|
55 |
- # volume group, create your own volume group called ``stack-volumes`` before |
|
56 |
- # invoking ``stack.sh``. |
|
57 |
- # |
|
58 |
- # By default, the backing file is 5G in size, and is stored in ``/opt/stack/data``. |
|
59 |
- |
|
60 |
- if ! sudo vgs $VOLUME_GROUP; then |
|
61 |
- VOLUME_BACKING_FILE=${VOLUME_BACKING_FILE:-$DATA_DIR/${VOLUME_GROUP}-backing-file} |
|
62 |
- # Only create if the file doesn't already exists |
|
63 |
- [[ -f $VOLUME_BACKING_FILE ]] || truncate -s $VOLUME_BACKING_FILE_SIZE $VOLUME_BACKING_FILE |
|
64 |
- DEV=`sudo losetup -f --show $VOLUME_BACKING_FILE` |
|
65 |
- # Only create if the loopback device doesn't contain $VOLUME_GROUP |
|
66 |
- if ! sudo vgs $VOLUME_GROUP; then sudo vgcreate $VOLUME_GROUP $DEV; fi |
|
67 |
- fi |
|
68 |
- |
|
69 |
- mkdir -p $NOVA_STATE_PATH/volumes |
|
70 |
- |
|
71 |
- if sudo vgs $VOLUME_GROUP; then |
|
72 |
- if [[ "$os_PACKAGE" = "rpm" ]]; then |
|
73 |
- # RPM doesn't start the service |
|
74 |
- start_service tgtd |
|
75 |
- fi |
|
76 |
- |
|
77 |
- # Remove nova iscsi targets |
|
78 |
- sudo tgtadm --op show --mode target | grep $VOLUME_NAME_PREFIX | grep Target | cut -f3 -d ' ' | sudo xargs -n1 tgt-admin --delete || true |
|
79 |
- # Clean out existing volumes |
|
80 |
- for lv in `sudo lvs --noheadings -o lv_name $VOLUME_GROUP`; do |
|
81 |
- # ``VOLUME_NAME_PREFIX`` prefixes the LVs we want |
|
82 |
- if [[ "${lv#$VOLUME_NAME_PREFIX}" != "$lv" ]]; then |
|
83 |
- sudo lvremove -f $VOLUME_GROUP/$lv |
|
84 |
- fi |
|
85 |
- done |
|
86 |
- fi |
|
87 |
-} |
|
88 |
- |
|
89 |
-# install_nvol() - Collect source and prepare |
|
90 |
-function install_nvol() { |
|
91 |
- # git clone xxx |
|
92 |
- # Install is handled when installing Nova |
|
93 |
- : |
|
94 |
-} |
|
95 |
- |
|
96 |
-# start_nvol() - Start running processes, including screen |
|
97 |
-function start_nvol() { |
|
98 |
- # Setup the tgt configuration file |
|
99 |
- if [[ ! -f /etc/tgt/conf.d/nova.conf ]]; then |
|
100 |
- _configure_tgt_for_config_d |
|
101 |
- sudo mkdir -p /etc/tgt/conf.d |
|
102 |
- echo "include $NOVA_STATE_PATH/volumes/*" | sudo tee /etc/tgt/conf.d/nova.conf |
|
103 |
- fi |
|
104 |
- |
|
105 |
- if [[ "$os_PACKAGE" = "deb" ]]; then |
|
106 |
- # tgt in oneiric doesn't restart properly if tgtd isn't running |
|
107 |
- # do it in two steps |
|
108 |
- sudo stop tgt || true |
|
109 |
- sudo start tgt |
|
110 |
- else |
|
111 |
- restart_service tgtd |
|
112 |
- fi |
|
113 |
- |
|
114 |
- screen_it n-vol "cd $NOVA_DIR && $NOVA_BIN_DIR/nova-volume" |
|
115 |
-} |
|
116 |
- |
|
117 |
-# stop_nvol() - Stop running processes |
|
118 |
-function stop_nvol() { |
|
119 |
- # Kill the nova volume screen window |
|
120 |
- screen -S $SCREEN_NAME -p n-vol -X kill |
|
121 |
- |
|
122 |
- stop_service tgt |
|
123 |
-} |
|
124 |
- |
|
125 |
-# Restore xtrace |
|
126 |
-$XTRACE |
... | ... |
@@ -312,15 +312,6 @@ function create_nova_conf() { |
312 | 312 |
if is_service_enabled n-api; then |
313 | 313 |
add_nova_opt "enabled_apis=$NOVA_ENABLED_APIS" |
314 | 314 |
fi |
315 |
- if is_service_enabled n-vol; then |
|
316 |
- NOVA_ENABLED_APIS="${NOVA_ENABLED_APIS},osapi_volume" |
|
317 |
- iniset $NOVA_CONF DEFAULT enabled_apis $NOVA_ENABLED_APIS |
|
318 |
- add_nova_opt "volume_api_class=nova.volume.api.API" |
|
319 |
- add_nova_opt "volume_group=$VOLUME_GROUP" |
|
320 |
- add_nova_opt "volume_name_template=${VOLUME_NAME_PREFIX}%s" |
|
321 |
- # oneiric no longer supports ietadm |
|
322 |
- add_nova_opt "iscsi_helper=tgtadm" |
|
323 |
- fi |
|
324 | 315 |
if is_service_enabled cinder; then |
325 | 316 |
add_nova_opt "volume_api_class=nova.volume.cinder.API" |
326 | 317 |
fi |
... | ... |
@@ -93,7 +93,7 @@ DEST=${DEST:-/opt/stack} |
93 | 93 |
# ============ |
94 | 94 |
|
95 | 95 |
# Remove services which were negated in ENABLED_SERVICES |
96 |
-# using the "-" prefix (e.g., "-n-vol") instead of |
|
96 |
+# using the "-" prefix (e.g., "-rabbit") instead of |
|
97 | 97 |
# calling disable_service(). |
98 | 98 |
disable_negated_services |
99 | 99 |
|
... | ... |
@@ -154,12 +154,6 @@ elif [ "$rpc_backend_cnt" == 0 ]; then |
154 | 154 |
fi |
155 | 155 |
unset rpc_backend_cnt |
156 | 156 |
|
157 |
-# Make sure we only have one volume service enabled. |
|
158 |
-if is_service_enabled cinder && is_service_enabled n-vol; then |
|
159 |
- echo "ERROR: n-vol and cinder must not be enabled at the same time" |
|
160 |
- exit 1 |
|
161 |
-fi |
|
162 |
- |
|
163 | 157 |
# Set up logging level |
164 | 158 |
VERBOSE=$(trueorfalse True $VERBOSE) |
165 | 159 |
|
... | ... |
@@ -310,7 +304,6 @@ source $TOP_DIR/lib/keystone |
310 | 310 |
source $TOP_DIR/lib/glance |
311 | 311 |
source $TOP_DIR/lib/nova |
312 | 312 |
source $TOP_DIR/lib/cinder |
313 |
-source $TOP_DIR/lib/n-vol |
|
314 | 313 |
source $TOP_DIR/lib/ceilometer |
315 | 314 |
source $TOP_DIR/lib/heat |
316 | 315 |
source $TOP_DIR/lib/quantum |
... | ... |
@@ -1749,9 +1742,6 @@ fi |
1749 | 1749 |
if is_service_enabled cinder; then |
1750 | 1750 |
echo_summary "Configuring Cinder" |
1751 | 1751 |
init_cinder |
1752 |
-elif is_service_enabled n-vol; then |
|
1753 |
- echo_summary "Configuring Nova volumes" |
|
1754 |
- init_nvol |
|
1755 | 1752 |
fi |
1756 | 1753 |
|
1757 | 1754 |
if is_service_enabled nova; then |
... | ... |
@@ -1951,10 +1941,6 @@ if is_service_enabled nova; then |
1951 | 1951 |
echo_summary "Starting Nova" |
1952 | 1952 |
start_nova |
1953 | 1953 |
fi |
1954 |
-if is_service_enabled n-vol; then |
|
1955 |
- echo_summary "Starting Nova volumes" |
|
1956 |
- start_nvol |
|
1957 |
-fi |
|
1958 | 1954 |
if is_service_enabled cinder; then |
1959 | 1955 |
echo_summary "Starting Cinder" |
1960 | 1956 |
start_cinder |
... | ... |
@@ -11,10 +11,6 @@ DEST=/opt/stack |
11 | 11 |
# ``disable_service`` functions in ``localrc``. |
12 | 12 |
# For example, to enable Swift add this to ``localrc``: |
13 | 13 |
# enable_service swift |
14 |
-# |
|
15 |
-# And to disable Cinder and use Nova Volumes instead: |
|
16 |
-# disable_service c-api c-sch c-vol cinder |
|
17 |
-# enable_service n-vol |
|
18 | 14 |
ENABLED_SERVICES=g-api,g-reg,key,n-api,n-crt,n-obj,n-cpu,n-net,cinder,c-sch,c-api,c-vol,n-sch,n-novnc,n-xvnc,n-cauth,horizon,mysql,rabbit |
19 | 15 |
|
20 | 16 |
# Set the default Nova APIs to enable |
... | ... |
@@ -26,7 +26,6 @@ DATA_DIR=${DATA_DIR:-${DEST}/data} |
26 | 26 |
|
27 | 27 |
# Get project function libraries |
28 | 28 |
source $TOP_DIR/lib/cinder |
29 |
-source $TOP_DIR/lib/n-vol |
|
30 | 29 |
|
31 | 30 |
# Determine what system we are running on. This provides ``os_VENDOR``, |
32 | 31 |
# ``os_RELEASE``, ``os_UPDATE``, ``os_PACKAGE``, ``os_CODENAME`` |
... | ... |
@@ -58,11 +57,7 @@ fi |
58 | 58 |
SCSI_PERSIST_DIR=$CINDER_STATE_PATH/volumes/* |
59 | 59 |
|
60 | 60 |
# Get the iSCSI volumes |
61 |
-if is_service_enabled cinder n-vol; then |
|
62 |
- if is_service_enabled n-vol; then |
|
63 |
- SCSI_PERSIST_DIR=$NOVA_STATE_PATH/volumes/* |
|
64 |
- fi |
|
65 |
- |
|
61 |
+if is_service_enabled cinder; then |
|
66 | 62 |
TARGETS=$(sudo tgtadm --op show --mode target) |
67 | 63 |
if [ $? -ne 0 ]; then |
68 | 64 |
# If tgt driver isn't running this won't work obviously |
... | ... |
@@ -88,10 +83,6 @@ if is_service_enabled cinder n-vol; then |
88 | 88 |
sudo rm -rf $CINDER_STATE_PATH/volumes/* |
89 | 89 |
fi |
90 | 90 |
|
91 |
- if is_service_enabled n-vol; then |
|
92 |
- sudo rm -rf $NOVA_STATE_PATH/volumes/* |
|
93 |
- fi |
|
94 |
- |
|
95 | 91 |
if [[ "$os_PACKAGE" = "deb" ]]; then |
96 | 92 |
stop_service tgt |
97 | 93 |
else |