Skip to content

Commit ef5ebed

Browse files
committed
Remove cache dirs from the services
PKI tokens have been actively deprecated from keystone and there are deprecations being emitted from keystonemiddleware. Because of this we no longer need an auth cache directory in the services where the PKI certifcates used to be stored. Remove the creation and use of all these AUTH_CACHE directories. Change-Id: I5680376e70e74882e9fdb87ee1b95d5f40570ad7
1 parent e8190c4 commit ef5ebed

7 files changed

Lines changed: 14 additions & 63 deletions

File tree

lib/cinder

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,6 @@ else
5151
fi
5252

5353
CINDER_STATE_PATH=${CINDER_STATE_PATH:=$DATA_DIR/cinder}
54-
CINDER_AUTH_CACHE_DIR=${CINDER_AUTH_CACHE_DIR:-/var/cache/cinder}
5554

5655
CINDER_CONF_DIR=/etc/cinder
5756
CINDER_CONF=$CINDER_CONF_DIR/cinder.conf
@@ -225,9 +224,8 @@ function configure_cinder {
225224
inicomment $CINDER_API_PASTE_INI filter:authtoken admin_tenant_name
226225
inicomment $CINDER_API_PASTE_INI filter:authtoken admin_user
227226
inicomment $CINDER_API_PASTE_INI filter:authtoken admin_password
228-
inicomment $CINDER_API_PASTE_INI filter:authtoken signing_dir
229227

230-
configure_auth_token_middleware $CINDER_CONF cinder $CINDER_AUTH_CACHE_DIR
228+
configure_auth_token_middleware $CINDER_CONF cinder
231229

232230
iniset $CINDER_CONF DEFAULT auth_strategy keystone
233231
iniset $CINDER_CONF DEFAULT debug $ENABLE_DEBUG_LOG_LEVEL
@@ -385,13 +383,6 @@ function create_cinder_accounts {
385383
fi
386384
}
387385

388-
# create_cinder_cache_dir() - Part of the init_cinder() process
389-
function create_cinder_cache_dir {
390-
# Create cache dir
391-
sudo install -d -o $STACK_USER $CINDER_AUTH_CACHE_DIR
392-
rm -f $CINDER_AUTH_CACHE_DIR/*
393-
}
394-
395386
# init_cinder() - Initialize database and volume group
396387
function init_cinder {
397388
if is_service_enabled $DATABASE_BACKENDS; then
@@ -420,7 +411,6 @@ function init_cinder {
420411
fi
421412

422413
mkdir -p $CINDER_STATE_PATH/volumes
423-
create_cinder_cache_dir
424414
}
425415

426416
# install_cinder() - Collect source and prepare

lib/glance

Lines changed: 3 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,6 @@ fi
4444
GLANCE_CACHE_DIR=${GLANCE_CACHE_DIR:=$DATA_DIR/glance/cache}
4545
GLANCE_IMAGE_DIR=${GLANCE_IMAGE_DIR:=$DATA_DIR/glance/images}
4646
GLANCE_LOCK_DIR=${GLANCE_LOCK_DIR:=$DATA_DIR/glance/locks}
47-
GLANCE_AUTH_CACHE_DIR=${GLANCE_AUTH_CACHE_DIR:-/var/cache/glance}
4847

4948
GLANCE_CONF_DIR=${GLANCE_CONF_DIR:-/etc/glance}
5049
GLANCE_METADEF_DIR=$GLANCE_CONF_DIR/metadefs
@@ -98,7 +97,7 @@ function is_glance_enabled {
9897
function cleanup_glance {
9998
# kill instances (nova)
10099
# delete image files (glance)
101-
sudo rm -rf $GLANCE_CACHE_DIR $GLANCE_IMAGE_DIR $GLANCE_AUTH_CACHE_DIR
100+
sudo rm -rf $GLANCE_CACHE_DIR $GLANCE_IMAGE_DIR
102101
}
103102

104103
# configure_glance() - Set config files, create data dirs, etc
@@ -115,7 +114,7 @@ function configure_glance {
115114
iniset $GLANCE_REGISTRY_CONF database connection $dburl
116115
iniset $GLANCE_REGISTRY_CONF DEFAULT use_syslog $SYSLOG
117116
iniset $GLANCE_REGISTRY_CONF paste_deploy flavor keystone
118-
configure_auth_token_middleware $GLANCE_REGISTRY_CONF glance $GLANCE_AUTH_CACHE_DIR/registry
117+
configure_auth_token_middleware $GLANCE_REGISTRY_CONF glance
119118
iniset $GLANCE_REGISTRY_CONF oslo_messaging_notifications driver messagingv2
120119
iniset_rpc_backend glance $GLANCE_REGISTRY_CONF
121120
iniset $GLANCE_REGISTRY_CONF DEFAULT graceful_shutdown_timeout "$SERVICE_GRACEFUL_SHUTDOWN_TIMEOUT"
@@ -127,7 +126,7 @@ function configure_glance {
127126
iniset $GLANCE_API_CONF DEFAULT image_cache_dir $GLANCE_CACHE_DIR/
128127
iniset $GLANCE_API_CONF DEFAULT lock_path $GLANCE_LOCK_DIR
129128
iniset $GLANCE_API_CONF paste_deploy flavor keystone+cachemanagement
130-
configure_auth_token_middleware $GLANCE_API_CONF glance $GLANCE_AUTH_CACHE_DIR/api
129+
configure_auth_token_middleware $GLANCE_API_CONF glance
131130
iniset $GLANCE_API_CONF oslo_messaging_notifications driver messagingv2
132131
iniset_rpc_backend glance $GLANCE_API_CONF
133132
if [ "$VIRT_DRIVER" = 'xenserver' ]; then
@@ -279,13 +278,6 @@ function create_glance_accounts {
279278
fi
280279
}
281280

282-
# create_glance_cache_dir() - Part of the init_glance() process
283-
function create_glance_cache_dir {
284-
# Create cache dir
285-
sudo install -d -o $STACK_USER $GLANCE_AUTH_CACHE_DIR/api $GLANCE_AUTH_CACHE_DIR/registry $GLANCE_AUTH_CACHE_DIR/search $GLANCE_AUTH_CACHE_DIR/artifact
286-
rm -f $GLANCE_AUTH_CACHE_DIR/api/* $GLANCE_AUTH_CACHE_DIR/registry/* $GLANCE_AUTH_CACHE_DIR/search/* $GLANCE_AUTH_CACHE_DIR/artifact/*
287-
}
288-
289281
# init_glance() - Initialize databases, etc.
290282
function init_glance {
291283
# Delete existing images
@@ -306,8 +298,6 @@ function init_glance {
306298
# Load metadata definitions
307299
$GLANCE_BIN_DIR/glance-manage --config-file $GLANCE_CONF_DIR/glance-api.conf db_load_metadefs
308300
time_stop "dbsync"
309-
310-
create_glance_cache_dir
311301
}
312302

313303
# install_glanceclient() - Collect source and prepare

lib/keystone

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -429,16 +429,15 @@ function create_service_user {
429429

430430
# Configure the service to use the auth token middleware.
431431
#
432-
# configure_auth_token_middleware conf_file admin_user signing_dir [section]
432+
# configure_auth_token_middleware conf_file admin_user [section]
433433
#
434434
# section defaults to keystone_authtoken, which is where auth_token looks in
435435
# the .conf file. If the paste config file is used (api-paste.ini) then
436436
# provide the section name for the auth_token filter.
437437
function configure_auth_token_middleware {
438438
local conf_file=$1
439439
local admin_user=$2
440-
local signing_dir=$3
441-
local section=${4:-keystone_authtoken}
440+
local section=${3:-keystone_authtoken}
442441

443442
iniset $conf_file $section auth_type password
444443
iniset $conf_file $section auth_url $KEYSTONE_SERVICE_URI
@@ -449,7 +448,6 @@ function configure_auth_token_middleware {
449448
iniset $conf_file $section project_domain_name "$SERVICE_DOMAIN_NAME"
450449

451450
iniset $conf_file $section cafile $SSL_BUNDLE_FILE
452-
iniset $conf_file $section signing_dir $signing_dir
453451
iniset $conf_file $section memcached_servers localhost:11211
454452
}
455453

lib/neutron

Lines changed: 3 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@ GITDIR["python-neutronclient"]=$DEST/python-neutronclient
3030

3131
NEUTRON_AGENT=${NEUTRON_AGENT:-openvswitch}
3232
NEUTRON_DIR=$DEST/neutron
33-
NEUTRON_AUTH_CACHE_DIR=${NEUTRON_AUTH_CACHE_DIR:-/var/cache/neutron}
3433

3534
NEUTRON_BIN_DIR=$(get_python_exec_prefix)
3635
NEUTRON_DHCP_BINARY="neutron-dhcp-agent"
@@ -44,7 +43,6 @@ NEUTRON_L3_CONF=$NEUTRON_CONF_DIR/l3_agent.ini
4443
NEUTRON_AGENT_CONF=$NEUTRON_CONF_DIR/
4544

4645
NEUTRON_STATE_PATH=${NEUTRON_STATE_PATH:=$DATA_DIR/neutron}
47-
NEUTRON_AUTH_CACHE_DIR=${NEUTRON_AUTH_CACHE_DIR:-/var/cache/neutron}
4846

4947
# By default, use the ML2 plugin
5048
NEUTRON_CORE_PLUGIN=${NEUTRON_CORE_PLUGIN:-ml2}
@@ -175,8 +173,8 @@ function configure_neutron_new {
175173
iniset $NEUTRON_CONF DEFAULT allow_overlapping_ips True
176174

177175
iniset $NEUTRON_CONF DEFAULT auth_strategy $NEUTRON_AUTH_STRATEGY
178-
configure_auth_token_middleware $NEUTRON_CONF neutron $NEUTRON_AUTH_CACHE_DIR keystone_authtoken
179-
configure_auth_token_middleware $NEUTRON_CONF nova $NEUTRON_AUTH_CACHE_DIR nova
176+
configure_auth_token_middleware $NEUTRON_CONF neutron keystone_authtoken
177+
configure_auth_token_middleware $NEUTRON_CONF nova nova
180178

181179
# Configure VXLAN
182180
# TODO(sc68cal) not hardcode?
@@ -250,7 +248,7 @@ function configure_neutron_new {
250248

251249
# TODO(dtroyer): remove the v2.0 hard code below
252250
iniset $NEUTRON_META_CONF DEFAULT auth_url $KEYSTONE_SERVICE_URI
253-
configure_auth_token_middleware $NEUTRON_META_CONF neutron $NEUTRON_AUTH_CACHE_DIR DEFAULT
251+
configure_auth_token_middleware $NEUTRON_META_CONF neutron DEFAULT
254252
fi
255253

256254
# Format logging
@@ -337,13 +335,6 @@ function create_neutron_accounts_new {
337335
fi
338336
}
339337

340-
# create_neutron_cache_dir() - Part of the init_neutron() process
341-
function create_neutron_cache_dir {
342-
# Create cache dir
343-
sudo install -d -o $STACK_USER $NEUTRON_AUTH_CACHE_DIR
344-
rm -f $NEUTRON_AUTH_CACHE_DIR/*
345-
}
346-
347338
# init_neutron() - Initialize databases, etc.
348339
function init_neutron_new {
349340

@@ -353,8 +344,6 @@ function init_neutron_new {
353344
# Run Neutron db migrations
354345
$NEUTRON_BIN_DIR/neutron-db-manage upgrade heads
355346
time_stop "dbsync"
356-
357-
create_neutron_cache_dir
358347
}
359348

360349
# install_neutron() - Collect source and prepare

lib/neutron-legacy

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,6 @@ GITDIR["python-neutronclient"]=$DEST/python-neutronclient
7373

7474
NEUTRON_DIR=$DEST/neutron
7575
NEUTRON_FWAAS_DIR=$DEST/neutron-fwaas
76-
NEUTRON_AUTH_CACHE_DIR=${NEUTRON_AUTH_CACHE_DIR:-/var/cache/neutron}
7776

7877
# Support entry points installation of console scripts
7978
if [[ -d $NEUTRON_DIR/bin/neutron-server ]]; then
@@ -815,7 +814,7 @@ function _configure_neutron_service {
815814
iniset $NEUTRON_CONF DEFAULT notify_nova_on_port_status_changes $Q_NOTIFY_NOVA_PORT_STATUS_CHANGES
816815
iniset $NEUTRON_CONF DEFAULT notify_nova_on_port_data_changes $Q_NOTIFY_NOVA_PORT_DATA_CHANGES
817816

818-
configure_auth_token_middleware $NEUTRON_CONF nova $NEUTRON_AUTH_CACHE_DIR nova
817+
configure_auth_token_middleware $NEUTRON_CONF nova nova
819818

820819
# Configure plugin
821820
neutron_plugin_configure_service
@@ -906,8 +905,7 @@ function _neutron_setup_keystone {
906905
local conf_file=$1
907906
local section=$2
908907

909-
create_neutron_cache_dir
910-
configure_auth_token_middleware $conf_file $Q_ADMIN_USERNAME $NEUTRON_AUTH_CACHE_DIR $section
908+
configure_auth_token_middleware $conf_file $Q_ADMIN_USERNAME $section
911909
}
912910

913911
function _neutron_setup_interface_driver {

lib/nova

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,6 @@ fi
4646
NOVA_STATE_PATH=${NOVA_STATE_PATH:=$DATA_DIR/nova}
4747
# INSTANCES_PATH is the previous name for this
4848
NOVA_INSTANCES_PATH=${NOVA_INSTANCES_PATH:=${INSTANCES_PATH:=$NOVA_STATE_PATH/instances}}
49-
NOVA_AUTH_CACHE_DIR=${NOVA_AUTH_CACHE_DIR:-/var/cache/nova}
5049

5150
NOVA_CONF_DIR=/etc/nova
5251
NOVA_CONF=$NOVA_CONF_DIR/nova.conf
@@ -240,7 +239,7 @@ function cleanup_nova {
240239
sudo rm -rf $NOVA_INSTANCES_PATH/*
241240
fi
242241

243-
sudo rm -rf $NOVA_STATE_PATH $NOVA_AUTH_CACHE_DIR
242+
sudo rm -rf $NOVA_STATE_PATH
244243

245244
# NOTE(dtroyer): This really should be called from here but due to the way
246245
# nova abuses the _cleanup() function we're moving it
@@ -464,7 +463,7 @@ function create_nova_conf {
464463
iniset $NOVA_CONF DEFAULT osapi_compute_link_prefix $NOVA_SERVICE_PROTOCOL://$NOVA_SERVICE_HOST:$NOVA_SERVICE_PORT
465464
fi
466465

467-
configure_auth_token_middleware $NOVA_CONF nova $NOVA_AUTH_CACHE_DIR
466+
configure_auth_token_middleware $NOVA_CONF nova
468467
fi
469468

470469
if is_service_enabled cinder; then
@@ -658,13 +657,6 @@ function init_nova_cells {
658657
fi
659658
}
660659

661-
# create_nova_cache_dir() - Part of the init_nova() process
662-
function create_nova_cache_dir {
663-
# Create cache dir
664-
sudo install -d -o $STACK_USER $NOVA_AUTH_CACHE_DIR
665-
rm -f $NOVA_AUTH_CACHE_DIR/*
666-
}
667-
668660
function create_nova_conf_nova_network {
669661
local public_interface=${PUBLIC_INTERFACE:-$PUBLIC_INTERFACE_DEFAULT}
670662
iniset $NOVA_CONF DEFAULT network_manager "nova.network.manager.$NETWORK_MANAGER"
@@ -722,7 +714,6 @@ function init_nova {
722714
done
723715
fi
724716

725-
create_nova_cache_dir
726717
create_nova_keys_dir
727718

728719
if [[ "$NOVA_BACKEND" == "LVM" ]]; then

lib/swift

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,6 @@ fi
4848

4949

5050
SWIFT_DIR=$DEST/swift
51-
SWIFT_AUTH_CACHE_DIR=${SWIFT_AUTH_CACHE_DIR:-/var/cache/swift}
5251
SWIFT_APACHE_WSGI_DIR=${SWIFT_APACHE_WSGI_DIR:-/var/www/swift}
5352
SWIFT3_DIR=$DEST/swift3
5453

@@ -450,7 +449,7 @@ function configure_swift {
450449
iniset ${SWIFT_CONFIG_PROXY_SERVER} filter:authtoken log_name swift
451450

452451
iniset ${SWIFT_CONFIG_PROXY_SERVER} filter:authtoken paste.filter_factory keystonemiddleware.auth_token:filter_factory
453-
configure_auth_token_middleware $SWIFT_CONFIG_PROXY_SERVER swift $SWIFT_AUTH_CACHE_DIR filter:authtoken
452+
configure_auth_token_middleware $SWIFT_CONFIG_PROXY_SERVER swift filter:authtoken
454453
iniset ${SWIFT_CONFIG_PROXY_SERVER} filter:authtoken delay_auth_decision 1
455454
iniset ${SWIFT_CONFIG_PROXY_SERVER} filter:authtoken cache swift.cache
456455
iniset ${SWIFT_CONFIG_PROXY_SERVER} filter:authtoken include_service_catalog False
@@ -745,10 +744,6 @@ function init_swift {
745744
swift-ring-builder container.builder rebalance 42
746745
swift-ring-builder account.builder rebalance 42
747746
} && popd >/dev/null
748-
749-
# Create cache dir
750-
sudo install -d -o ${STACK_USER} $SWIFT_AUTH_CACHE_DIR
751-
rm -f $SWIFT_AUTH_CACHE_DIR/*
752747
}
753748

754749
function install_swift {

0 commit comments

Comments
 (0)