This article was originally published on the Red Hat Customer Portal. The information may no longer be current.
Satellite 6.2 introduced PXE-less discovery which is targeted to networks without PXE or DHCP services available. In this workflow, kernel on discovered nodes is replaced (via kexec technology) instead of rebooting. This turns out to be useful feature on PXE/DHCP networks as well.
To configure kexec on PXE/DHCP enabled network, do the following simple steps.
Step 1: Verify foreman discovery image version
Newer version of foreman-discovery-image must be used in order to send required "discovery_kexec" fact. We are planning rebase of foreman-discovery-image package in Satellite 6.2 upcoming errata. In the meantime, it is possible to download upstream version which is based on CentOS 7 rather than Red Hat Enterprise Linux. Series 3.4 are known to work with Satellite 6.2.
tftp_capsule# cd /var/lib/tftpboot/boot/
tftp_capsule# wget http://downloads.theforeman.org/discovery/releases/3.4/fdi-image-3.4.1.tar
tftp_capsule# tar -xvf fdi-image-3.4.1.tar
Step 2: Configure foreman discovery image kernel options
Satellite will either reboot or kexec discovered node based on presence of special fact called "discovery_kexec". When present and KExec template is associated with given Hostgroup and Operating System, kexec is performed. Reboot is the fallback mechanism if the two requirements are not met.
In Hosts - Provisioning templates search for "global" string and edit "PXELinux global default" template. In Satellite 6.2 it is possible to directly edit this template, in upcoming version this template must be cloned and Global setting must be changed to use the cloned template instead the default one.
ONTIMEOUT discovery_upstream
...
LABEL discovery_upstream
MENU LABEL Foreman Discovery Image 3.4.1
KERNEL boot/fdi-image/vmlinuz0
APPEND initrd=boot/fdi-image/initrd0.img rootflags=loop root=live:/fdi.iso rootfstype=auto ro rd.live.image acpi=force rd.luks=0 rd.md=0 rd.dm=0 rd.lvm=0 rd.bootif=0 rd.neednet=0 nomodeset proxy.url=https://CAPSULE_URL:9090 proxy.type=proxy fdi.pxfactname1=discovery_kexec fdi.pxfactvalue1=1
IPAPPEND 2
Change proxy.url and proxy.type accordingly to point to either Satellite Server or Capsule. Note the options fdi.pxfactname1=discovery_kexec fdi.pxfactvalue1=1 which are required in order to have the "discovery_kexec" fact sent along.
Now click on Build PXE Default to rebuild pxelinux.cfg/default template. Hosts can be discovered now.
Step 3: Modify Red Hat KExec template
Find Red Hat Kexec template, clone it, associate it with requied Operating System and edit its contents:
<%#
kind: kexec
name: Red Hat kexec
oses:
- CentOS 4
- CentOS 5
- CentOS 6
- CentOS 7
- Fedora 19
- Fedora 20
- Fedora 21
- Fedora 22
- RedHat 4
- RedHat 5
- RedHat 6
- RedHat 7
-%>
<%
mac = @host.facts['discovery_bootif']
bootif = '00-' + mac.gsub(':', '-') if mac
append = @host.facts['append']
-%>
{
"kernel": "<%= @kernel %>",
"initram": "<%= @initrd %>",
<% if (@host.operatingsystem.name == 'Fedora' and @host.operatingsystem.major.to_i > 16) or
(@host.operatingsystem.name != 'Fedora' and @host.operatingsystem.major.to_i >= 7) -%>
"append": "ks=<%= foreman_url('provision') %> inst.ks.sendmac <%= "ksdevice=bootif BOOTIF=#{bootif} #{append}" %>"
<% else -%>
"append": "ks=<%= foreman_url('provision') %> kssendmac <%= "BOOTIF=#{bootif} #{append}" %>"
<% end -%>
}
The template was designed for DHCP-less environments and it assumes static IP configuration. These "discovery_*" facts are not present, therefore the default template generates "ip=::::::none" Anaconda configuration which leads to System halted. The modified version does not provide static configuration, therefore Anaconda performs DHCP request.
Make sure to set this template as default one for required Operating Systems.
Step 4: Verify requirements and provision
Before provisioning the very first discovered node, show the detail page, expand all facts and search for "discovery_kexec" fact, it should be set to "1". Also make sure the Red Hat KExec template is associated with Operating System.
Discovered hosts now can be provisioned or auto-provisioned and kexec will be performed instead of reboot.
Troubleshooting
On some hardware or VMs, kexec will freeze when discovered node is on the first virtual console (tty1) with the text user interface.
To workaround this issue switch virtual terminal to tty2 (Alt+F2) before kexecing.
저자 소개
Lukáš Zapletal is a principal software engineer at Red Hat, and is involved in the Foreman and Fedora communities as well as working on Red Hat Satellite 6. He is also interested in security, SELinux, and performance monitoring with Performance Co-Pilot (PCP).
채널별 검색
오토메이션
기술, 팀, 환경을 포괄하는 자동화 플랫폼에 대한 최신 정보
인공지능
고객이 어디서나 AI 워크로드를 실행할 수 있도록 지원하는 플랫폼 업데이트
클라우드 서비스
관리형 클라우드 서비스 포트폴리오에 대해 더 보기
보안
환경과 기술 전반에 걸쳐 리스크를 감소하는 방법에 대한 최신 정보
엣지 컴퓨팅
엣지에서의 운영을 단순화하는 플랫폼 업데이트
인프라
세계적으로 인정받은 기업용 Linux 플랫폼에 대한 최신 정보
애플리케이션
복잡한 애플리케이션에 대한 솔루션 더 보기
오리지널 쇼
엔터프라이즈 기술 분야의 제작자와 리더가 전하는 흥미로운 스토리
제품
- Red Hat Enterprise Linux
- Red Hat OpenShift Enterprise
- Red Hat Ansible Automation Platform
- 클라우드 서비스
- 모든 제품 보기
툴
체험, 구매 & 영업
커뮤니케이션
Red Hat 소개
Red Hat은 Linux, 클라우드, 컨테이너, 쿠버네티스 등을 포함한 글로벌 엔터프라이즈 오픈소스 솔루션 공급업체입니다. Red Hat은 코어 데이터센터에서 네트워크 엣지에 이르기까지 다양한 플랫폼과 환경에서 기업의 업무 편의성을 높여 주는 강화된 기능의 솔루션을 제공합니다.