]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-cookbooks.git/commitdiff
Apt-pins the Ceph version to the Ceph repo version 140/head
authorWalter Huf <walter.huf@corvisa.com>
Wed, 30 Jul 2014 16:44:58 +0000 (11:44 -0500)
committerWalter Huf <walter.huf@corvisa.com>
Thu, 31 Jul 2014 03:05:04 +0000 (22:05 -0500)
Ubuntu 14.04 ships a newer version than this cookbook defaults to.
This pin allows for easy installation of the same Ceph version across multiple Ubuntu versions

recipes/apt.rb
test/integration/aio/bats/version.bats [new file with mode: 0644]

index d101b006de73068112dda356dba7c4f64f6e5611..df1422b285b24201a66e0ecb8324add25b7de357 100644 (file)
@@ -9,6 +9,12 @@ when 'jessie' then 'sid'
 else node['lsb']['codename']
 end
 
+apt_preference 'ceph_repo' do
+  package_name '*'
+  pin 'origin "ceph.com"'
+  pin_priority '1001'
+end
+
 apt_repository 'ceph' do
   repo_name 'ceph'
   uri node['ceph']['debian'][branch]['repository']
diff --git a/test/integration/aio/bats/version.bats b/test/integration/aio/bats/version.bats
new file mode 100644 (file)
index 0000000..93abb29
--- /dev/null
@@ -0,0 +1,6 @@
+@test "ceph is installed from the official repo" {
+  cephversion=`apt-cache policy ceph | grep -B 1 ceph.com | head -n 1 | sed 's/^[^0-9]\+\([^ ]\+\).*/\1/'`
+  installedversion=`apt-cache policy ceph | grep 'Installed:' | awk '{print $2}'`
+  test "$cephversion" = "$installedversion"
+}
+