Package Install Timeouts


#1

We’ve come across a couple package installations that result in timeout errors when installing with the package resource. (The specific packages are virtualbox and ruby1.9.3 on Ubuntu 12.04LTS).

Is there any way to work around this, or specify an increased timeout during specific package installations?

Thanks,
Curtis


#2

On Tue, Mar 25, 2014 at 6:39 PM, Stewart, Curtis
cstewart@momentumsi.com wrote:

We’ve come across a couple package installations that result in timeout
errors when installing with the package resource. (The specific packages
are virtualbox and ruby1.9.3 on Ubuntu 12.04LTS).

Is there any way to work around this, or specify an increased timeout during
specific package installations?

Can you gist some output so we can see what exactly is timing out?

  • Julian


[ Julian C. Dunn jdunn@aquezada.com * Sorry, I’m ]
[ WWW: http://www.aquezada.com/staff/julian * only Web 1.0 ]
[ gopher://sdf.org/1/users/keymaker/ * compliant! ]
[ PGP: 91B3 7A9D 683C 7C16 715F 442C 6065 D533 FDC2 05B9 ]


#3

Hi Julian, Curtis,

May I still join the discussion, cause I think I’m struggling with the same
problem the last days?
Downloading the jdk1.8.0 using the ‘java’ cookbook, times out after 10
minutes, which is approximately one minute too short, as the client.log tells
me.
An except of my client.log is attached to this mail.

Looking for a solution/workaround I may have found the source of my pain here:
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/mixlib-
shellout-1.3.0/lib/mixlib/shellout.rb:29: DEFAULT_READ_TIMEOUT = 600

A couple of interesting lines are in the mentioned file:
186 def timeout
187 @timeout || DEFAULT_READ_TIMEOUT
188 end
but I’m not a ruby-expert and don’t know how to deal with this knowledge, so I
still (also?) like to ask how can I increase this timeout?

A workaround could be to change the DEFAULT_READ_TIMEOUT in my chef-client
installation, but I’d like to avoid that and have yet not tried if this
’solution’ is working.

Thanks in advance and best regards.
Kay

On Tue, Mar 25, 2014 at 11:19 PM, Julian C. Dunn wrote:

On Tue, Mar 25, 2014 at 6:39 PM, Stewart, Curtis

cstewart@momentumsi.com wrote:

Can you gist some output so we can see what exactly is timing out?

  • Julian

#4

Looks like this cookbook is shelling out to curl to do the download, probably via an execute resource or direct call to the shellout method. In either case it should be possible to modify the timeout in the cookbook.


Daniel DeLeo

On Tuesday, March 25, 2014 at 11:53 PM, Kay Münch wrote:

Hi Julian, Curtis,

May I still join the discussion, cause I think I’m struggling with the same
problem the last days?
Downloading the jdk1.8.0 using the ‘java’ cookbook, times out after 10
minutes, which is approximately one minute too short, as the client.log tells
me.
An except of my client.log is attached to this mail.

Looking for a solution/workaround I may have found the source of my pain here:
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/mixlib-
shellout-1.3.0/lib/mixlib/shellout.rb:29: DEFAULT_READ_TIMEOUT = 600

A couple of interesting lines are in the mentioned file:
186 def timeout
187 @timeout || DEFAULT_READ_TIMEOUT
188 end
but I’m not a ruby-expert and don’t know how to deal with this knowledge, so I
still (also?) like to ask how can I increase this timeout?

A workaround could be to change the DEFAULT_READ_TIMEOUT in my chef-client
installation, but I’d like to avoid that and have yet not tried if this
’solution’ is working.

Thanks in advance and best regards.
Kay

On Tue, Mar 25, 2014 at 11:19 PM, Julian C. Dunn wrote:

On Tue, Mar 25, 2014 at 6:39 PM, Stewart, Curtis

<cstewart@momentumsi.com (mailto:cstewart@momentumsi.com)> wrote:

Can you gist some output so we can see what exactly is timing out?

  • Julian

Attachments:

  • client.log

#5

Hi Daniel,

thanks a lot for your suggestion. I came to a working solution by changing

—8<—
def download_direct_from_oracle(tarball_name, new_resource)

cmd = shell_out!(
%Q[ curl --create-dirs -L --cookie
"#{cookie}" #{new_resource.url} -o #{download_path} ]
)
—8<—

into

—8<—
def download_direct_from_oracle(tarball_name, new_resource)

cmd = shell_out!(
%Q[ curl --create-dirs -L --cookie
"#{cookie}" #{new_resource.url} -o #{download_path} ], :timeout => 1200
)
—8<—

within the provided ark.rb from the java cookbook.
Many thanks again and best regards.
Kay

On Wednesday, March 26, 2014 at 08:36 AM, Daniel DeLeo wrote:

Looks like this cookbook is shelling out to curl to do the download,
probably via an execute resource or direct call to the shellout method. In
either case it should be possible to modify the timeout in the cookbook.


Daniel DeLeo