From ca20c992b88435d51d620a5854b284f4fa5bb649 Mon Sep 17 00:00:00 2001 From: Walter Huf Date: Wed, 30 Jul 2014 11:44:58 -0500 Subject: [PATCH] Apt-pins the Ceph version to the Ceph repo version 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 | 6 ++++++ test/integration/aio/bats/version.bats | 6 ++++++ 2 files changed, 12 insertions(+) create mode 100644 test/integration/aio/bats/version.bats diff --git a/recipes/apt.rb b/recipes/apt.rb index d101b00..df1422b 100644 --- a/recipes/apt.rb +++ b/recipes/apt.rb @@ -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 index 0000000..93abb29 --- /dev/null +++ b/test/integration/aio/bats/version.bats @@ -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" +} + -- 2.47.3