Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chef-client hangs (ohai discovery hangs) when a server has a mounted nfs filesystem while the remote host does not respond #537

Closed
liutc opened this issue May 6, 2015 · 4 comments
Labels
Expeditor: Skip Version Bump Used to skip built_in:bump_version Priority: Low Type: Enhancement Adds new functionality.

Comments

@liutc
Copy link

liutc commented May 6, 2015

Version:

Ohai: 8.0.1
Chef: 12.0.3 (chef-client)
Environment:

CentOS 6.6
AIX 7.1

Scenario:

When I have a mounted nfs filesystem, I run chef-client to perform a discovery or change (executing some recipes). If the remote host exporting the nfs directory does not respond (nfs service down, etc.), the chef-client will just hang there.

Steps to Reproduce:

  1. create a nfs export on one server, e.g. exporting /test_export on "remote_host"
  2. mount it on a second server
  3. stop the nfs service on the first server
  4. run chef-client or ohai on the second server

Expected Result:

The chef-client can run and exit (no matter with error or not).

Actual Result

The chef-client hangs.

Root cause

This hang is caused by the command "df" is hanging which is part of the ohai discovery of filesystem (the filesystem plugin). If the remote host does not respond, the df command hangs which further cause the chef-client process hangs.

@thommay thommay added this to the Accepted Minor milestone Feb 17, 2016
@thommay
Copy link
Contributor

thommay commented Feb 17, 2016

it would seem reasonable to time out the call to df after 30 seconds or so

@thommay
Copy link
Contributor

thommay commented Feb 17, 2016

(you'll presumably have a zombie df hanging around, but there's not much we can do about that)

@lamont-granquist
Copy link
Contributor

closing since #738 is a more general solution

@liutc
Copy link
Author

liutc commented Feb 18, 2016

Changing the default timeout to 30 seconds can resolve the problem. The issue then is whether the filesystem (or new filesystem2 plugin) can still get some information of the local filesystems. 
 
 
Best Regards,Dr. Tiancheng Liu (刘天成)Cloud Operations TechnologyIBM Research - ChinaPhone: (86-10)58748521Fax: (86-10)58748731Email: liutc@cn.ibm.comAddress: Building 19 Zhongguancun Software Park, 8 Dongbeiwang WestRoad, Haidian District, Beijing, P.R. ChinaBeijing 100193
 
 
----- Original message -----From: Lamont Granquist notifications@github.comTo: chef/ohai ohai@noreply.github.comCc: Tian Cheng Liu/China/IBM@IBMCNSubject: Re: [ohai] chef-client hangs (ohai discovery hangs) when a server has a mounted nfs filesystem while the remote host does not respond (#537)Date: Thu, Feb 18, 2016 2:49 AM 
closing since #738 is a more general solution
—Reply to this email directly or view it on GitHub.

@thommay thommay added Expeditor: Skip Version Bump Used to skip built_in:bump_version and removed Meta: Exclude From Changelog labels Sep 22, 2017
@chef chef locked and limited conversation to collaborators Nov 16, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Expeditor: Skip Version Bump Used to skip built_in:bump_version Priority: Low Type: Enhancement Adds new functionality.
Projects
None yet
Development

No branches or pull requests

4 participants