Bug 11588 - Can't resolve own hostname when running under QEMU
Summary: Can't resolve own hostname when running under QEMU
Status: RESOLVED FIXED
Alias: None
Product: IoT Reference OS Kit
Classification: Yocto Project Subprojects
Component: intel-iot-refkit-connectivity (show other bugs)
Version: 2.4
Hardware: x86 Multiple
: Medium normal
Target Milestone: 2.4 M1
Assignee: Dmitry Rozhkov
QA Contact:
URL:
Whiteboard:
Depends on:
Blocks:
 
Reported: 2017-05-29 10:50 UTC by Dmitry Rozhkov
Modified: 2017-06-06 08:20 UTC (History)
2 users (show)

See Also:
OS type for building Yocto: ---
Type of Regression: ---
Verified:
Documentation change: No (bug/feature does not impact docs)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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.