Skip to content
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

redhat: Use NetworkManager to set DHCP hostnames on recent RHEL distros #2640

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

mgamal
Copy link

@mgamal mgamal commented Aug 2, 2022

Recent versions of RHEL 8 and RHEL 9 (i.e. RHEL8.6/9.1) started using NetworkManager to configure
network intefaces instead of sysconfig files. Configurations are no longer
stored in /etc/sysconfig/ifcfg-{interface}. Setting DHCP hostnames through these files causes provisioning with WALA to fail.

Fix this for setting DHCP hostnames in those RHEL versions.


PR information

  • The title of the PR is clear and informative.
  • There are a small number of commits, each of which has an informative message. This means that previously merged commits do not appear in the history of the PR. For information on cleaning up the commits in your pull request, see this page.
  • If applicable, the PR references the bug/issue that it fixes in the description.
  • New Unit tests were added for the changes made

Quality of Code and Contribution Guidelines

Recent versions of RHEL 8 and RHEL 9 started using NetworkManager to configure
network intefaces instead of sysconfig files. Configurations are no longer
stored in /etc/sysconfig/ifcfg-{interface}.

Fix this for setting DHCP hostnames in those RHEL versions.
@mgamal mgamal marked this pull request as ready for review August 2, 2022 13:41
@mgamal
Copy link
Author

mgamal commented Aug 23, 2022

@narrieta @kevinclark19a @ZhidongPeng @nagworld9 @dhivyaganesan can someone please take a look here? The PR is necessary for WALA to function on recent RHEL versions.

Thanks

@nagworld9
Copy link
Contributor

@mgamal Thanks for the PR. Is this happening on custom image where no cloud-init enabled? could you provide steps that you followed to test this fix?

@codecov
Copy link

codecov bot commented Aug 31, 2022

Codecov Report

Merging #2640 (c8e25ec) into develop (4db3b44) will decrease coverage by 0.01%.
The diff coverage is 20.00%.

@@             Coverage Diff             @@
##           develop    #2640      +/-   ##
===========================================
- Coverage    71.96%   71.95%   -0.02%     
===========================================
  Files          103      103              
  Lines        15632    15637       +5     
  Branches      2488     2489       +1     
===========================================
+ Hits         11250    11251       +1     
- Misses        3868     3872       +4     
  Partials       514      514              
Impacted Files Coverage Δ
azurelinuxagent/common/osutil/redhat.py 50.49% <20.00%> (-1.59%) ⬇️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@yuxisun1217
Copy link

I think it is refer to issue #2593 .

@mgamal
Copy link
Author

mgamal commented Sep 2, 2022

I think it is refer to issue #2593 .

That's true. RHEL8.6/9.1 use NetworkManager and store configurations per connection instead of using sysconfig files and this PR uses NetworkManager tools to set DHCP hostnames.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants