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

T6523: Telegraf use nft scripts only if the firewall configured #3748

Merged
merged 1 commit into from
Jul 2, 2024

Conversation

sever-sever
Copy link
Member

Change Summary

If a firewall is not configured, there is no reason to get and execute telegraf firewall custom scripts as there are no nft chain in the firewall nftables configuration

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Code style update (formatting, renaming)
  • Refactoring (no functional changes)
  • Migration from an old Vyatta component to vyos-1x, please link to related PR inside obsoleted component
  • Other (please describe):

Related Task(s)

Related PR(s)

Component(s) name

telegraf

Proposed changes

How to test

Before the fix, there was unexpected message:

vyos@r1-right# set service monitoring telegraf prometheus-client 
[edit]
vyos@r1-right# commit
[ service monitoring telegraf ]
nft table ip vyos_filter not found

[edit]
vyos@r1-right#

After the fix:

vyos@r1-right# set service monitoring telegraf prometheus-client 
[edit]
vyos@r1-right# commit
[edit]
vyos@r1-right# 

Smoketest result

vyos@r1-right:~$ /usr/libexec/vyos/tests/smoke/cli/test_service_monitoring_telegraf.py
test_01_basic_config (__main__.TestMonitoringTelegraf.test_01_basic_config) ... ok
test_02_loki (__main__.TestMonitoringTelegraf.test_02_loki) ... ok

----------------------------------------------------------------------
Ran 2 tests in 11.434s

OK
vyos@r1-right:~$

Checklist:

  • I have read the CONTRIBUTING document
  • I have linked this PR to one or more Phabricator Task(s)
  • I have run the components SMOKETESTS if applicable
  • My commit headlines contain a valid Task id
  • My change requires a change to the documentation
  • I have updated the documentation accordingly

If a firewall is not configured there is no reason to get and
execute telegraf firewall custom scripts as there are no nft
chain in the firewall nftables configuration
Copy link

github-actions bot commented Jul 2, 2024

👍
No issues in PR Title / Commit Title

Copy link

github-actions bot commented Jul 2, 2024

👍 VyOS CLI smoketests finished successfully!

@c-po c-po merged commit efe4e60 into vyos:current Jul 2, 2024
11 checks passed
@c-po
Copy link
Member

c-po commented Jul 2, 2024

@Mergifyio backport circinus

Copy link
Contributor

mergify bot commented Jul 2, 2024

backport circinus

✅ Backports have been created

c-po added a commit that referenced this pull request Jul 2, 2024
T6523: Telegraf use nft scripts only if the firewall configured (backport #3748)
@sever-sever
Copy link
Member Author

@Mergifyio backport sagitta

Copy link
Contributor

mergify bot commented Jul 18, 2024

backport sagitta

✅ Backports have been created

jestabro added a commit that referenced this pull request Jul 18, 2024
T6523: Telegraf use nft scripts only if the firewall configured (backport #3748)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

5 participants