[node-patches] Change in ovirt-node[ovirt-3.6]: Prepend the hostname in /etc/hosts, don't append

rbarry at redhat.com rbarry at redhat.com
Wed Mar 30 14:15:07 UTC 2016


Ryan Barry has uploaded a new change for review.

Change subject: Prepend the hostname in /etc/hosts, don't append
......................................................................

Prepend the hostname in /etc/hosts, don't append

hostname -f and socket.getfqdn() are incorrect if the hostname is
at the end of the list in /etc/hosts.

Prepend it instead.

This resolves a bug with deploying a second hosted-engine node

Change-Id: I3b0825ceba7ce4620ec5675122099037efe17d3d
Signed-off-by: Ryan Barry <rbarry at redhat.com>
(cherry picked from commit f1283d5dd111a2574fcf1d2b225269bc7f8448e0)
---
M src/ovirt/node/config/defaults.py
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.ovirt.org:29418/ovirt-node refs/changes/87/55487/1

diff --git a/src/ovirt/node/config/defaults.py b/src/ovirt/node/config/defaults.py
index 3a9bcbb..0777d6d 100755
--- a/src/ovirt/node/config/defaults.py
+++ b/src/ovirt/node/config/defaults.py
@@ -730,7 +730,7 @@
                 # ... and create a new one
                 aliases = ["localhost", "localhost.localdomain"]
                 if self.hostname:
-                    aliases.append(self.hostname)
+                    aliases.insert(0, self.hostname)
 
                 for _idx, alias in enumerate(aliases):
                     idx = _idx + 1


-- 
To view, visit https://gerrit.ovirt.org/55487
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I3b0825ceba7ce4620ec5675122099037efe17d3d
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-node
Gerrit-Branch: ovirt-3.6
Gerrit-Owner: Ryan Barry <rbarry at redhat.com>



More information about the node-patches mailing list