public inbox for kdevops@lists.linux.dev
 help / color / mirror / Atom feed
From: Chuck Lever <chuck.lever@oracle.com>
To: Daniel Gomez <da.gomez@kernel.org>,
	kdevops@lists.linux.dev, Luis Chamberlain <mcgrof@kernel.org>,
	Daniel Gomez <da.gomez@samsung.com>
Subject: Re: [PATCH v2 0/4] guestfs: bringup: add debug mode
Date: Mon, 12 May 2025 11:43:33 -0400	[thread overview]
Message-ID: <8ede00c6-ecda-446f-b65c-2d623880d238@oracle.com> (raw)
In-Reply-To: <20250512-bringup-guestfs-debug-v2-0-bd5691108448@samsung.com>

On 5/12/25 9:36 AM, Daniel Gomez wrote:
> This has helped me during debug sessions of bringup script. "Resend"
> with minor changes.
> 
> Adding debug option in bash bringup_guestfs.sh allows to check for
> commands executions (virsh, chmod, cp, virt-sysprep, etc) and variables.
> 
> Add 3 levels of debug:
> - Disabled: This is the current behaviour and is the default.
> - set -x (debug mode 0):  Allows to print the executed commands but if
> they fail, the script continues.
> - set -euxo pipefail (debug mode 1): mode 0 + variables are printed +
> script fails if a command does not succeed.
> 
> While debugging, I noticed about small bash errors that we ignore, such
> as unbound variables. So, this also fixes the issues found while debug
> mode 1 was enabled.

Reviewed-by: Chuck Lever <chuck.lever@oracle.com>

In the long run, I think bringup_guestfs.sh should be converted to
Ansible (IaC), similar to playbooks/roles/terraform/.

Since it is a big honking shell script, the process will be less risky
to do parts of it at a time. The heavy lift will be replacing the shell
code that builds base OS images. Once that is done, what is left is
fairly straightforward, and I have a few old patches that do that part.

Unfortunately I'm running an NFS plug-fest this week, so I can't post
much at the moment.


> ---
> Changes in v2:
> * Rebase on top of latest main branch
> * Split long conditional lines into 2 
> - Link to v1: https://lore.kernel.org/all/20241015-bringup-guestfs-debug-v1-0-bd74c0c31412@samsung.com/
> 
> ---
> Daniel Gomez (4):
>       guestfs: bringup: check if domain exists
>       guestfs: bringup: fix unbound variable when debug
>       guestfs: bringup: fix user check when debug
>       guestfs: bringup: add debug mode
> 
>  kconfigs/Kconfig.guestfs   | 21 +++++++++++++++++++++
>  scripts/bringup_guestfs.sh | 38 +++++++++++++++++++++++++++-----------
>  2 files changed, 48 insertions(+), 11 deletions(-)
> ---
> base-commit: ef549598f2261ac89643d3e7a8ea0f050fc27c5f
> change-id: 20241015-bringup-guestfs-debug-775f4dbd98c1
> 
> Best regards,


-- 
Chuck Lever

  parent reply	other threads:[~2025-05-12 15:43 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-05-12 13:36 [PATCH v2 0/4] guestfs: bringup: add debug mode Daniel Gomez
2025-05-12 13:36 ` [PATCH v2 1/4] guestfs: bringup: check if domain exists Daniel Gomez
2025-05-12 13:36 ` [PATCH v2 2/4] guestfs: bringup: fix unbound variable when debug Daniel Gomez
2025-05-12 13:36 ` [PATCH v2 3/4] guestfs: bringup: fix user check " Daniel Gomez
2025-05-12 13:36 ` [PATCH v2 4/4] guestfs: bringup: add debug mode Daniel Gomez
2025-05-12 15:43 ` Chuck Lever [this message]
2025-05-13  5:49   ` [PATCH v2 0/4] " Daniel Gomez
2025-05-14 18:28 ` Luis Chamberlain

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=8ede00c6-ecda-446f-b65c-2d623880d238@oracle.com \
    --to=chuck.lever@oracle.com \
    --cc=da.gomez@kernel.org \
    --cc=da.gomez@samsung.com \
    --cc=kdevops@lists.linux.dev \
    --cc=mcgrof@kernel.org \
    /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