Bug 11588

Summary: Can't resolve own hostname when running under QEMU
Product: [Yocto Project Subprojects] IoT Reference OS Kit Reporter: Dmitry Rozhkov <dmitry.rojkov>
Component: intel-iot-refkit-connectivityAssignee: Dmitry Rozhkov <dmitry.rojkov>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: Medium CC: matti-pekka.sivosuo, mikko.ylinen
Version: 2.4   
Target Milestone: 2.4 M1   
Hardware: x86   
OS: Multiple   
Whiteboard:
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: No (bug/feature does not impact docs)

Description Dmitry Rozhkov 2017-05-29 10:50:35 UTC
The command

> ping `hostname`

seems to work in Refkit on real hardware, but it fails to resolve the result of the `hostname` command when running in QEMU. Which makes testing ROS nodes inconvenient because ROS tests accessibility of `hostname` (the default name of a master ROS node) before launching any node.

The file /etc/nsswitch.conf contains the line

> hosts:          files myhostname  dns

So the culprit is a malfunction in the myhostname plugin most probably.
Comment 1 Dmitry Rozhkov 2017-05-29 11:47:01 UTC
PR: https://github.com/intel/intel-iot-refkit/pull/167
Comment 2 Mikko Ylinen 2017-06-06 08:20:50 UTC
PR #167 is merged.