Bug 1626833

Summary: Unable to provision hosts from an external capsule after the Introduction of "Template Capsule" in the "Subnets"
Product: Red Hat Satellite Reporter: Mihir Lele <mlele>
Component: ProvisioningAssignee: satellite6-bugs <satellite6-bugs>
Status: CLOSED DUPLICATE QA Contact: Katello QA List <katello-qa-list>
Severity: medium Docs Contact:
Priority: medium    
Version: 6.4CC: inecas, nkathole, sshtein
Target Milestone: Unspecified   
Target Release: Unused   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-09-09 17:22:45 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 Mihir Lele 2018-09-09 13:29:29 UTC
Description of problem:

Unable to provision hosts from an external capsule after the Introduction of "Template Capsule" in the "Subnets"

Version-Release number of selected component (if applicable): 6.4 Beta

How reproducible: Always


Steps to Reproduce:

1) Create a subnet to provision hosts from capsule with keeping the "template capsule" parameter as blank.


2) Output from the capsule:

====
[root@capsule4 ~]# cat /var/lib/tftpboot/pxelinux.cfg/01-52-54-00-4c-04-16 
# This file was deployed via 'Kickstart default PXELinux' template


TIMEOUT 10
DEFAULT Kickstart default PXELinux

LABEL Kickstart default PXELinux
  KERNEL boot/RedHat-7.5-x86_64-vmlinuz
  APPEND initrd=boot/RedHat-7.5-x86_64-initrd.img ks=http://satellite4.example.com/unattended/provision?token=ee72fa89-f3b3-4067-bbdd-bf8a666a28fb  network ksdevice=bootif ks.device=bootif BOOTIF=00-52-54-00-4c-04-16 kssendmac ks.sendmac inst.ks.sendmac
  IPAPPEND 2
====

3) Now try provision the host or render the templates and you will see that the host is trying to fetch the kickstart files from the Satellite and not the capsule, and the build fails with "unable to fetch kickstart file" error and the system ends with a dracut shell.
 
4) Now go to subnet again and assign "Template Capsule" as capsule and re-build the host again.

5) Now render the templates and you will see that the "ks=" is pointing to the capsule. But now its going to fetch kickstart over "https".

6) Try provisioning the host again and now it complains about lack of certificates as its trying to fetch the ks over https instead of http

7) Output from the capsule:

===
[root@capsule4 ~]# cat /var/lib/tftpboot/pxelinux.cfg/01-52-54-00-4c-04-16 
# This file was deployed via 'Kickstart default PXELinux' template


TIMEOUT 10
DEFAULT Kickstart default PXELinux

LABEL Kickstart default PXELinux
  KERNEL boot/RedHat-7.5-x86_64-vmlinuz
  APPEND initrd=boot/RedHat-7.5-x86_64-initrd.img ks=https://capsule4.example.com:9090/unattended/provision?token=a09ad81a-9607-433a-ac07-377550f4615c  network ksdevice=bootif ks.device=bootif BOOTIF=00-52-54-00-4c-04-16 kssendmac ks.sendmac inst.ks.sendmac
  IPAPPEND 2

===

Additional info:

I suppose that pxe provisioning over https is not possible?

Also, neither the release notes nor the provisioning guide provides any clarification on the usage of the "template capsule" (I will file a separate doc bug for this)

I am keeping the priority of this bug as "medium" as I am not sure whether my understanding is correct on this. If its correct, this bug should be treated as a blocker.

Comment 1 Nikhil Kathole 2018-09-09 17:06:05 UTC
Looks similar to

https://bugzilla.redhat.com/show_bug.cgi?id=1624072

Comment 2 Mihir Lele 2018-09-09 17:22:45 UTC

*** This bug has been marked as a duplicate of bug 1624072 ***