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

archlinux: Use hostnamectl to set the transient hostname #797

Merged
merged 3 commits into from
Feb 25, 2021
Merged

archlinux: Use hostnamectl to set the transient hostname #797

merged 3 commits into from
Feb 25, 2021

Conversation

klausenbusk
Copy link
Contributor

Proposed Commit Message

archlinux: Use hostnamectl to set the transient hostname

hostname (inetutils) isn't installed per default on arch, so switch
to hostnamectl which is installed per default (systemd).

Test Steps

This has been tested manually with the Arch Linux cloud-init package (arch.py patched with the changes in this commit) and inetutils forcefully removed (pacman -Rsddn inetutils).

Checklist:

  • My code follows the process laid out in the documentation
  • I have updated or added any unit tests accordingly
  • I have updated or added any documentation accordingly

@klausenbusk
Copy link
Contributor Author

The CLA stuff is part of: #796

Copy link
Member

@TheRealFalcon TheRealFalcon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Your commit message lists the reason for making the change, but can you add a comment to the method to explain why you're overriding the default behavior? Also, can you add similar logging and try/except behavior that the base method has?

@klausenbusk
Copy link
Contributor Author

Fixed

Copy link
Member

@TheRealFalcon TheRealFalcon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I suggested one more change inline. Should be good to go after that. I'll wait for your other PR to merge given that the CLA change is in that one.

cloudinit/distros/arch.py Show resolved Hide resolved
Copy link
Member

@TheRealFalcon TheRealFalcon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@TheRealFalcon
Copy link
Member

Hey @klausenbusk , the only thing this PR is waiting on is the CLA signers file, which is added in #796 . If you need to take your time on #796 , feel free to move that commit over to this PR and I can land this one as soon as possible. If you'd rather just wait until the other PR is finished, that is fine as well.

@github-actions
Copy link

Hello! Thank you for this proposed change to cloud-init. This pull request is now marked as stale as it has not seen any activity in 14 days. If no activity occurs within the next 7 days, this pull request will automatically close.

If you are waiting for code review and you are seeing this message, apologies! Please reply, tagging mitechie, and he will ensure that someone takes a look soon.

(If the pull request is closed and you would like to continue working on it, please do tag mitechie to reopen it.)

@github-actions github-actions bot added the stale-pr Pull request is stale; will be auto-closed soon label Feb 23, 2021
klausenbusk and others added 3 commits February 23, 2021 11:10
hostname (inetutils) isn't installed per default on arch, so switch
to hostnamectl which is installed per default (systemd).

Co-authored-by: James Falcon <TheRealFalcon@users.noreply.github.com>
@TheRealFalcon TheRealFalcon merged commit 2757333 into canonical:master Feb 25, 2021
@TheRealFalcon
Copy link
Member

@klausenbusk , since this PR was close to getting auto-closed, and since you've already signed the CLA, I took the liberty of moving your addition to the github CLA signers file over to this PR and merging it. Thanks for the contribution!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stale-pr Pull request is stale; will be auto-closed soon
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants