Bug 1878034
| Summary: | [RFE] Add/override interfaces to provisioned hosts | ||
|---|---|---|---|
| Product: | Red Hat Satellite | Reporter: | Luka Bac <lbac> |
| Component: | Ansible Collection | Assignee: | Evgeni Golov <egolov> |
| Status: | CLOSED ERRATA | QA Contact: | Peter Ondrejka <pondrejk> |
| Severity: | high | Docs Contact: | |
| Priority: | medium | ||
| Version: | 6.7.0 | CC: | egolov, kagarwal, pcreech, sokeeffe, zhunting |
| Target Milestone: | 6.9.0 | Keywords: | FutureFeature, Triaged |
| Target Release: | Unused | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | ansible-collection-redhat-satellite-1.5.0 | Doc Type: | If docs needed, set a value |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2021-04-21 13:17:42 UTC | Type: | Bug |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
|
Description
Luka Bac
2020-09-11 06:48:41 UTC
Currently, the customer that has this feature request works around this issue by providing the following patch to the Red Hat Satellite Collection host module:
--- plugins/modules/host.py 2020-09-11 08:50:37.761582620 +0200
+++ plugins/modules/host.py 2020-09-11 08:50:34.532578390 +0200
@@ -191,6 +191,7 @@
owner_type=dict(type='invisible'),
provision_method=dict(choices=['build', 'image', 'bootdisk']),
image=dict(type='entity'),
+ interfaces_attributes=dict(type='list'),
),
mutually_exclusive=[
['owner', 'owner_group']
This then allows the customer (that provisions on VMware) to pass the interfaces_attributes list parameter to the host module like so:
[...]
interfaces_attributes:
- {}
- primary: 1
managed: 1
compute_attributes:
type: VirtualVmxnet3
network: portgroup123
Passing it like this means that we can now override the NICs provided by default by the compute_profile/compute_resource pair and also create new ones.
However, this is suboptimal for at least two reasons
- if we want to add a NIC we have to know exactly how many NICs are provided by default so that we pass as many empty elements to the list
- We cannot pass the 'friendly' network name that is available in the Satellite UI because it is not looked up by the module, and instead have to pass the raw portgroup, which has no relation to the VLAN for instance.
Dropping the Patch keyword as the provided patch is incomplete. Verified on Satellite 6.9 snap 9 via automation (test_crud[host_interface_attributes]) Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory (Moderate: Satellite 6.9 Release), and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHSA-2021:1313 |