File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -78,7 +78,7 @@ def download_direct_from_oracle(tarball_name, new_resource)
7878 converge_by ( description ) do
7979 Chef ::Log . debug "downloading oracle tarball straight from the source"
8080 cmd = shell_out! (
81- %Q[ curl --create-dirs -L --cookie "#{ cookie } " #{ new_resource . url } -o #{ download_path } ]
81+ %Q[ curl --create-dirs -L --retry #{ new_resource . retries } --retry-delay #{ new_resource . retry_delay } -- cookie "#{ cookie } " #{ new_resource . url } -o #{ download_path } ]
8282 )
8383 end
8484 else
@@ -123,6 +123,8 @@ def download_direct_from_oracle(tarball_name, new_resource)
123123 r = remote_file "#{ Chef ::Config [ :file_cache_path ] } /#{ tarball_name } " do
124124 source new_resource . url
125125 checksum new_resource . checksum
126+ retries new_resource . retries
127+ retry_delay new_resource . retry_delay
126128 mode 0755
127129 action :nothing
128130 end
Original file line number Diff line number Diff line change 4040attribute :owner , :default => "root"
4141attribute :default , :equal_to => [ true , false ] , :default => true
4242attribute :alternatives_priority , :kind_of => Integer , :default => 1
43+ attribute :retries , :kind_of => Integer , :default => 0
44+ attribute :retry_delay , :kind_of => Integer , :default => 2
4345
4446# we have to set default for the supports attribute
4547# in initializer since it is a 'reserved' attribute name
You can’t perform that action at this time.
0 commit comments