Sean Whitton writes ("Re: Bug#1108243: want way to find image uuid used for a 
particular t2u job"):
> On Mon 23 Jun 2025 at 11:51pm +01, Ian Jackson wrote:
> > I suggest we:
> >
> >  * Change the image creation script to put something in the image's
> >    /etc/environment.  (Empirically, the podman rune produced by
> >    autopkgtest looks at this.)
> >
> >  * Have dgit-repos-server run a command to get the information
> >    by running a command inside the container.

It's even worse, because I doubt we know the actual image uuid at the
point we are doing this setup.

So I think we need to create an intermediate idzentifier.  Something
like:

  * At the start of the image creation script, invent an identifier.
    (How about the date in human-readable format?)
    Print it somewhere so it ends up in the log.

  * During the image creation script, bury *our* identifier in
    /etc/environment.

  * Have dgit-repos-server run a command to get the information
    by running a command inside the container.

  * When the image creation script actually creates the image,
    print its uuid (also to the log).

Then the diagnosis procedure is:

  1. Look at the identifier from the email

  2. The identifier is a date so that will tell you which of the saved
     image creation logs to look at.  You can double-check inside the
     log if you're not sure.

  3. Look later in the script and you'll find the image identifier.

  4. Now you can   podman run -i   or whatever.

This is all quite a faff and we should write it down.

> I think this is fine if that's the only way Podman lets us do something
> like this.

If you know a better way, please do say!

Ian.

-- 
Ian Jackson <ijack...@chiark.greenend.org.uk>   These opinions are my own.  

Pronouns: they/he.  If I emailed you from @fyvzl.net or @evade.org.uk,
that is a private address which bypasses my fierce spamfilter.

Reply via email to