Skip to content

Conversation

@kdevops-kpd
Copy link

@kdevops-kpd kdevops-kpd bot commented Mar 23, 2025

Pull request for series with
subject: debian / libvirt / devconfig fixes
version: 1
url: https://patchwork.kernel.org/project/kdevops/list/?series=946588

mcgrof added 7 commits March 21, 2025 15:05
…uests

Be sure to remove unattended-upgrades when taking the downloaded image
from Debian to build our base image which we will use to launch guests
with.

The package unattended-upgrades [0] is one of the biggest pain points
for continous integeration on kdevops, where we race against package
installations being mucked behind our back. So let's just be
extremely vocal about it being a requirement to not be installed
on debian systems and complain and ensure systems don't have it.

Even though we have already in place devconfig rules to remove it,
upon first bringup you can still race against it!

If you do have an old guest with it, you should just remove the old
guest and re-do your new guest as otherwise you will encounter many
odd silly bugs and the issue is just races with debian doing its
upgrades with unattended-upgrades.

To my surprise unattended-upgrades has also been a default on debian
for years now, it would seem we can just move to a debian image of
"netinst" or "minimal" images but that requires more work than what
we can just do by removing the package.

Long term we really should request to see if is debian folks can
ends up packaging a proper guestfs image based on debian testing for us,
and when that does happen we ask it does not have unattended-upgrades.

[0] https://wiki.debian.org/UnattendedUpgrades

Signed-off-by: Luis Chamberlain <mcgrof@kernel.org>
We already remove the package on debian bringups when downloading a
an official but-not-guestfs-official (and so debian custom) image to
build our base images for our guests. Now that we have that stop-gap
measure, be sure we just fail if the package happens to be installed,
and complain to the user about it.

We can easily fix this with just two command so recommend that.

Signed-off-by: Luis Chamberlain <mcgrof@kernel.org>
Turns out we define CONFIG_KDEVOPS_STORAGE_POOL_PATH only to make it be the
same as generic     CONFIG_LIBVIRT_STORAGE_POOL_PATH only later to then
use the old GUESTFS_ARGS or VAGRANT_ARGS to define the yaml version with
a postfix "kdevops".

Fix all this mess by using yaml output and cleaing its use up.

This does not fix any bugs, it just make things consistent.

And so where you saw CONFIG_KDEVOPS_STORAGE_POOL_PATH we now just use
the generic version  CONFIG_LIBVIRT_STORAGE_POOL_PATH.

The kconfig symbol CONFIG_KDEVOPS_STORAGE_POOL_PATH gets promoted to be
what we expect it, that is:

  "{{ libvirt_storage_pool_path }}/kdevops"

This also ensure we will barf as we want to promote using ansible for
this anyway and do away with all of the CONFIG_KDEVOPS_STORAGE_POOL_PATH
uses in shell scripts.

This kills all use of CONFIG_KDEVOPS_STORAGE_POOL_PATH from shell
scripts too then.

The motivation for all this is to slowly trim away the large
error-prone script scripts/bringup_guestfs.sh into ansible. This
is just a small step towards making that easier.

Signed-off-by: Luis Chamberlain <mcgrof@kernel.org>
This will be used later.

Signed-off-by: Luis Chamberlain <mcgrof@kernel.org>
The bringup process for libvirt system URI support (not session),
so all debian based distros, requieres us to be paranoid about the
permissions of our storage directory where we place our libvirt
storage pool, and guestfs images.

We used to be stupid and were hammering with a sledge hammer a crazy
sudo chown -R on a target storage path. That was removed by commit
c31459d ("scripts/bringup_guestfs.sh: fix silly directory permission
fix"). I rushed that change in because it was affecting live systems
and we needed to get testing moving.

This adds some sanity checks which don't do the crazy wild permission
checks, it will just fail if the permissions are not right.

Signed-off-by: Luis Chamberlain <mcgrof@kernel.org>
Folks trying to use kdevops and testing with fstests will quickly
find out a surprise that their config is not being parsed correctly
until later.

Fix this by preventing bringup if the prefix has a dash.

We use the dash to help parallelize testing filesystem profiles and
so the host prefix goes before the filesystem name and test profile.

Signed-off-by: Luis Chamberlain <mcgrof@kernel.org>
@kdevops-kpd
Copy link
Author

kdevops-kpd bot commented Mar 23, 2025

Upstream branch: 0e172a8
series: https://patchwork.kernel.org/project/kdevops/list/?series=946588
version: 1

@kdevops-kpd
Copy link
Author

kdevops-kpd bot commented Apr 6, 2025

Upstream branch: 3521091
series: https://patchwork.kernel.org/project/kdevops/list/?series=948301
version: 1

Pull request is NOT updated. Failed to apply https://patchwork.kernel.org/project/kdevops/list/?series=948301
error message:

Cmd('git') failed due to: exit code(128)
  cmdline: git am --3way
  stdout: 'Applying: scripts/bringup_guestfs.sh: uninstall unattended-upgrades on debian guests
Using index info to reconstruct a base tree...
M	scripts/bringup_guestfs.sh
Falling back to patching base and 3-way merge...
Auto-merging scripts/bringup_guestfs.sh
No changes -- Patch already applied.
Applying: devconfig: ensure unattended-upgrades is not installed on debian
Using index info to reconstruct a base tree...
M	playbooks/roles/devconfig/tasks/install-deps/debian/main.yml
Falling back to patching base and 3-way merge...
No changes -- Patch already applied.
Applying: libvirt: use consistent pool path variables and use optional yaml output
Using index info to reconstruct a base tree...
M	kconfigs/Kconfig.guestfs
M	kconfigs/Kconfig.libvirt
M	scripts/bringup_guestfs.sh
M	scripts/bringup_vagrant.sh
M	scripts/destroy_guestfs.sh
M	scripts/destroy_vagrant.sh
M	scripts/gen-nodes.Makefile
M	scripts/guestfs.Makefile
M	scripts/prune_stale_vagrant.sh
M	scripts/vagrant.Makefile
Falling back to patching base and 3-way merge...
Auto-merging scripts/guestfs.Makefile
Auto-merging scripts/bringup_guestfs.sh
Auto-merging kconfigs/Kconfig.guestfs
CONFLICT (content): Merge conflict in kconfigs/Kconfig.guestfs
Patch failed at 0003 libvirt: use consistent pool path variables and use optional yaml output'
  stderr: 'error: Failed to merge in the changes.
hint: Use 'git am --show-current-patch=diff' to see the failed patch
hint: When you have resolved this problem, run "git am --continue".
hint: If you prefer to skip this patch, run "git am --skip" instead.
hint: To restore the original branch and stop patching, run "git am --abort".
hint: Disable this message with "git config advice.mergeConflict false"'

conflict:

diff --cc kconfigs/Kconfig.guestfs
index d309436,c6d2d19..0000000
--- a/kconfigs/Kconfig.guestfs
+++ b/kconfigs/Kconfig.guestfs
@@@ -5,16 -5,6 +5,19 @@@ config STORAGE_POOL_PAT
  	output yaml
  	default LIBVIRT_STORAGE_POOL_PATH
  
++<<<<<<< HEAD
 +config GUESTFS_STORAGE_DIR
 +	string
 +	output yaml
 +	default "{{ kdevops_storage_pool_path }}/kdevops/guestfs"
 +
 +config GUESTFS_BASE_IMAGE_DIR
 +	string
 +	output yaml
 +	default "{{ guestfs_storage_dir }}/base_images"
 +
++=======
++>>>>>>> libvirt: use consistent pool path variables and use optional yaml output
  config GUESTFS_HAS_CUSTOM_RAW_IMAGE
  	bool
  

@kdevops-kpd kdevops-kpd bot force-pushed the main_base branch 8 times, most recently from b6d2a44 to a7241fe Compare April 24, 2025 17:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants