summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--deploy/post/execute.py4
-rw-r--r--tests/data/openrc_conf/globals_odl.yml2
-rwxr-xr-xtools/centos-img-modify.sh5
-rwxr-xr-xtools/daisy-img-modify.sh6
4 files changed, 14 insertions, 3 deletions
diff --git a/deploy/post/execute.py b/deploy/post/execute.py
index fe4185b8..6acbe637 100644
--- a/deploy/post/execute.py
+++ b/deploy/post/execute.py
@@ -20,8 +20,8 @@ from deploy.utils import err_exit
def _config_kolla_admin_openrc(kolla_config_path):
with open('%s/globals.yml' % kolla_config_path, 'r') as f:
kolla_config = yaml.safe_load(f.read())
- if kolla_config.get('opendaylight_leader_ip_address'):
- sdn_controller_ip = kolla_config.get('opendaylight_leader_ip_address')
+ if kolla_config.get('enable_opendaylight', None) == 'yes':
+ sdn_controller_ip = kolla_config.get('kolla_internal_vip_address')
openrc_file = file('%s/admin-openrc.sh' % kolla_config_path, 'a')
sdn_ctl_ip = 'export SDN_CONTROLLER_IP=' + sdn_controller_ip + '\n'
openrc_file.write(sdn_ctl_ip)
diff --git a/tests/data/openrc_conf/globals_odl.yml b/tests/data/openrc_conf/globals_odl.yml
index 50df4084..588dd927 100644
--- a/tests/data/openrc_conf/globals_odl.yml
+++ b/tests/data/openrc_conf/globals_odl.yml
@@ -2,6 +2,7 @@ docker_namespace: kolla
docker_registry: 10.20.11.2:4000
enable_ceph: 'yes'
enable_cinder: 'yes'
+enable_opendaylight: 'yes'
keepalived_interface: ens9
kolla_external_vip_interface: ens3
kolla_internal_vip_address: 10.20.11.11
@@ -10,4 +11,3 @@ neutron_external_interface: ens8
openstack_release: 4.0.2
storage_interface: ens3
tunnel_interface: ens3
-opendaylight_leader_ip_address: 10.20.7.3 \ No newline at end of file
diff --git a/tools/centos-img-modify.sh b/tools/centos-img-modify.sh
index c095be73..5a2df82f 100755
--- a/tools/centos-img-modify.sh
+++ b/tools/centos-img-modify.sh
@@ -69,3 +69,8 @@ cat << EOF > /etc/cloud/cloud.cfg.d/default.cfg
disable_root: False
ssh_pwauth: True
EOF
+
+cd /etc
+if [ ! -z $localtime_file ] && [ -f $localtime_file ]; then
+ ln -s -f $localtime_file /etc/localtime
+fi
diff --git a/tools/daisy-img-modify.sh b/tools/daisy-img-modify.sh
index aad29949..43fd186b 100755
--- a/tools/daisy-img-modify.sh
+++ b/tools/daisy-img-modify.sh
@@ -186,6 +186,12 @@ setup() {
chroot $mountdir df -h
cp $cmd $mountdir/$(basename $cmd)
+
+ if [ -h /etc/localtime ]; then
+ export localtime_file=$(ls -l /etc/localtime | grep "^l" | awk '{print $11}')
+ elif [ -f /etc/localtime ]; then
+ cp /etc/loccaltime $mountdir/etc/
+ fi
}
# modify image running a script using in a chrooted environment