public inbox for isar-users@googlegroups.com
 help / color / mirror / Atom feed
From: Uladzimir Bely <ubely@ilbers.de>
To: Anton Mikanovich <amikan@ilbers.de>, isar-users@googlegroups.com
Subject: Re: [PATCH 0/2] Protect isar-apt usages in shell
Date: Tue, 23 Jul 2024 10:38:36 +0300	[thread overview]
Message-ID: <943268259224283c363eefc66452d35cebe81fa5.camel@ilbers.de> (raw)
In-Reply-To: <20240712065646.2156320-1-amikan@ilbers.de>

On Fri, 2024-07-12 at 09:56 +0300, Anton Mikanovich wrote:
> Read operations on isar-apt should be covered by shared lock.
> This was not implemented for deb_dl_dir_export and imager_run.
> At least following CI error was caused by isar-apt race:
> 
> DEBUG: Executing shell function rootfs_export_package_cache
> find: 'isar-apt/debian-bullseye-arm64/apt/debian-
> bullseye/pool/main/e/enable-fsck': No such file or directory
> 
> Find call inside deb_dl_dir_export was trying to look into enable-
> fsck
> directory while is was deleted by deb_clean function of do_deploy_deb
> task of enable-fsck package.
> 
> The same situation can potentially happen on imager_run call, causing
> races during image preparations.
> 
> To protect isar-apt usages inside big shell functions introduce
> lockrun.py helper for using with isar-apt lock.
> More clear implementation will require tasks rewrite in python, which
> is not an option for the big downstream projects.
> 
> Anton Mikanovich (2):
>   deb-dl-dir: Avoid multiple find run on export
>   meta: Cover bash isar-apt usages by isar.lock
> 
>  meta/classes/deb-dl-dir.bbclass            |  9 +++--
>  meta/classes/image-tools-extension.bbclass |  2 +
>  scripts/lockrun.py                         | 44
> ++++++++++++++++++++++
>  3 files changed, 52 insertions(+), 3 deletions(-)
>  create mode 100755 scripts/lockrun.py
> 
> -- 
> 2.34.1
> 

Applied to next.

-- 
Best regards,
Uladzimir.



-- 
You received this message because you are subscribed to the Google Groups "isar-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to isar-users+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/isar-users/943268259224283c363eefc66452d35cebe81fa5.camel%40ilbers.de.

      parent reply	other threads:[~2024-07-23  7:38 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-07-12  6:56 Anton Mikanovich
2024-07-12  6:56 ` [PATCH 1/2] deb-dl-dir: Avoid multiple find run on export Anton Mikanovich
2024-07-12  6:56 ` [PATCH 2/2] meta: Cover bash isar-apt usages by isar.lock Anton Mikanovich
2024-07-23  7:38 ` Uladzimir Bely [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=943268259224283c363eefc66452d35cebe81fa5.camel@ilbers.de \
    --to=ubely@ilbers.de \
    --cc=amikan@ilbers.de \
    --cc=isar-users@googlegroups.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox