Solved poudriere and interrupting bulk builds

cmicallef

Member

Reaction score: 2
Messages: 20

Hello!

Is it possible to send an interrupt to a poudriere bulk to stop after building any ports that pourdriere is currently building?

For example, say poudriere bulk has a queue of 100 ports and is currently building 10 of them, I want to stop poudriere after those 10 are built and not build the remaining 90 after sending an interrupt to main poudriere thread.

Thanks!
 

Alain De Vos

Son of Beastie

Reaction score: 870
Messages: 2,827

When you send a kill signal to poudriere. It simply stops. That is without adding the build files to the repository.
So next time only 90 ports need to be build before , add the end of it, the 100 are added to the repository.
 
OP
C

cmicallef

Member

Reaction score: 2
Messages: 20

Alain De Vos Thanks

This seems to do the trick (as root)

pkill -9 -f poudriere\/sh

Just need to remember to stop the jails once the builds have finished in the background.
 

SirDice

Administrator
Staff member
Administrator
Moderator

Reaction score: 13,134
Messages: 39,747

Don't use -9 (SIGKILL). A normal kill (SIGHUP) will interrupt the program and allow it to clean up after itself. SIGKILL will abort everything and leave all sorts of things in a messy state. I typically have a poudriere-bulk(8) running in a tmux(1) session, just hit CTRL-C to interrupt it and let it clean up after itself.
 

SirDice

Administrator
Staff member
Administrator
Moderator

Reaction score: 13,134
Messages: 39,747

Yes, you're right. Was looking at the wrong table. SIGINT or SIGTERM should be fine, SIGKILL definitely isn't as that won't stop it gracefully.
 

Zirias

Son of Beastie

Reaction score: 1,785
Messages: 3,031

No, it's stopping immediately (just doing the necessary cleanup). The function you're looking for doesn't exist, you might want to add a wishlist issue on poudriere's github project.
 
OP
C

cmicallef

Member

Reaction score: 2
Messages: 20

Zirias That's what I thought after reading the man pages and trying a few things for myself. And that's why I thought I'd ask here before posting an issue on the project's issue tracker.

I was aware of what Alain De Vos suggested before I posted here. It does work but, as I pointed out, you need to remember to stop the jails after they've finished building. Any clean up can be done using poudriere jail -k -j $JAILNAME. This is a pain.

Obviously, the real solution is to add this feature to poudriere. Given such, I'll just mark this thread as solved again so that no one wastes their time on this issue.
 
Top