Fabian Deutsch has posted comments on this change.

Change subject: network: use strip() to compare strings
......................................................................


Patch Set 1:

(1 comment)

https://gerrit.ovirt.org/#/c/43755/1/src/ovirt/node/config/network.py
File src/ovirt/node/config/network.py:

Line 235:         utils.process.check_call(["hostnamectl", "set-hostname",
Line 236:                                   new_hostname])
Line 237: 
Line 238:     current_hostname = utils.fs.get_contents(hostnamefile)
Line 239:     if new_hostname and current_hostname.strip() != 
new_hostname.strip():
Here the point is fixed where the problem appears.

It would be better if we fixed the bug by fixing the source of the problem. So 
the functions which determin both of those values.

I.e. current_hostname should probably be fixed in line 238.
And for new_hostname we should identifiy where it get's assigned.
Line 240:         raise RuntimeError(("Runtime hostname '%s' doesn't match" +
Line 241:                             "configured one: %s") % (current_hostname,
Line 242:                                                      new_hostname))
Line 243: 


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

Gerrit-MessageType: comment
Gerrit-Change-Id: I7522def9aafb18be7dfc7b13c35f0ed0b45583a8
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-node
Gerrit-Branch: master
Gerrit-Owner: Douglas Schilling Landgraf <[email protected]>
Gerrit-Reviewer: Anatoly Litovsky <[email protected]>
Gerrit-Reviewer: Douglas Schilling Landgraf <[email protected]>
Gerrit-Reviewer: Fabian Deutsch <[email protected]>
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Ryan Barry <[email protected]>
Gerrit-Reviewer: [email protected]
Gerrit-HasComments: Yes
_______________________________________________
node-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/node-patches

Reply via email to