Bug 1334735

Summary: No way to change /etc/hosts in cockpit UI
Product: [oVirt] ovirt-node Reporter: Sandro Bonazzola <sbonazzo>
Component: UIAssignee: Fabian Deutsch <fdeutsch>
Status: CLOSED DUPLICATE QA Contact: Ying Cui <ycui>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 4.0CC: bugs
Target Milestone: ---Flags: rule-engine: planning_ack?
rule-engine: devel_ack?
rule-engine: testing_ack?
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-05-10 15:35:29 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: Node RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 1329943    
Bug Blocks:    

Description Sandro Bonazzola 2016-05-10 12:27:05 UTC
Set host name on the NGN host without DNS entry for this host.

Going to ovirt -> virtual machines -> running vms tab the following error is showed:


Vdsm execution failed! Please check: 
- [path_to_cokcpit-ovirt-plugin]/vdsm/vdsm is executable,
- __DEV__ environment variable when building.

VDSM path: /usr/share/cockpit/ovirt-dashboard/vdsm/vdsm/vdsm

Additional info:
# ls -l /usr/share/cockpit/ovirt-dashboard/vdsm/vdsm/vdsm
-rwxr-xr-x. 1 root root 351  6 mag 08.43 /usr/share/cockpit/ovirt-dashboard/vdsm/vdsm/vdsm


# /usr/share/cockpit/ovirt-dashboard/vdsm/vdsm/vdsm
Traceback (most recent call last):
  File "/usr/share/cockpit/ovirt-dashboard/vdsm/vdsm/vdsmJsonRPCCli.py", line 294, in <module>
    sys.exit(main())
  File "/usr/share/cockpit/ovirt-dashboard/vdsm/vdsm/vdsmJsonRPCCli.py", line 257, in main
    service = get_vdsm_service()
  File "/usr/share/cockpit/ovirt-dashboard/vdsm/vdsm/vdsmJsonRPCCli.py", line 50, in get_vdsm_service
    _service = jsonrpcvdscli.connect(rqueue)
  File "/usr/lib/python2.7/site-packages/vdsm/jsonrpcvdscli.py", line 221, in connect
    responseQueue)
  File "/usr/lib/python2.7/site-packages/vdsm/jsonrpcvdscli.py", line 211, in _create
    lazy_start=False)
  File "/usr/lib/python2.7/site-packages/yajsonrpc/stompreactor.py", line 584, in StandAloneRpcClient
    client = StompClient(utils.create_connected_socket(host, port, sslctx),
  File "/usr/lib/python2.7/site-packages/vdsm/utils.py", line 852, in create_connected_socket
    socket.AF_UNSPEC, socket.SOCK_STREAM)
socket.gaierror: [Errno -2] Name or service not known

Issue is that changing host name doesn't add it to /etc/hosts and there's not a way to configure it using cockpit

Comment 1 Fabian Deutsch 2016-05-10 15:35:29 UTC
It is not necessary to change /etc/hosts.

The local hostname resolution should work like:
Add myhostname to nsswitch.conf
Write hostname to /etc/hostname

/etc/hosts is left untouched

The problem here is bug 1329943 - nsswitch.conf on Node does not contain myhostname in nsswitch.conf

*** This bug has been marked as a duplicate of bug 1329943 ***