The current Terraform Provider for the Satellite service has incorrect source code located here. The data_source that configures the satellite host attach script incorrectly enables all repos to be added when IBM is selected as the provider.
On line 140 - 141, the logic shows that if IBM is chosen as the provider, the host should enable all repos via subscription-manager:
for i, line := range lines {
if strings.Contains(line, "API_URL=") {
i = i + 1
if strings.ToLower(hostProvider) == "aws" {
lines[i] = "yum update -y\nyum-config-manager --enable '*'\nyum repolist all\nyum install container-selinux -y"
} else if strings.ToLower(hostProvider) == "ibm" {
lines[i] = "subscription-manager refresh\nsubscription-manager repos --enable=*\n"
} else if strings.ToLower(hostProvider) == "azure" {
lines[i] = fmt.Sprintf(`yum update --disablerepo=* --enablerepo="*microsoft*" -y
This is causing issues with IBM VSI's in SoftLayer where some of the additional repos are not available and thus host attach fails.
Recommended Solution:
To resolve this issue, I'd recommend having only the required repos enabled when IBM is selected as the provider, such as:
ISSUE:
The current Terraform Provider for the Satellite service has incorrect source code located here. The data_source that configures the satellite host attach script incorrectly enables all repos to be added when IBM is selected as the provider.
On line 140 - 141, the logic shows that if IBM is chosen as the provider, the host should enable all repos via subscription-manager:
This is causing issues with IBM VSI's in SoftLayer where some of the additional repos are not available and thus host attach fails.
Recommended Solution:
To resolve this issue, I'd recommend having only the required repos enabled when IBM is selected as the provider, such as:
The correct repos are documented here for IBM Hosts: https://cloud.ibm.com/docs/satellite?topic=satellite-ibm