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

Overhaul of anti-virus script #3688

Merged
merged 3 commits into from
Mar 6, 2020
Merged

Conversation

chrisgilmerproj
Copy link
Contributor

Description

While assessing #3677 I saw some pretty major structural changes that needed to be addressed. A couple things this does:

  • Copies the retry logic from [WIP] Add loop to retry where antivirus fails in clamav #3677
  • Moves a section of code that waits for the service to be stable up into the retry logic and blocks, which forces us to look for the one signal that should tell us if we can continue: /tmp/clamd.sock. This may increase the time on CircleCI by up to a minute or longer but I think it's a valuable tradeoff.
  • Fix the docker inspect code to work properly since it only returns string values of true or false
  • Added virus signatures to ignore
  • Fixed permissions with regards to virus database
  • Reload the virus databases after they've been updated with the virus whitelists
  • Fix an annoying warning about a deprecated line in /etc/clamav/clamd.conf which causes confusion when folks diagnose problems with this script
  • Added a bunch of timestamp information to make it easier to know elapsed time of different processes

I'm also personally tracking mko-x/docker-clamav#39 which talks about how the software being loaded is an outdated version, which may be the cause of some intermittent flakiness.

Honestly the next time I have to touch this will be to make it a separate repo so I can use it in several places across Transcom's git projects. Hopefully this will keep us stable for a while.

Setup

Try it yourself!

make clean anti_virus

@chrisgilmerproj chrisgilmerproj merged commit 1d40b22 into master Mar 6, 2020
@chrisgilmerproj chrisgilmerproj deleted the cg_anti_virus_overhaul branch March 6, 2020 21:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants