canonical-ubuntu-qa team mailing list archive
-
canonical-ubuntu-qa team
-
Mailing list archive
-
Message #03442
[Merge] ~andersson123/autopkgtest-cloud:docs-add-queue-cleanup-section into autopkgtest-cloud:master
Tim Andersson has proposed merging ~andersson123/autopkgtest-cloud:docs-add-queue-cleanup-section into autopkgtest-cloud:master.
Requested reviews:
Canonical's Ubuntu QA (canonical-ubuntu-qa)
For more details, see:
https://code.launchpad.net/~andersson123/autopkgtest-cloud/+git/autopkgtest-cloud/+merge/462692
--
Your team Canonical's Ubuntu QA is requested to review the proposed merge of ~andersson123/autopkgtest-cloud:docs-add-queue-cleanup-section into autopkgtest-cloud:master.
diff --git a/docs/administration.rst b/docs/administration.rst
index adb27b9..bb15634 100644
--- a/docs/administration.rst
+++ b/docs/administration.rst
@@ -212,8 +212,7 @@ Requests can be requested by using an API key instead of authenticating using SS
To do so, attach a cookie to whatever script is making the test request, with the name
"X-Api-Key". The value should look like this:
-.. code-block::
- user:api-key
+``user:api-key``
Where the user and api-key fields are provided by the Ubuntu Release Management team.
@@ -337,3 +336,41 @@ Test the setup with some dummy PR that changes some README or similar. You can
then re-trigger new tests by force-pushing to the branch. Once everything works,
you can add more web hooks with different test parameters to e. g. trigger tests
on multiple architectures or multiple Ubuntu releases.
+
+
+Queue Cleanup
+^^^^^^^^^^^^^
+Regular queue cleanup is often necessary. The best way to go about doing this is
+by first downloading the queues.json:
+
+``wget https://autopkgtest.ubuntu.com/queues.json``
+
+Then, you can filter the json file like so, with jq:
+
+``jq '.huge.noble.amd64' queues.json | awk {'print $2'} | sort | uniq -c | less``
+
+And what this does, is filter the queue, and returns a list of all the unique
+packages currently queued, with a count of how many queue items per package,
+and pipes it to less. You can then check this output, and look for obsoleted
+package versions, e.g.:
+
+.. code-block::
+
+ 117 [\"dpkg/1.22.6ubuntu2\"],
+ 117 [\"dpkg/1.22.6ubuntu4\"],
+
+Here, you can see that ``dpkg/1.22.6ubuntu2`` has been obsoleted by ``dpkg/1.22.6ubuntu4``.
+So, the workflow now would be to remove said package from the queue::
+
+.. code-block::
+
+ ./filter-amqp -v amqp://autopkgtest-worker:passwd@ip debci-huge-noble-$arch "dpkg/1.22.6ubuntu2\b
+
+However, this gets tedious with lots of obsoleted packages in the queue. So an approach,
+when you have lots of obsoleted packages, would be like so:
+
+.. code-block::
+ packages="package1/trigger-2.3.0 package2/trigger-2.4.3..." # obviously with more packages
+ for pkg in $packages; do for arch in "amd64 arm64 s390x ppc64el armhf i386" do; ./filter-amqp -v amqp://autopkgtest-worker:passwd@ip debci-huge-noble-$arch "dpkg/1.22.6ubuntu2\b; done; done
+
+This way you can remove all the packages in one command on every architecture.