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 ABS support for Rocky and Alma 8 #228

Merged
merged 2 commits into from
Sep 22, 2021

Conversation

GabrielNagy
Copy link
Member

I missed this in my previous PR, only added vmpooler support initially.

Copy link
Member

@ekohl ekohl left a comment

Choose a reason for hiding this comment

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

In general I'm not a fan of multiple changes in the same commit. This appears to do 3 things:

  • ABS support for Rocky/Alma 8
  • Use ||=
  • Change the coding style on Ubuntu POWER

@@ -37,12 +37,12 @@ def generate_node(node_info, base_config, bhg_version)
when 'AARCH64'
'arm64'
when 'POWER'
base_template = node_info['ostype'].sub(/ubuntu(\d\d)/, 'ubuntu-\1.')
base_template.sub!(/ubuntu-(\d\d)/, 'ubuntu-\1.')
Copy link
Member

Choose a reason for hiding this comment

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

Why this change? It looks unrelated.

Copy link
Member Author

Choose a reason for hiding this comment

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

I wanted to make things more similar with the vmpooler generator.

About this line I noticed we ran a sub on node_info['ostype'] on line 31 to add a dash which is needed for all Ubuntu templates.

This line should just add a dot between the major and minor versions of Ubuntu (1804 -> 18.04) when the arch is POWER. I guess we can document this a bit though.

Copy link
Member

Choose a reason for hiding this comment

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

My point is that in general it's a good practice to separate your changes to multiple commits.

Copy link
Member Author

Choose a reason for hiding this comment

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

Yeah, I usually start with something simple and then tinker with stuff more and more lol

I'll update the commit messages to reflect these changes.

@GabrielNagy
Copy link
Member Author

Unfortunately beaker-hostgenerator doesn't generate ABS fixtures, so I tested this by running:

bundle exec beaker-hostgenerator --hypervisor abs aix71-POWERfa-aix72-POWERfa-amazon6-64a-amazon7-64a-debian9-64a-debian9-32a-debian10-64a-debian11-64a-fedora32-64a-fedora34-64a-osx1015-64a-osx11-64a-redhat6-64a-redhat6-32a-centos8-64a-redhat7-64a-redhat7-POWERa-redhat7-AARCH64a-redhat8-64a-redhat8-POWERa-redhat8-AARCH64a-redhatfips7-64a-redhatfips8-64a-almalinux8-64a-rocky8-64a-sles11-64a-sles11-32a-sles12-64a-sles12-POWERa-sles15-64a-solaris10-64a-solaris10-SPARCa-solaris11-64a-solaris11-SPARCa-solaris114-64a-ubuntu1404-64a-ubuntu1404-32a-ubuntu1604-64a-ubuntu1604-32a-ubuntu1604-POWERa-ubuntu1804-64a-ubuntu1804-AARCH64a-ubuntu2004-64a-ubuntu2004-AARCH64a-windows10ent-64a-windows10ent-32a-windows2008r2-64a-windows2012r2-64a-windows2016-64a-windows2019-64a-windowsfips2012r2-64a

before and after my changes and comparing them, the only additions were the alma and rocky templates.

@GabrielNagy
Copy link
Member Author

In general I'm not a fan of multiple changes in the same commit. This appears to do 3 things:

  • ABS support for Rocky/Alma 8
  • Use ||=
  • Change the coding style on Ubuntu POWER

Makes sense. In the future I'd like to have some parity between abs and vmpooler, and hopefully better document how these templates should be generated.

I missed this in my previous PR, only added vmpooler support initially.

Only update the 'template' key if it was not previously declared in the
host's base config.
This should accomplish the same functionality as before, but calls sub
on the base_template variable instead of node_info which is also done on
line 31.

The purpose of the initial sub is to add a dash between the platform
name and version.
@GabrielNagy GabrielNagy force-pushed the rocky-alma-abs-support branch from 38a9f4a to d9126a4 Compare September 22, 2021 13:40
@GabrielNagy GabrielNagy merged commit 2805f8e into voxpupuli:master Sep 22, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants