Fix rubocop 1
This commit is contained in:
parent
c14d066a36
commit
4959c4f9a5
@ -24,7 +24,7 @@ if node['roles'].include?("ceph-radosgw") \
|
||||
&& node["ceph"]["radosgw"]["webserver_companion"] == "apache2" \
|
||||
&& node["ceph"]["radosgw"]["use_apache_fork"] == true
|
||||
case node['lsb']['codename']
|
||||
when "precise","oneiric"
|
||||
when "precise", "oneiric"
|
||||
apt_repository "ceph-apache2" do
|
||||
repo_name "ceph-apache2"
|
||||
uri "http://gitbuilder.ceph.com/apache2-deb-#{node['lsb']['codename']}-x86_64-basic/ref/master"
|
||||
|
@ -29,17 +29,16 @@ ceph_client name do
|
||||
as_keyring false
|
||||
end
|
||||
|
||||
mons = get_mon_addresses()
|
||||
mons = mons.join(",")
|
||||
mons = mons + ":/"
|
||||
if not mons.empty?
|
||||
directory node['ceph']['cephfs_mount']
|
||||
mount node['ceph']['cephfs_mount'] do
|
||||
fstype "ceph"
|
||||
device mons
|
||||
options "_netdev,name=#{client_name},secretfile=#{filename}"
|
||||
dump 0
|
||||
pass 0
|
||||
action [:mount, :enable]
|
||||
end
|
||||
mons = get_mon_addresses.join(",") + ":/"
|
||||
|
||||
directory node['ceph']['cephfs_mount']
|
||||
|
||||
mount node['ceph']['cephfs_mount'] do
|
||||
fstype "ceph"
|
||||
device mons
|
||||
options "_netdev,name=#{client_name},secretfile=#{filename}"
|
||||
dump 0
|
||||
pass 0
|
||||
action [:mount, :enable]
|
||||
not_if { mons.empty? }
|
||||
end
|
||||
|
@ -1,12 +1,9 @@
|
||||
raise "fsid must be set in config" if node["ceph"]["config"]['fsid'].nil?
|
||||
raise "mon_initial_members must be set in config" if node["ceph"]["config"]['mon_initial_members'].nil?
|
||||
fail "fsid must be set in config" if node["ceph"]["config"]['fsid'].nil?
|
||||
fail "mon_initial_members must be set in config" if node["ceph"]["config"]['mon_initial_members'].nil?
|
||||
|
||||
mon_addresses = get_mon_addresses()
|
||||
mon_addresses = get_mon_addresses
|
||||
|
||||
is_rgw = false
|
||||
if node['roles'].include? 'ceph-radosgw'
|
||||
is_rgw = true
|
||||
end
|
||||
is_rgw = node['roles'].include?('ceph-radosgw')
|
||||
|
||||
directory "/etc/ceph" do
|
||||
owner "root"
|
||||
|
@ -16,5 +16,5 @@
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
|
||||
include_recipe "ceph::default"
|
||||
|
@ -20,7 +20,7 @@
|
||||
# this recipe allows bootstrapping new osds, with help from mon
|
||||
# Sample environment:
|
||||
# #knife node edit ceph1
|
||||
#"osd_devices": [
|
||||
# "osd_devices": [
|
||||
# {
|
||||
# "device": "/dev/sdc"
|
||||
# },
|
||||
@ -29,7 +29,7 @@
|
||||
# "dmcrypt": true,
|
||||
# "journal": "/dev/sdd"
|
||||
# }
|
||||
#]
|
||||
# ]
|
||||
|
||||
include_recipe "ceph::default"
|
||||
include_recipe "ceph::conf"
|
||||
@ -38,16 +38,15 @@ package 'gdisk' do
|
||||
action :upgrade
|
||||
end
|
||||
|
||||
if !search(:node,"hostname:#{node['hostname']} AND dmcrypt:true").empty?
|
||||
package 'cryptsetup' do
|
||||
action :upgrade
|
||||
end
|
||||
package 'cryptsetup' do
|
||||
action :upgrade
|
||||
not_if { search(:node,"hostname:#{node['hostname']} AND dmcrypt:true").empty? }
|
||||
end
|
||||
|
||||
service_type = node["ceph"]["osd"]["init_style"]
|
||||
mons = node['ceph']['encrypted_data_bags'] ? get_mon_nodes : get_mon_nodes("ceph_bootstrap_osd_key:*")
|
||||
|
||||
if mons.empty? then
|
||||
if mons.empty?
|
||||
puts "No ceph-mon found."
|
||||
else
|
||||
|
||||
@ -57,7 +56,7 @@ else
|
||||
mode "0755"
|
||||
end
|
||||
|
||||
# TODO cluster name
|
||||
# TODO: cluster name
|
||||
cluster = 'ceph'
|
||||
|
||||
osd_secret = if node['ceph']['encrypted_data_bags']
|
||||
|
@ -18,12 +18,12 @@
|
||||
# limitations under the License.
|
||||
|
||||
case node['platform_family']
|
||||
when "debian","suse"
|
||||
when "debian", "suse"
|
||||
packages = %w{
|
||||
apache2
|
||||
libapache2-mod-fastcgi
|
||||
}
|
||||
when "rhel","fedora"
|
||||
when "rhel", "fedora"
|
||||
packages = %w{
|
||||
httpd
|
||||
mod_fastcgi
|
||||
|
@ -4,5 +4,5 @@ when "debian"
|
||||
when "rhel", "suse"
|
||||
include_recipe "ceph::rpm"
|
||||
else
|
||||
raise "not supported"
|
||||
fail "not supported"
|
||||
end
|
||||
|
@ -2,10 +2,10 @@ actions :add
|
||||
default_action :add
|
||||
|
||||
attribute :name, :kind_of => String, :name_attribute => true
|
||||
attribute :caps, :kind_of => Hash, :default => {"mon"=>"allow r", "osd"=>"allow r"}
|
||||
attribute :caps, :kind_of => Hash, :default => {"mon" => "allow r", "osd" => "allow r"}
|
||||
|
||||
# Whether to store the secret in a keyring file or a plain secret file
|
||||
attribute :as_keyring, :kind_of => [TrueClass,FalseClass], :default => true
|
||||
attribute :as_keyring, :kind_of => [TrueClass, FalseClass], :default => true
|
||||
|
||||
# what the key should be called in the ceph cluster
|
||||
# defaults to client.#{name}.#{hostname}
|
||||
|
Loading…
x
Reference in New Issue
Block a user