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

Question: ways to ignore disposable LXC containers? #260

Open
elboulangero opened this issue Jan 6, 2023 · 3 comments
Open

Question: ways to ignore disposable LXC containers? #260

elboulangero opened this issue Jan 6, 2023 · 3 comments
Labels
Milestone

Comments

@elboulangero
Copy link

Hello,

we have a machine, it is a autopkgtest worker. Meaning that this machine is constantly testing packages in throwaway LXC containers. There's always around 10 LXC containers up.

These are disposable containers: they are created, then within the container we run apt to update and install the packages required, then we run the tests, then we dispose of the container.

Our issue is that we run needrestart on the host once a day, and everytime needrestart runs, it picks some items within the LXC containers, and notify us that we should restart those containers. Of course, for our case it doesn't make sense, since those containers will be destroyed in a few minutes.

Question: how can I make needrestart ignore those LXC containers? I'm playing with the needrestart.conf file right now, but so far I didn't find the solution.

Thanks in advance!

@elboulangero
Copy link
Author

elboulangero commented Jan 6, 2023

I found a Debian ticket with a similar need, but different approach: https://bugs.debian.org/889552

In this ticket, Paul suggests to ignore processes that are too young. That would also work for my use-case, I suppose. The advantage of this approach it that it's not limited to LXC containers, it would also work for chroots.

@elboulangero elboulangero changed the title Question: ways to ignore LXC containers? Question: ways to ignore disposable LXC containers? Jan 6, 2023
@liske liske added the wishlist label May 26, 2023
@liske
Copy link
Owner

liske commented May 26, 2023

Would an option to disable container scanning or ignore containers by name patterns would help?

@elboulangero
Copy link
Author

Hello! Yes, ignoring containers by name patterns would help. Our disposable lxc containers are named ci-017-222a371c for example, so I would be happy if I could ignore containers named ^ci-.*.

@liske liske added this to the v3.7 milestone Jun 26, 2023
@liske liske modified the milestones: v3.7, v3.8 Aug 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants