Skip to content

Commit 2e607b0

Browse files
Zuulopenstack-gerrit
authored andcommitted
Merge "Modify devstack-base to allow for fips"
2 parents b33ec4b + 15b2e42 commit 2e607b0

3 files changed

Lines changed: 16 additions & 2 deletions

File tree

.zuul.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -370,7 +370,7 @@
370370

371371
- job:
372372
name: devstack-base
373-
parent: multinode
373+
parent: openstack-multinode-fips
374374
abstract: true
375375
description: |
376376
Base abstract Devstack job.

functions-common

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2498,6 +2498,11 @@ function clean_pyc_files {
24982498
fi
24992499
}
25002500

2501+
function is_fips_enabled {
2502+
fips=`cat /proc/sys/crypto/fips_enabled`
2503+
[ "$fips" == "1" ]
2504+
}
2505+
25012506
# Restore xtrace
25022507
$_XTRACE_FUNCTIONS_COMMON
25032508

lib/databases/mysql

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ function recreate_database_mysql {
6363
}
6464

6565
function configure_database_mysql {
66-
local my_conf mysql slow_log
66+
local my_conf mysql slow_log my_client_conf
6767
echo_summary "Configuring and starting MySQL"
6868

6969
if is_ubuntu; then
@@ -80,6 +80,15 @@ function configure_database_mysql {
8080
exit_distro_not_supported "mysql configuration"
8181
fi
8282

83+
# Set fips mode on
84+
if is_ubuntu; then
85+
if is_fips_enabled; then
86+
my_client_conf=/etc/mysql/mysql.conf.d/mysql.cnf
87+
iniset -sudo $my_client_conf mysql ssl-fips-mode "on"
88+
iniset -sudo $my_conf mysqld ssl-fips-mode "on"
89+
fi
90+
fi
91+
8392
# Change bind-address from localhost (127.0.0.1) to any (::)
8493
iniset -sudo $my_conf mysqld bind-address "$(ipv6_unquote $SERVICE_LISTEN_ADDRESS)"
8594

0 commit comments

Comments
 (0)