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

Use 1804-style deprovisioning for all versions >= 18.04 #1483

Merged
merged 1 commit into from
Mar 7, 2019

Conversation

jasonzio
Copy link
Member

@jasonzio jasonzio commented Mar 7, 2019

Enable systemd-aware deprovisioning on all versions >= 18.04

Issue #1476

The fix for #1151 was hard-coded to apply only to 18.04. It looks like systemd is here to stay, though, so the change in deprovisioning for 18.04 should apply to all versions of Ubuntu since (and including) 18.04.


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.
  • Except for special cases involving multiple contributors, the PR is started from a fork of the main repository, not a branch.
  • If applicable, the PR references the bug/issue that it fixes in the description.
  • New Unit tests were added for the changes made and Travis.CI is passing. (n/a; not amenable to unit testing, really)

Quality of Code and Contribution Guidelines

@pgombar
Copy link
Contributor

pgombar commented Mar 7, 2019

"It looks like systemd is here to stay, though, so the change in deprovisioning for 18.04 should apply to all versions of Ubuntu since (and including) 18.04."

Ubuntu 16.04 also uses systemd. Why are we not using systemd-aware deprovisioning, as you put it, for 16.04 as well?

Copy link
Member

@vrdmr vrdmr left a comment

Choose a reason for hiding this comment

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

LGTM

+1 to @pgombar's comment. Also, anything special done for systemd on Non-Canonical platforms such as SLES 12/RHEL 7?

@jasonzio
Copy link
Member Author

jasonzio commented Mar 7, 2019

The comments on #1151 tell the story:

cloud-init has never updated resolv.conf directly.
/etc/resolv.conf in 16.04 is managed via resolvconf through /etc/network/interfaces.
/etc/resolv.conf in 18.04 is managed via systemd-resolve (netplan -> systemd-networkd -> systemd-resolve).

This isn't so much about systemd as it is about the transition to netplan and networkd, which weren't involved in managing /etc/resolv.conf in 16.04 despite the use of systemd. Feel free to change the commit comment.

Other distros are already handled by distro-specific deprovision handlers which accommodate the platform's preferred way of managing /etc/resolv.conf. The code in question literally surrounds the one line I touched.

@jasonzio jasonzio merged commit 3cb14b8 into Azure:develop Mar 7, 2019
@jasonzio jasonzio deleted the deprovision branch March 21, 2019 19:24
pgombar added a commit that referenced this pull request May 2, 2019
* Use 1804-style deprovisioning for all versions >= 18.04 (#1483)

18.04 changed the method of managing resolv.conf vs. 16.04; the new method involves letting systemd-networkd manage that file. A previous fix corrected waagent behavior for 18.04 but did not do so for subsequent releases. Now that Ubuntu's direction is clear, this commit makes the correction in all versions of Ubuntu from 18.04 onwards. Other distros are unaffected by this bug and by this fix.

* Updating Travis settings

* Added description for Extension Error Codes (#1482)

* Added description for Extension Error Codes

* Correcting the test - to send the correct CRP Extension Error code

* Adding docstring to describe ExtensionErrorCodes

* Make launch_command resilient to cgroups failures (#1484)

* WireServer Certificates parser gracefully exits if format of package is not Pkcs7BlobWithPfxContents  (#1474)

* Certificates parser gracefully exits if format of package is not Pkcs7BlobWithPfxContents

* Add missing files

* change message to warning

* Removing the requirement of passing cipher-name. Default is more secure (#1481)

* Fix PID tracking for cgroups (#1489)

* add fixes for cgroup setup and PID tracking

* cleanup code comments

* disable cgroups test if not supported by environment

* remove wrapper cgroup tracking and other nits

* fix whitespace

* nit fixes; addressing CR comments

* Release 2.2.39 (#1494)

* Fix header

* Update agent version to 2.2.40
larohra pushed a commit to larohra/WALinuxAgent that referenced this pull request Aug 21, 2019
* Use 1804-style deprovisioning for all versions >= 18.04 (Azure#1483)

18.04 changed the method of managing resolv.conf vs. 16.04; the new method involves letting systemd-networkd manage that file. A previous fix corrected waagent behavior for 18.04 but did not do so for subsequent releases. Now that Ubuntu's direction is clear, this commit makes the correction in all versions of Ubuntu from 18.04 onwards. Other distros are unaffected by this bug and by this fix.

* Updating Travis settings

* Added description for Extension Error Codes (Azure#1482)

* Added description for Extension Error Codes

* Correcting the test - to send the correct CRP Extension Error code

* Adding docstring to describe ExtensionErrorCodes

* Make launch_command resilient to cgroups failures (Azure#1484)

* WireServer Certificates parser gracefully exits if format of package is not Pkcs7BlobWithPfxContents  (Azure#1474)

* Certificates parser gracefully exits if format of package is not Pkcs7BlobWithPfxContents

* Add missing files

* change message to warning

* Removing the requirement of passing cipher-name. Default is more secure (Azure#1481)

* Fix PID tracking for cgroups (Azure#1489)

* add fixes for cgroup setup and PID tracking

* cleanup code comments

* disable cgroups test if not supported by environment

* remove wrapper cgroup tracking and other nits

* fix whitespace

* nit fixes; addressing CR comments

* Release 2.2.39 (Azure#1494)

* Fix header

* Update agent version to 2.2.40
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