Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion providers/pool.rb
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ def load_current_resource
def create_pool
cmd_text = "ceph osd pool create #{new_resource.name} #{new_resource.pg_num}"
cmd_text << " #{new_resource.create_options}" if new_resource.create_options
cmd = Mixlib::ShellOut.new(cmd_text)
cmd = Mixlib::ShellOut.new(cmd_text, :timeout => new_resource.timeout)
cmd.run_command
cmd.error!
Chef::Log.debug "Pool created: #{cmd.stderr}"
Expand Down
3 changes: 3 additions & 0 deletions resources/pool.rb
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@
# Optional arguments for pool creation
attribute :create_options, :kind_of => String

# The number of seconds before a timeout occurs during pool creation
attribute :timeout, :kind_of => Integer, :default => nil, :required => false
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:default => nil, :required => false are optional as it's the default behavior


# Forces a non-empty pool to be deleted.
attribute :force, :kind_of => [TrueClass, FalseClass], :default => false

Expand Down