[openstack-nova] fix the integration with tgtd

Pádraig Brady pbrady at fedoraproject.org
Fri Sep 21 17:44:09 UTC 2012


commit ac5107b3816769bef807583de64ebd16be7ea6f5
Author: Pádraig Brady <P at draigBrady.com>
Date:   Fri Sep 21 18:24:32 2012 +0100

    fix the integration with tgtd
    
    Since Folsom, nova-volume will write tgtd config info to be acted on,
    Sinceso we must configure tgtd to do so.  Note by default nova will
    Sincewrite the config to /var/lib/nova/volumes, but we've changed
    Sincethat to /etc/nova/volumes to avoid/simplify SELinux etc_t issues.

 nova-tgt.conf       |    1 +
 nova.conf           |    1 +
 openstack-nova.spec |    6 ++++++
 3 files changed, 8 insertions(+), 0 deletions(-)
---
diff --git a/nova-tgt.conf b/nova-tgt.conf
new file mode 100644
index 0000000..003c2eb
--- /dev/null
+++ b/nova-tgt.conf
@@ -0,0 +1 @@
+include /etc/nova/volumes/*
diff --git a/nova.conf b/nova.conf
index b73f700..859d6a8 100644
--- a/nova.conf
+++ b/nova.conf
@@ -2,6 +2,7 @@
 logdir = /var/log/nova
 state_path = /var/lib/nova
 lock_path = /var/lib/nova/tmp
+volumes_dir = /etc/nova/volumes
 dhcpbridge = /usr/bin/nova-dhcpbridge
 dhcpbridge_flagfile = /etc/nova/nova.conf
 force_dhcp_release = True
diff --git a/openstack-nova.spec b/openstack-nova.spec
index b676d9a..ea9d8a8 100644
--- a/openstack-nova.spec
+++ b/openstack-nova.spec
@@ -10,6 +10,7 @@ License:          ASL 2.0
 URL:              http://openstack.org/projects/compute/
 Source0:          http://launchpad.net/nova/folsom/folsom-rc1/+download/nova-2012.2~rc1.tar.gz
 Source1:          nova.conf
+Source3:          nova-tgt.conf
 Source6:          nova.logrotate
 
 Source10:         openstack-nova-api.service
@@ -395,6 +396,8 @@ touch %{buildroot}%{_sharedstatedir}/nova/CA/private/cakey.pem
 # Install config files
 install -d -m 755 %{buildroot}%{_sysconfdir}/nova
 install -p -D -m 640 %{SOURCE1} %{buildroot}%{_sysconfdir}/nova/nova.conf
+install -d -m 755 %{buildroot}%{_sysconfdir}/nova/volumes
+install -p -D -m 644 %{SOURCE3} %{buildroot}%{_sysconfdir}/tgt/conf.d/nova.conf
 install -p -D -m 640 etc/nova/rootwrap.conf %{buildroot}%{_sysconfdir}/nova/rootwrap.conf
 install -p -D -m 640 etc/nova/api-paste.ini %{buildroot}%{_sysconfdir}/nova/api-paste.ini
 install -p -D -m 640 etc/nova/policy.json %{buildroot}%{_sysconfdir}/nova/policy.json
@@ -675,6 +678,8 @@ fi
 %{_bindir}/nova-volume-usage-audit
 %{_unitdir}/openstack-nova-volume.service
 %{_datarootdir}/nova/rootwrap/volume.filters
+%config(noreplace) %{_sysconfdir}/tgt/conf.d/nova.conf
+%dir %attr(0755, nova, root) %{_sysconfdir}/nova/volumes
 
 %files scheduler
 %{_bindir}/nova-scheduler
@@ -729,6 +734,7 @@ fi
 %changelog
 * Fri Sep 21 2012 Pádraig Brady <pbrady at redhat.com> - 2012.2-0.8.f3
 - Update to folsom rc1
+- Fix to ensure that tgt configuration is honored
 
 * Mon Sep 17 2012 Alan Pevec <apevec at redhat.com> - 2012.2-0.7.f3
 - Remove user config from paste ini files


More information about the scm-commits mailing list