Skip to content
This repository has been archived by the owner on Apr 7, 2022. It is now read-only.

[RFR] Fix RHV44 iso service catalogs #10277

Merged
merged 8 commits into from
Aug 10, 2020
Merged
Show file tree
Hide file tree
Changes from 7 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 24 additions & 0 deletions cfme/tests/services/test_iso_service_catalogs.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,11 @@
from cfme.infrastructure.pxe import get_template_from_config
from cfme.infrastructure.pxe import ISODatastore
from cfme.services.service_catalogs import ServiceCatalogs
from cfme.utils.blockers import Blocker
from cfme.utils.generators import random_vm_name
from cfme.utils.log import logger
from cfme.utils.version import Version


pytestmark = [
pytest.mark.meta(server_roles="+automate"),
Expand Down Expand Up @@ -93,7 +96,28 @@ def catalog_item(appliance, provider, dialog, catalog, provisioning):
)


# There is a Libvirt bug BZ(1783355) on our RHV 4.4. This seem to prevent some tests to run with it.
Copy link
Member

Choose a reason for hiding this comment

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

@JaryN interesting approach here, but I think we would be fine using this BZ as a blocker directly.

Yes there is a separation from when that BZ is unblocked to when our RHV4.4 provider is updated with the fix, but this test going from skipped to failing is a good indicator that its time to update our provider to pickup the BZ fix.

# I was about to use this blocker: JIRA('RHCFQE-14575'), but this didn't work because we seem to
# lack credentials to read Jira tickets. There seemed to be no nicer way how to mark them other than
# creating EternalBlocker and use the `unblock` kwarg that is handled in special way in the
# `blockers` metaplugin to block only the tests executed against the RHV 4.4.


class EternalBlocker(Blocker):
def blocks(self):
return True

# This needs to be defined, otherwise we are getting some exception.
def url(self):
return None


@test_requirements.rhev
@pytest.mark.meta(
blockers=[
EternalBlocker(unblock=lambda provider: provider.version < Version("4.4"))
]
)
def test_rhev_iso_servicecatalog(appliance, provider, setup_provider, setup_iso_datastore,
catalog_item, request):
"""Tests RHEV ISO service catalog
Expand Down
1 change: 1 addition & 0 deletions conf/supportability.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
- 4.1
- 4.2
- 4.3
- 4.4
- scvmm:
- 2012
- 2016
Expand Down
2 changes: 2 additions & 0 deletions conf/supportability.yaml.template
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,8 @@
- rhevm:
- 4.1
- 4.2
- 4.3
- 4.4
- scvmm:
- 2012
- 2016
Expand Down
81 changes: 81 additions & 0 deletions data/rhel8.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
<%
# Account for some missing values
evm[:root_password] = root_fallback_password if evm[:root_password].blank?
evm[:hostname] = evm[:vm_target_hostname] if evm[:hostname].blank?
evm[:addr_mode] = ['dhcp'] if evm[:ip_addr].blank? || evm[:subnet_mask].blank? || evm[:gateway].blank?

rhn_activation_key = ""

# Dynamically create the network string based on values from the dialog
if evm[:addr_mode].first == 'static'
network_string = "network --onboot yes --bootproto=static --noipv6"
["ip", :ip_addr, "netmask", :subnet_mask, "gateway", :gateway, "hostname", :hostname, "nameserver", :dns_servers].each_slice(2) do |ks_key, evm_key|
network_string << " --#{ks_key} #{evm[evm_key]}" unless evm[evm_key].blank?
end
else
network_string = "network --onboot yes --bootproto=dhcp --noipv6"
network_string << " --#{"hostname"} #{evm[:hostname]}" unless evm[:hostname].blank?
end
%>
# Install OS instead of upgrade
install
# Firewall configuration
firewall --enabled --ssh --service=ssh
# Use network installation
url --url="$url1"
# Network information
network --bootproto=dhcp --device=eth0
# Root password
rootpw --iscrypted <%=MiqPassword.md5crypt(evm[:root_password]) %>
# System authorization information
auth --useshadow --passalgo=sha512
# Use text mode install
text
# System keyboard
keyboard us
# System language
lang en_US
# SELinux configuration
selinux --enforcing
# Do not configure the X Window System
skipx
# Installation logging level
logging --level=info
# Power Off after installation - Needed to complete EVM provisioning
shutdown
# System timezone
timezone America/New_York
# System bootloader configuration
# Clear the Master Boot Record
zerombr
# Partition clearing information
clearpart --all --initlabel
# Disk partitioning information
autopart --fstype=ext4
bootloader --location=mbr --append="rhgb quiet"

repo --name=rhel-x86_64-server-8 --baseurl=$url1
repo --name=rhel-x86_64-server-optional-7 --baseurl=$url2

%packages
@base
@core
xorg-x11-xauth
nfs-utils
autofs
qemu-guest-agent
wget
%end

%post --log=/root/kickstart-post.log
set -x

dhclient

systemctl enable ovirt-guest-agent.service
systemctl start ovirt-guest-agent.service


#Callback to CFME during post-install
wget --no-check-certificate <%=evm[:post_install_callback_url] %>
%end