Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for SL Micro 6.1 hosts #1771

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

szachovy
Copy link
Contributor

@szachovy szachovy commented Jan 16, 2025

What does this PR change?

This is the continuation of aadfe2e to make it more aligned with #1583 fulfilling requirements in https://github.com/SUSE/spacewalk/issues/26216.

To be verified after deployment:

  • salt/default/sshd.sls
  • ...

@szachovy szachovy requested a review from a team as a code owner January 16, 2025 12:52
@szachovy szachovy self-assigned this Jan 16, 2025
srbarrios
srbarrios previously approved these changes Jan 16, 2025
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

slemicro61o is not supported by user_data.yaml but combustion. Those changes need to be impacted in combustion (if needed).

combustion_images = ["leapmicro55o", "slmicro60o", "slmicro61o"]

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Double check if what is already in combustion is not enough.

@@ -62,6 +62,14 @@ variable "slemicro_minion_configuration" {
}
}

variable "slmicro_minion_configuration" {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need a minion for slmicro ? Can't we reuse the slemicro minion. Just a question.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can reuse it indeed.
Maybe in a future PR, we can also rename it, to something like suse_micro_minion.

@@ -332,6 +332,28 @@ module "slemicro_minion" {
provider_settings = lookup(local.provider_settings_by_host, "slemicro_minion", {})
}

module "slmicro_minion" {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need a minion for slmicro ? Can't we reuse the slemicro minion. Just a question.

@@ -505,6 +528,7 @@ output "configuration" {
proxy = var.container_proxy ? module.proxy_containerized[0].configuration : module.proxy[0].configuration
suse_client = module.suse_client.configuration
slemicro_minion = module.slemicro_minion.configuration
Copy link
Contributor

@maximenoel8 maximenoel8 Jan 16, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I checked the controller, we are parsing those slemicro and slmicro minion variables but we are actually doing nothing with it.
The slemicro variable is call nowhere.

variable "slemicro_minion_configuration" {
description = "use module.<SLE_MICRO_MINION_NAME>.configuration, see main.tf.libvirt-testsuite.example"
default = {
ids = []
hostnames = []
}
}

If you search in controller/main.tf, we don't use this variable.

We don't declare it in bashrc controller.

{% if grains.get('proxy') | default(false, true) %}export PROXY="{{ grains.get('proxy') }}" {% else %}# no proxy defined {% endif %}
{% if grains.get('client') | default(false, true) %}export CLIENT="{{ grains.get('client') }}"{% else %}# no client defined {% endif %}
{% if grains.get('minion') | default(false, true) %}export MINION="{{ grains.get('minion') }}"{% else %}# no minion defined {% endif %}
{% if grains.get('build_host') | default(false, true) %}export BUILD_HOST="{{ grains.get('build_host') }}"{% else %}# no build host defined {% endif %}
{% if grains.get('ssh_minion') | default(false, true) %}export SSH_MINION="{{ grains.get('ssh_minion') }}" {% else %}# no SSH minion defined {% endif %}
{% if grains.get('redhat_minion') | default(false, true) %}export RHLIKE_MINION="{{ grains.get('redhat_minion') }}" {% else %}# no RedHat-like minion defined {% endif %}
{% if grains.get('debian_minion') | default(false, true) %}export DEBLIKE_MINION="{{ grains.get('debian_minion') }}" {% else %}# no Debian-like minion defined {% endif %}
{% if grains.get('pxeboot_mac') | default(false, true) %}export PXEBOOT_MAC="{{ grains.get('pxeboot_mac') }}" {% else %}# no PXE boot MAC defined {% endif %}
{% if grains.get('kvm_host') | default(false, true) %}export VIRTHOST_KVM_URL="{{ grains.get('kvm_host') }}"

@@ -17,7 +17,7 @@ uyuni_key_for_fake_packages:
- name: transactional-update -c run rpm --import http://{{ grains.get("mirror") | default("minima-mirror-ci-bv.mgr.prv.suse.net", true) }}/uyuni.key
{% endif %}

{% if not (grains['osfullname'] in ['SL-Micro'] and grains['osrelease'] in ['6.0']) and not (grains['osfullname'] in ['openSUSE Leap Micro'] and grains['osrelease'] in ['5.5']) %}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we support both 6.0 and 6.1 ?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Right. But in fact here, what we do is to NOT support this salt state if we are on a transactional system.
So, I think we need to refactor it to cover any kind of transactional system version.

@srbarrios srbarrios dismissed their stale review January 17, 2025 05:48

I overlooked some good points that Maxime caught.

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.

5 participants