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

Replace firewall-setup unit file if changed #2236

Merged
merged 6 commits into from
May 4, 2021

Conversation

larohra
Copy link
Contributor

@larohra larohra commented May 3, 2021

Description

  • Replace firewall-setup unit file if changed
  • Remove custom service if firewalld service enabled and custom service also enabled

Issue #


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

narrieta
narrieta previously approved these changes May 3, 2021
Copy link
Member

@narrieta narrieta left a comment

Choose a reason for hiding this comment

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

LGTM; minor comments


# Remove custom service if exists to avoid problems with firewalld
try:
fileutil.rm_files(*[self.get_service_file_path(), os.path.join(conf.get_lib_dir(), self.BINARY_FILE_NAME)])
Copy link
Member

Choose a reason for hiding this comment

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

would this need a daemon-reload?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

No, I verified manually, it didnt complain for it (I just verified it in the one distro where we know firewalld is there - RHEL 8+)

azurelinuxagent/common/persist_firewall_rules.py Outdated Show resolved Hide resolved
@codecov
Copy link

codecov bot commented May 4, 2021

Codecov Report

Merging #2236 (5e5c1fe) into release-2.3.0.0 (b8a006f) will decrease coverage by 0.00%.
The diff coverage is 79.31%.

Impacted file tree graph

@@                 Coverage Diff                 @@
##           release-2.3.0.0    #2236      +/-   ##
===================================================
- Coverage            70.61%   70.60%   -0.01%     
===================================================
  Files                   96       96              
  Lines                13616    13642      +26     
  Branches              1928     1932       +4     
===================================================
+ Hits                  9615     9632      +17     
- Misses                3584     3589       +5     
- Partials               417      421       +4     
Impacted Files Coverage Δ
azurelinuxagent/common/persist_firewall_rules.py 77.05% <79.31%> (+0.66%) ⬆️
azurelinuxagent/ga/collect_telemetry_events.py 89.72% <0.00%> (-1.37%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update b8a006f...5e5c1fe. Read the comment docs.

@larohra larohra merged commit 52d382f into Azure:release-2.3.0.0 May 4, 2021
@larohra larohra deleted the fix-firewall-unit branch May 4, 2021 00:38
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.

2 participants