mgr-create-bootstrap-repo doesn't differenciate SLES and SLES for SAP for SP4/5
m-garrido opened this issue · 1 comments
Problem description
Hello,
When creating a bootstrap repo for SLES, mgr-create-bootstrap-repo find two channels with the same product id (i.e 2297).
['sle-product-sles_sap15-sp4-pool-ppc64le', 'sle-product-sles15-sp4-pool-ppc64le']
in rhnChannel table with "_sql_find_root_channel_label" sql request.
By default, the first one is selected even if the parameter '--with-parent-channel' is set to 'sle-product-sles15-sp4-pool-ppc64le'.
In my case, i would like to use 'sle-product-sles15-sp4-pool-ppc64le' channel and not 'sle-product-sles_sap15-sp4-pool-ppc64le'.
There is a way to force the parent channel ? i don't find '--with-parent-channel' parameter very usefull.
Indeed, It's used at the beginning of the "create_repo" function. But overridden directly after.
def create_repo(label, options, mgr_bootstrap_data, additional=[]):
pdids = None
usecustomchannels = options.usecustomchannels
**parentchannel = options.parentchannel**
if 'PDID' in mgr_bootstrap_data.DATA[label]:
pdids = ', '.join(mgr_bootstrap_data.DATA[label]['PDID'])
if label in ('RHEL8-x86_64', 'RHEL9-x86_64'):
if not connected_to_rhel_cdn(find_root_channel_labels(pdids)):
log("WARNING: {} not connected to CDN.".format(label))
if (label.startswith('RES') or label.startswith('RHEL') or label.lower().startswith('ubuntu')):
usecustomchannels = True
if isUyuni():
usecustomchannels = True
for plabel in find_root_channel_labels(pdids):
# we take the first one
**parentchannel = plabel**
break
else:
usecustomchannels = True
**parentchannel = mgr_bootstrap_data.DATA[label]['BASECHANNEL']**
Steps to reproduce
- Add product SLES for SAP SP4
- Add product SLES SP4
- Create repo for SLES SP4
...
Uyuni version
5.0.4
Uyuni proxy version (if used)
No response
Useful logs
No response
Additional information
No response
Yes, it is by design. On a system we see only it is a SLE 15 SP4.
SLES, SLES for SAP, SLED and others are all the same. So only 1 entry for all.