summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLuis Pabon <lpabon@redhat.com>2013-08-26 15:22:14 -0400
committerVijay Bellur <vbellur@redhat.com>2013-08-27 20:40:14 -0700
commit41deb1ec8f7d1091de702947876444dd713fab7f (patch)
treed6c37141ae930d24f9adb13fe173d187167a86a4
parent34bca063cd8e7721c876e0f06d42978d5ff4d835 (diff)
Do not overwrite swift config files on upgrade
We now include the config files as part of the RPM and include the directive %config(noreplace) in the RPM specfile for upgrades, installations, and removals. When the system is now upgraded to this fix number, any of the config files edited are kept verbatim. When the system is upgraded to the gluster-swift project, their config files are saved as ${configfile}.rpmsave since they will need to re-inspect the file using the new grizzly settings. BUG: 1001418 Change-Id: I306501d3148f5f6a1d2ee381a9abd98efccadd00 Signed-off-by: Luis Pabon <lpabon@redhat.com> Reviewed-on: http://review.gluster.org/5706 Reviewed-by: Peter Portante <pportant@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
-rw-r--r--swift/1.4.8/gluster-swift-plugin.spec41
-rw-r--r--swift/1.4.8/plugins/conf/account-server/1.conf-gluster22
-rw-r--r--swift/1.4.8/plugins/conf/container-server/1.conf-gluster24
-rw-r--r--swift/1.4.8/plugins/conf/fs.conf-gluster9
-rw-r--r--swift/1.4.8/plugins/conf/object-server/1.conf-gluster22
-rw-r--r--swift/1.4.8/plugins/conf/proxy-server.conf-gluster21
-rw-r--r--swift/1.4.8/plugins/conf/swift.conf-gluster7
7 files changed, 143 insertions, 3 deletions
diff --git a/swift/1.4.8/gluster-swift-plugin.spec b/swift/1.4.8/gluster-swift-plugin.spec
index 746f75c..bdf7a24 100644
--- a/swift/1.4.8/gluster-swift-plugin.spec
+++ b/swift/1.4.8/gluster-swift-plugin.spec
@@ -13,7 +13,7 @@
%define _confdir /etc/swift
%define _swiftdir /usr/lib/python2.6/site-packages/swift
%define _ufo_version 1.0
-%define _ufo_release 3
+%define _ufo_release 7
Summary : GlusterFS Unified File and Object Storage.
Name : gluster-swift-plugin
@@ -44,6 +44,9 @@ rm -rf %{buildroot}
mkdir -p %{buildroot}/%{_swiftdir}/plugins
mkdir -p %{buildroot}/%{_confdir}/
+mkdir -p %{buildroot}/%{_confdir}/account-server
+mkdir -p %{buildroot}/%{_confdir}/container-server
+mkdir -p %{buildroot}/%{_confdir}/object-server
cp constraints.py %{buildroot}/%{_swiftdir}/plugins
cp DiskDir.py %{buildroot}/%{_swiftdir}/plugins
@@ -52,9 +55,41 @@ cp Glusterfs.py %{buildroot}/%{_swiftdir}/plugins
cp __init__.py %{buildroot}/%{_swiftdir}/plugins
cp utils.py %{buildroot}/%{_swiftdir}/plugins
-cp -r conf/* %{buildroot}/%{_confdir}/
+cp -r conf/account.builder %{buildroot}/%{_confdir}
+cp -r conf/account.ring.gz %{buildroot}/%{_confdir}
+cp -r conf/container.builder %{buildroot}/%{_confdir}
+cp -r conf/container.ring.gz %{buildroot}/%{_confdir}
+cp -r conf/db_file.db %{buildroot}/%{_confdir}
+cp -r conf/fs.conf-gluster %{buildroot}/%{_confdir}
+cp -r conf/fs.conf %{buildroot}/%{_confdir}
+cp -r conf/object.builder %{buildroot}/%{_confdir}
+cp -r conf/object.ring.gz %{buildroot}/%{_confdir}
+cp -r conf/proxy-server.conf-gluster %{buildroot}/%{_confdir}
+cp -r conf/proxy-server.conf %{buildroot}/%{_confdir}
+cp -r conf/swift.conf-gluster %{buildroot}/%{_confdir}
+cp -r conf/swift.conf %{buildroot}/%{_confdir}
+cp -r conf/account-server/1.conf-gluster %{buildroot}/%{_confdir}/account-server
+cp -r conf/account-server/1.conf %{buildroot}/%{_confdir}/account-server
+cp -r conf/container-server/1.conf-gluster %{buildroot}/%{_confdir}/container-server
+cp -r conf/container-server/1.conf %{buildroot}/%{_confdir}/container-server
+cp -r conf/object-server/1.conf-gluster %{buildroot}/%{_confdir}/object-server
+cp -r conf/object-server/1.conf %{buildroot}/%{_confdir}/object-server
%files
%defattr(-,root,root)
%{_swiftdir}/plugins
-%{_confdir}/
+%{_confdir}/*.builder
+%{_confdir}/*.ring.gz
+%{_confdir}/db_file.db
+%config %{_confdir}/account-server/1.conf-gluster
+%config %{_confdir}/container-server/1.conf-gluster
+%config %{_confdir}/object-server/1.conf-gluster
+%config %{_confdir}/swift.conf-gluster
+%config %{_confdir}/proxy-server.conf-gluster
+%config %{_confdir}/fs.conf-gluster
+%config(noreplace) %{_confdir}/account-server/1.conf
+%config(noreplace) %{_confdir}/container-server/1.conf
+%config(noreplace) %{_confdir}/object-server/1.conf
+%config(noreplace) %{_confdir}/swift.conf
+%config(noreplace) %{_confdir}/proxy-server.conf
+%config(noreplace) %{_confdir}/fs.conf
diff --git a/swift/1.4.8/plugins/conf/account-server/1.conf-gluster b/swift/1.4.8/plugins/conf/account-server/1.conf-gluster
new file mode 100644
index 0000000..54cbf65
--- /dev/null
+++ b/swift/1.4.8/plugins/conf/account-server/1.conf-gluster
@@ -0,0 +1,22 @@
+[DEFAULT]
+devices = /srv/1/node
+mount_check = false
+bind_port = 6012
+user = root
+log_facility = LOG_LOCAL2
+
+[pipeline:main]
+pipeline = gluster account-server
+
+[app:account-server]
+use = egg:swift#account
+
+[filter:gluster]
+use = egg:swift#gluster
+
+[account-replicator]
+vm_test_mode = yes
+
+[account-auditor]
+
+[account-reaper]
diff --git a/swift/1.4.8/plugins/conf/container-server/1.conf-gluster b/swift/1.4.8/plugins/conf/container-server/1.conf-gluster
new file mode 100644
index 0000000..9e77683
--- /dev/null
+++ b/swift/1.4.8/plugins/conf/container-server/1.conf-gluster
@@ -0,0 +1,24 @@
+[DEFAULT]
+devices = /srv/1/node
+mount_check = false
+bind_port = 6011
+user = root
+log_facility = LOG_LOCAL2
+
+[pipeline:main]
+pipeline = gluster container-server
+
+[app:container-server]
+use = egg:swift#container
+
+[filter:gluster]
+use = egg:swift#gluster
+
+[container-replicator]
+vm_test_mode = yes
+
+[container-updater]
+
+[container-auditor]
+
+[container-sync]
diff --git a/swift/1.4.8/plugins/conf/fs.conf-gluster b/swift/1.4.8/plugins/conf/fs.conf-gluster
new file mode 100644
index 0000000..b6ec512
--- /dev/null
+++ b/swift/1.4.8/plugins/conf/fs.conf-gluster
@@ -0,0 +1,9 @@
+[DEFAULT]
+mount_path = /mnt/gluster-object
+auth_account = auth
+#ip of the fs server.
+mount_ip = localhost
+#fs server need not be local, remote server can also be used,
+#set remote_cluster=yes for using remote server.
+remote_cluster = no
+object_only = no \ No newline at end of file
diff --git a/swift/1.4.8/plugins/conf/object-server/1.conf-gluster b/swift/1.4.8/plugins/conf/object-server/1.conf-gluster
new file mode 100644
index 0000000..f191cef
--- /dev/null
+++ b/swift/1.4.8/plugins/conf/object-server/1.conf-gluster
@@ -0,0 +1,22 @@
+[DEFAULT]
+devices = /srv/1/node
+mount_check = false
+bind_port = 6010
+user = root
+log_facility = LOG_LOCAL2
+
+[pipeline:main]
+pipeline = gluster object-server
+
+[app:object-server]
+use = egg:swift#object
+
+[filter:gluster]
+use = egg:swift#gluster
+
+[object-replicator]
+vm_test_mode = yes
+
+[object-updater]
+
+[object-auditor]
diff --git a/swift/1.4.8/plugins/conf/proxy-server.conf-gluster b/swift/1.4.8/plugins/conf/proxy-server.conf-gluster
new file mode 100644
index 0000000..1fcde8e
--- /dev/null
+++ b/swift/1.4.8/plugins/conf/proxy-server.conf-gluster
@@ -0,0 +1,21 @@
+[DEFAULT]
+bind_port = 8080
+user = root
+log_facility = LOG_LOCAL1
+
+[pipeline:main]
+pipeline = healthcheck cache tempauth proxy-server
+
+[app:proxy-server]
+use = egg:swift#proxy
+allow_account_management = true
+account_autocreate = true
+
+[filter:tempauth]
+use = egg:swift#tempauth
+
+[filter:healthcheck]
+use = egg:swift#healthcheck
+
+[filter:cache]
+use = egg:swift#memcache
diff --git a/swift/1.4.8/plugins/conf/swift.conf-gluster b/swift/1.4.8/plugins/conf/swift.conf-gluster
new file mode 100644
index 0000000..f9864e3
--- /dev/null
+++ b/swift/1.4.8/plugins/conf/swift.conf-gluster
@@ -0,0 +1,7 @@
+[DEFAULT]
+Enable_plugin = yes
+
+[swift-hash]
+# random unique string that can never change (DO NOT LOSE)
+swift_hash_path_suffix = gluster
+