-
Notifications
You must be signed in to change notification settings - Fork 79
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix restart network error when set host name in pure ipv6 network #256
Conversation
@bdunne could you review |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks okay, is there any reason it's marked as [WIP]?
I'm not sure it's a good.way to fix it. Will remove wip.
…On Aug 11, 2017 12:11 PM, "Brandon Dunne" ***@***.***> wrote:
***@***.**** approved this pull request.
This looks okay, is there any reason it's marked as [WIP]?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#256 (review)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AMpSiEk-gLOrp9UoTFFjqQjU343_q2sYks5sXH0XgaJpZM4Ow5Aj>
.
|
@miq-bot remove-label wip |
@carbonin Can we merge this? Thanks. |
I don't think we have Can you pin down why the restart is failing when we are not using |
@carbonin I've find the error log for |
@@ -307,7 +307,7 @@ module ApplianceConsole | |||
system_hosts.hostname = new_host | |||
system_hosts.set_loopback_hostname(new_host) | |||
system_hosts.save | |||
LinuxAdmin::Service.new("network").restart | |||
LinuxAdmin::Service.new("NetworkManager").restart |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Honestly, I'm not sure why this restart is here. Can we just remove it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In my search, some documents said we need to restart the machine, while some docs require to at least restart network service to make hostname change take effect: https://www.howtogeek.com/50631/how-to-change-your-linux-hostname-without-rebooting/
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The hostnamectl command which we're running seems to take care of everything and not require a reboot.
https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/7/html/Networking_Guide/sec_Configuring_Host_Names_Using_hostnamectl.html
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ailisp We are already using hostnamectl
in LinuxAdmin::Hosts#hostname=
. That's why @bdunne suggested just getting rid of this line.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can probably squash the two commits here, looks good otherwise 👍
3e161c7
to
b5d991f
Compare
Checked commit ailisp@b5d991f with ruby 2.2.6, rubocop 0.47.1, and haml-lint 0.20.0 |
Fix restart network error when set host name in pure ipv6 network (cherry picked from commit cbc714f) https://bugzilla.redhat.com/show_bug.cgi?id=1482669
Fine backport details:
|
ISSUE: In pure ipv6 network, after set hostname, appliance console will restart network. Currently we're using
systemctl restart network
, which can't successfully start network after stop it and cause appliance console crushed. But using NetworkManager is fine. As in https://access.redhat.com/solutions/783533 , network is considered as depreicate and we can update to use NetworkManager insteadBZ: https://bugzilla.redhat.com/show_bug.cgi?id=1475804
\cc @gtanzillo @yrudman
@miq-bot add-label wip, bug