public inbox for kdevops@lists.linux.dev
 help / color / mirror / Atom feed
* [PATCH v2 0/4] guestfs: bringup: add debug mode
@ 2025-05-12 13:36 Daniel Gomez
  2025-05-12 13:36 ` [PATCH v2 1/4] guestfs: bringup: check if domain exists Daniel Gomez
                   ` (5 more replies)
  0 siblings, 6 replies; 8+ messages in thread
From: Daniel Gomez @ 2025-05-12 13:36 UTC (permalink / raw)
  To: kdevops, Luis Chamberlain, Daniel Gomez; +Cc: Daniel Gomez

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.

---
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,
-- 
Daniel Gomez <da.gomez@samsung.com>


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2025-05-14 18:28 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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 ` [PATCH v2 0/4] " Chuck Lever
2025-05-13  5:49   ` Daniel Gomez
2025-05-14 18:28 ` Luis Chamberlain

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox