diff --git a/kconfigs/Kconfig.guestfs b/kconfigs/Kconfig.guestfs index 52506a3b7..891901380 100644 --- a/kconfigs/Kconfig.guestfs +++ b/kconfigs/Kconfig.guestfs @@ -76,6 +76,7 @@ choice config GUESTFS_FEDORA bool "Fedora (or derived distro)" + output yaml select HAVE_DISTRO_XFS_PREFERS_MANUAL if FSTESTS_XFS select HAVE_DISTRO_BTRFS_PREFERS_MANUAL if FSTESTS_BTRFS select HAVE_DISTRO_EXT4_PREFERS_MANUAL if FSTESTS_EXT4 @@ -87,6 +88,7 @@ config GUESTFS_FEDORA config GUESTFS_DEBIAN bool "Debian" + output yaml select HAVE_CUSTOM_DISTRO_HOST_PREFIX select HAVE_DISTRO_XFS_PREFERS_MANUAL if FSTESTS_XFS select HAVE_DISTRO_BTRFS_PREFERS_MANUAL if FSTESTS_BTRFS @@ -108,6 +110,7 @@ choice config GUESTFS_DEBIAN_TRIXIE bool "Debian 13 - Trixie" + output yaml select GUESTFS_REQUIRES_UEFI select GUESTFS_HAS_CUSTOM_RAW_IMAGE select GUESTFS_HAS_CUSTOM_RAW_IMAGE_URL @@ -126,6 +129,7 @@ config GUESTFS_DEBIAN_TRIXIE config GUESTFS_DEBIAN_BUSTER bool "Debian 12 - Buster" + output yaml help Select this for debian buster, debian 12. diff --git a/playbooks/roles/base_image/templates/virt-builder.j2 b/playbooks/roles/base_image/templates/virt-builder.j2 index 608dc31f7..1cee429cb 100644 --- a/playbooks/roles/base_image/templates/virt-builder.j2 +++ b/playbooks/roles/base_image/templates/virt-builder.j2 @@ -29,7 +29,7 @@ root-password password:kdevops sm-unregister {% endif %} -{% if distro_debian_based is defined and distro_debian_based %} +{% if guestfs_debian is defined and guestfs_debian %} {# Ugh, debian has to be told to bring up the network and regenerate ssh keys #} {# Hope we get that interface name right! #} install isc-dhcp-client,ifupdown @@ -44,7 +44,7 @@ firstboot-command systemctl start ssh firstboot-command apt update && apt upgrade --yes uninstall unattended-upgrades -{% if distro_debian_trixie is defined and distro_debian_trixie %} +{% if guestfs_debian_trixie is defined and guestfs_debian_trixie %} {# CONFIG_GUESTFS_COPY_SOURCES_FROM_HOST_TO_GUEST will not work #} {# if /etc/nsswitch.conf has a line like this: #} {# #} diff --git a/playbooks/roles/bootlinux/tasks/build/builder.yml b/playbooks/roles/bootlinux/tasks/build/builder.yml index f981ad975..30118b88e 100644 --- a/playbooks/roles/bootlinux/tasks/build/builder.yml +++ b/playbooks/roles/bootlinux/tasks/build/builder.yml @@ -110,10 +110,18 @@ community.general.make: chdir: "{{ target_linux_dir_path }}" target: "olddefconfig" + register: olddefconfig_output when: - bootlinux_compiler_gcc|bool - not bootlinux_use_config_fragments|default(false)|bool +- name: Report unexpected Kconfig setting changes + ansible.builtin.debug: + var: olddefconfig_output.stderr_lines + when: + - bootlinux_compiler_gcc|bool + - "'warning:' in olddefconfig_output.stderr" + - name: Build {{ target_linux_tree }} community.general.make: chdir: "{{ target_linux_dir_path }}" @@ -128,10 +136,18 @@ params: LLVM: 1 target: "olddefconfig" + register: olddefconfig_llvm_output when: - bootlinux_compiler_clang|bool - not bootlinux_use_config_fragments|default(false)|bool +- name: Report unexpected Kconfig setting changes + ansible.builtin.debug: + var: olddefconfig_output.stderr_lines + when: + - bootlinux_compiler_clang|bool + - "'warning:' in olddefconfig_llvm_output.stderr" + - name: Build {{ target_linux_tree }} community.general.make: chdir: "{{ target_linux_dir_path }}" diff --git a/scripts/generate_cloud_configs.py b/scripts/generate_cloud_configs.py index ceb2eafc6..4f833c406 100755 --- a/scripts/generate_cloud_configs.py +++ b/scripts/generate_cloud_configs.py @@ -134,7 +134,7 @@ def generate_aws_kconfig() -> bool: if result.returncode == 0: # Write the output to the corresponding Kconfig file try: - with open(output_path, 'w') as f: + with open(output_path, "w") as f: f.write(result.stdout) except IOError as e: print(f"Error writing {kconfig_file}: {e}", file=sys.stderr) diff --git a/terraform/Kconfig.ssh b/terraform/Kconfig.ssh index 8a19d7c56..4e239a352 100644 --- a/terraform/Kconfig.ssh +++ b/terraform/Kconfig.ssh @@ -1,11 +1,10 @@ config TERRAFORM_SSH_USER_INFER - bool "Selecting this will infer your username from you local system" + bool "Infer the ssh user name" default y if !TERRAFORM_LAMBDALABS default n if TERRAFORM_LAMBDALABS help - If enabled we and you are running 'make menuconfig' as user sonia, - then we'd infer this and peg sonia as the default user name for you. - We'll simply run $(shell echo $USER). + If enabled and you are running 'make menuconfig' as user sonia, + then use "sonia" as the ssh user name. Note: This is automatically disabled for Lambda Labs since they don't support custom SSH users. @@ -16,37 +15,19 @@ config TERRAFORM_SSH_CONFIG_USER default "ubuntu" if TERRAFORM_LAMBDALABS default "admin" if !TERRAFORM_SSH_USER_INFER && !TERRAFORM_LAMBDALABS help - The SSH username to use for connecting to the target systems. - - For Lambda Labs, this is set to 'ubuntu' as Lambda Labs doesn't - support custom users and typically deploys Ubuntu instances. - - For other providers, this will be inferred from your local username - or set to a default value. + The SSH username Ansible will use to connect to its target + nodes. Generally this username has to match a user that is + pre-created when terraform provisions a cloud instance. config TERRAFORM_SSH_CONFIG_PUBKEY_FILE - string "The ssh public key to use to log in" + string "File containing Ansible's ssh public key" default "~/.ssh/kdevops_terraform_$(shell, echo $(TOPDIR_PATH) | sha256sum | cut -c1-8).pub" if TERRAFORM_LAMBDALABS default "~/.ssh/kdevops_terraform.pub" help - The ssh public key which will be pegged onto the systems's - ~/.ssh/authorized_keys file so you can log in. - - For Lambda Labs, the key path is made unique per directory by appending - the directory checksum to avoid conflicts when running multiple kdevops - instances. - -config TERRAFORM_SSH_CONFIG_PRIVKEY_FILE - string "The ssh private key file for authentication" - default "~/.ssh/kdevops_terraform_$(shell, echo $(TOPDIR_PATH) | sha256sum | cut -c1-8)" if TERRAFORM_LAMBDALABS - default "~/.ssh/kdevops_terraform" - help - The ssh private key file used for authenticating to the systems. - This should correspond to the public key specified above. - - For Lambda Labs, the key path is made unique per directory by appending - the directory checksum to avoid conflicts when running multiple kdevops - instances. + The filename of the file containing an ssh public key + Ansible is to use to manage its target nodes. The + matching private key should be located in a file using + the same basename (without the ".pub"). config TERRAFORM_SSH_CONFIG_GENKEY bool "Should we create a new random key for you?" diff --git a/terraform/aws/main.tf b/terraform/aws/main.tf index 0de2e5371..151677614 100644 --- a/terraform/aws/main.tf +++ b/terraform/aws/main.tf @@ -70,7 +70,7 @@ resource "aws_security_group" "kdevops_internal_group" { resource "aws_key_pair" "kdevops_keypair" { - key_name = var.ssh_keyname + key_name = var.aws_ssh_key_name public_key = var.ssh_config_pubkey_file != "" ? file(var.ssh_config_pubkey_file) : "" } @@ -133,7 +133,7 @@ resource "aws_instance" "kdevops_instance" { aws_security_group.kdevops_sec_group.id, aws_security_group.kdevops_internal_group.id ] - key_name = var.ssh_keyname + key_name = var.aws_ssh_key_name subnet_id = aws_subnet.kdevops_subnet.id user_data_base64 = element( data.template_cloudinit_config.kdevops_config.*.rendered, diff --git a/terraform/aws/vars.tf b/terraform/aws/vars.tf index e5466c9aa..bb54cb42a 100644 --- a/terraform/aws/vars.tf +++ b/terraform/aws/vars.tf @@ -74,9 +74,9 @@ variable "aws_shared_credentials_file" { default = "~/.aws/credentials" } -variable "ssh_keyname" { +variable "aws_ssh_key_name" { default = "kdevops_aws_key" - description = "The name of your ssh key, this is just the name displayed and used on aws in the backend" + description = "The name of the ssh key-pair to install in instances" type = string }