Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Remove older allocations details of a job in Nomad

Tags:

nomad

When i check the status of a nomad job. Along with the new allocation i can see all the older allocations details(with stop & complete). The list is pretty huge.

Is there any way to remove/delete the older allocations details and show only the latest allocation details.

like image 606
Mohan Karthik Sanagapalli Avatar asked Sep 14 '25 11:09

Mohan Karthik Sanagapalli


2 Answers

Even if you garbage collect older allocations, nomad will keep its records of failed allocations. Use

nomad system reconcile summaries

on the command line, to remove older allocations from your summary. For details check out the docs.

like image 140
karlludwigweise Avatar answered Sep 17 '25 19:09

karlludwigweise


Yes. The fact that you see the old allocations means that nomad has not garbage collected the completed/failed allocations. You can force a GC by calling the system API

curl -X PUT http://nomad:4646/v1/system/gc

Once nomad finishes the GC, you can see that the old allocations are cleared.

More information on Nomad System API documentation

like image 24
AnishM Avatar answered Sep 17 '25 19:09

AnishM