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

update!(config): soft deprecation of drop stats counters in syscall_event_drops #3015

Merged
merged 3 commits into from Jan 25, 2024

Conversation

incertum
Copy link
Contributor

@incertum incertum commented Jan 16, 2024

What type of PR is this?

Uncomment one (or more) /kind <> lines:

/kind bug

/kind cleanup

/kind design

/kind documentation

/kind failing-test

/kind feature

/kind release

Any specific area of the project related to this PR?

Uncomment one (or more) /area <> lines:

/area build

/area engine

/area tests

/area proposals

/area CI

What this PR does / why we need it:

Let's discuss deprecating syscall_event_drops.
@falcosecurity/falco-maintainers

Which issue(s) this PR fixes:

#2910

Fixes #

Special notes for your reviewer:

Does this PR introduce a user-facing change?:

update!(config): soft deprecation of drop stats counters in `syscall_event_drops`

@@ -41,6 +41,12 @@ static falco::app::run_result apply_deprecated_options(falco::app::state& s)
return run_result::fatal("You can not specify more than one of -e, -g (--gvisor-config), --modern-bpf, --nodriver, and the FALCO_BPF_PROBE env var");
}

if(s.config->m_min_priority == falco_common::PRIORITY_DEBUG)
Copy link
Member

Choose a reason for hiding this comment

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

Personally i had no time to check if we can really drop it, anyone willing to help @falcosecurity/falco-maintainers ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@leogr encouraged me to just get this PR going and then make the necessary decisions.

Copy link
Member

Choose a reason for hiding this comment

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

Yes, it still is worth investigating a bit since it seems not really used. However, if we are in doubt, we can still postpone this deprecation to 0.38.0 (and remove it in 0.39.0). Let's see if we find any info.

Copy link
Member

Choose a reason for hiding this comment

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

Ok, I took some time to check it, I'm ok with deprecating this! If we agree I would love to do it in Falco 0.37.0 so that in the next dev cycle we can clean up the code!

If we are not sure, I propose to deprecate it now, and if we face some blockers when we try to remove it in the next dev-cycle we can expand the depreciation also for Falco 0.38.0, WDYT? btw I don't think this is the case, I don't see big blockers in removing it

Signed-off-by: Melissa Kilby <melissa.kilby.oss@gmail.com>
@poiana poiana added size/S and removed size/XS labels Jan 16, 2024
@Andreagit97 Andreagit97 added this to the 0.37.0 milestone Jan 17, 2024
if(s.config->m_min_priority == falco_common::PRIORITY_DEBUG)
{
falco_logger::log(falco_logger::level::WARNING,
"DEPRECATION NOTICE: 'syscall_event_drops' config is deprecated and will be removed in Falco 0.38! Use 'metrics' config instead. Note that the 'syscall_event_drops' config is enabled by default when the 'priority' is set to 'debug'. You can turn it off by setting the 'priority' to any higher level\n");
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
"DEPRECATION NOTICE: 'syscall_event_drops' config is deprecated and will be removed in Falco 0.38! Use 'metrics' config instead. Note that the 'syscall_event_drops' config is enabled by default when the 'priority' is set to 'debug'. You can turn it off by setting the 'priority' to any higher level\n");
"DEPRECATION NOTICE: 'syscall_event_drops' config is deprecated and will be removed in Falco 0.38! If you rely on this config use instead 'metrics.output_rule' to monitor the number of drops. Note that the 'syscall_event_drops' config is enabled by default when the 'priority' is set to 'debug'. You can turn it off by setting the 'priority' to any higher level\n");

Copy link
Member

Choose a reason for hiding this comment

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

I would try to highlight that syscall_event_drops is enabled by default but it probably not many users rely on it, they probably don't even know that is config is doing something under the hood

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I like this suggestion! Added.

@@ -41,6 +41,12 @@ static falco::app::run_result apply_deprecated_options(falco::app::state& s)
return run_result::fatal("You can not specify more than one of -e, -g (--gvisor-config), --modern-bpf, --nodriver, and the FALCO_BPF_PROBE env var");
}

if(s.config->m_min_priority == falco_common::PRIORITY_DEBUG)
Copy link
Member

Choose a reason for hiding this comment

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

Ok, I took some time to check it, I'm ok with deprecating this! If we agree I would love to do it in Falco 0.37.0 so that in the next dev cycle we can clean up the code!

If we are not sure, I propose to deprecate it now, and if we face some blockers when we try to remove it in the next dev-cycle we can expand the depreciation also for Falco 0.38.0, WDYT? btw I don't think this is the case, I don't see big blockers in removing it

@Andreagit97
Copy link
Member

if we go for the deprecation we need to add it to #2763

@leogr
Copy link
Member

leogr commented Jan 23, 2024

if we go for the deprecation we need to add it to #2763

Since we don't have enough feedback, I will move this to 0.38.

@incertum
Copy link
Contributor Author

+1 re @Andreagit97 assessment, the old drop drop stats also add an avoidable overhead to the current main processing loop. We have an opportunity to clean up the underlying code a lot and I think this will be great as well. In addition, we have help guides and additional documentation around the new metrics currently under review for the website. This is why I believe it could be a good point in time to start the deprecation cycle, at minimum the notice as @Andreagit97 mentioned.

Co-authored-by: Andrea Terzolo <andreaterzolo3@gmail.com>
Signed-off-by: Melissa Kilby <melissa.kilby.oss@gmail.com>
add CHANGE NOTICE wrt syscall_event_drops

Co-authored-by: Leonardo Grasso <me@leonardograsso.com>
Signed-off-by: Melissa Kilby <melissa.kilby.oss@gmail.com>
@poiana poiana added size/XS and removed size/S labels Jan 24, 2024
@incertum incertum changed the title update!(config): add deprecation notice for syscall_event_drops update!(config): soft deprecation of drop stats counters in syscall_event_drops Jan 24, 2024
Copy link
Member

@Andreagit97 Andreagit97 left a comment

Choose a reason for hiding this comment

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

/approve

@poiana
Copy link

poiana commented Jan 25, 2024

LGTM label has been added.

Git tree hash: 0e6ce09f18f0c30186a1886c67191b8defec48f4

@poiana
Copy link

poiana commented Jan 25, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: Andreagit97, incertum, leogr

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:
  • OWNERS [Andreagit97,incertum,leogr]

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@poiana poiana merged commit bb4a643 into falcosecurity:master Jan 25, 2024
28 checks passed
@FedeDP FedeDP mentioned this pull request Jan 26, 2024
@Andreagit97 Andreagit97 mentioned this pull request Jan 29, 2024
29 tasks
@incertum incertum deleted the deprecate-old-stats branch March 5, 2024 22:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

None yet

4 participants