-
Notifications
You must be signed in to change notification settings - Fork 372
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
Update hostname setting for SUSE distros #1832
Conversation
hostnamectl to set the hostname and make sure it is properly propagated through the system.
Codecov Report
@@ Coverage Diff @@
## develop #1832 +/- ##
===========================================
- Coverage 69.45% 69.12% -0.34%
===========================================
Files 82 82
Lines 11469 11511 +42
Branches 1619 1619
===========================================
- Hits 7966 7957 -9
- Misses 3166 3217 +51
Partials 337 337
Continue to review full report at Codecov.
|
Travis run is green: https://travis-ci.org/github/Azure/WALinuxAgent/builds/666506710 |
Hi @rjschwei I was running end-to-end automation for this change and it seems that the hostname in SUSE12 SP5 keeps flip-flopping between
We are not seeing this behavior in other images. I did a little bit of research and the hostname change remains persistent if I tell DHCP to not change the hostname like: Is this behavior expected? cc @trstringer who might have more context on this from the provisioning side. |
+ The shellutil.run() is deprecated and should no longer be used
@pgombar the hostname keeps flipping because of a configuration error in our images where we have The issue has been fixed and the next image refresh cycle will have the updated value. It is unknown why this has never been a problem in the past, best guess is that a change in wicked triggered this to show up. |
Thanks for confirming! Also, thank you for changing all of the calls in However, we want to keep the current behaviour of swallowing exceptions and not logging to agent log. Since we want to merge this change as soon as possible, I have updated the PR to expedite the 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.
LGTM
End-to-end automation OK. |
@rjschwei merged, thanks for your contribution! |
Thanks for cleaning up after me while I was pulled away chasing other stuff. |
Description
Current versions of openSUSE and SLES are systemd based. Use hostnamectl to set the hostname and make sure it is properly propagated through the system.
Issue #
The hostname setting may not be properly propagated in the running system using the "hostname" command.
PR information
Quality of Code and Contribution Guidelines
This change is