Fabian Deutsch has posted comments on this change.

Change subject: network: write new hostname into /etc/hostname
......................................................................


Patch Set 4: Code-Review-1

(1 comment)

https://gerrit.ovirt.org/#/c/44455/4/src/ovirt/node/config/network.py
File src/ovirt/node/config/network.py:

Line 235:         # Because of that, the new hostname won't persist across
Line 236:         # reboot in case user change it via TUI.
Line 237:         # Restarting systemd-hostnamed doesn't help either.
Line 238:         hostname_file = fs.File("/etc/hostname")
Line 239:         if hostname_file.read().strip() != new_hostname:
We need to ensure that the file exists, then we can check the contents.
Line 240:             hostname_file.write(contents=new_hostname, mode="w+")
Line 241: 
Line 242:     return socket.gethostname()
Line 243: 


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

Gerrit-MessageType: comment
Gerrit-Change-Id: I9bbb7b96f98a70915190846eb7c9d3b22e0af3a1
Gerrit-PatchSet: 4
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