Bug 1574806

Summary: Post Provisioning issue - Switch from "Pending Installation" to "Installed". Build button
Product: Red Hat Satellite Reporter: Waldirio M Pinheiro <wpinheir>
Component: ProvisioningAssignee: satellite6-bugs <satellite6-bugs>
Status: CLOSED NOTABUG QA Contact: Katello QA List <katello-qa-list>
Severity: high Docs Contact:
Priority: unspecified    
Version: 6.3.1CC: inecas
Target Milestone: Unspecified   
Target Release: Unused   
Hardware: All   
OS: All   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-05-04 17:01:19 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 Waldirio M Pinheiro 2018-05-04 05:45:37 UTC
Description of problem:
After satellite provision the new content host, all process will be executed and at the end the content host will do one call just to switch the state, from *pending installation* to *installed*. As consequence the tftp file will be updated just to avoid the content host restart over the network/pxe and reinstall the machine again.

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

How reproducible:
100%

Steps to Reproduce:
1. Create a new Content Host *define the mac address*
2. Check the content file on /var/lib/tftpboot/pxelinux.cfg/*
3. Get the ks url
4. Call via command below *just update according your environment/token*
---
wget -q -O /dev/null --no-check-certificate http://sat631.local.domain/unattended/built?token=bbb488bc-4bf7-46e4-a410-9aa1c58f896b
---


Actual results:
tftp file still the same and if the content host restart over the network a new installation will start

Expected results:
change the file just to avoid a new installation in case the content host boot up via pxe

Additional info:

Comment 1 Waldirio M Pinheiro 2018-05-04 05:47:54 UTC
// Conf file on */var/lib/tftpboot/pxelinux.cfg* dir
---
[root@sat631 pxelinux.cfg]# cat 01-52-54-00-41-df-d2
# 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://sat631.local.domain/unattended/provision?token=1904def9-3855-47b4-9481-cfa7a4f3f570  network ksdevice=bootif ks.device=bootif BOOTIF=00-52-54-00-41-df-d2 kssendmac ks.sendmac inst.ks.sendmac
  IPAPPEND 2
[root@sat631 pxelinux.cfg]#
---

// Did the call 10 x
---
[root@sat631 pxelinux.cfg]# wget -q -O /dev/null --no-check-certificate http://sat631.local.domain/unattended/provision?token=1904def9-3855-47b4-9481-cfa7a4f3f570
[root@sat631 pxelinux.cfg]# wget -q -O /dev/null --no-check-certificate http://sat631.local.domain/unattended/provision?token=1904def9-3855-47b4-9481-cfa7a4f3f570
[root@sat631 pxelinux.cfg]# wget -q -O /dev/null --no-check-certificate http://sat631.local.domain/unattended/provision?token=1904def9-3855-47b4-9481-cfa7a4f3f570
[root@sat631 pxelinux.cfg]# wget -q -O /dev/null --no-check-certificate http://sat631.local.domain/unattended/provision?token=1904def9-3855-47b4-9481-cfa7a4f3f570
[root@sat631 pxelinux.cfg]# wget -q -O /dev/null --no-check-certificate http://sat631.local.domain/unattended/provision?token=1904def9-3855-47b4-9481-cfa7a4f3f570
[root@sat631 pxelinux.cfg]# wget -q -O /dev/null --no-check-certificate http://sat631.local.domain/unattended/provision?token=1904def9-3855-47b4-9481-cfa7a4f3f570
[root@sat631 pxelinux.cfg]# wget -q -O /dev/null --no-check-certificate http://sat631.local.domain/unattended/provision?token=1904def9-3855-47b4-9481-cfa7a4f3f570
[root@sat631 pxelinux.cfg]# wget -q -O /dev/null --no-check-certificate http://sat631.local.domain/unattended/provision?token=1904def9-3855-47b4-9481-cfa7a4f3f570
[root@sat631 pxelinux.cfg]# wget -q -O /dev/null --no-check-certificate http://sat631.local.domain/unattended/provision?token=1904def9-3855-47b4-9481-cfa7a4f3f570
[root@sat631 pxelinux.cfg]# wget -q -O /dev/null --no-check-certificate http://sat631.local.domain/unattended/provision?token=1904def9-3855-47b4-9481-cfa7a4f3f570
[root@sat631 pxelinux.cfg]#
---

// Entries related to all of them on the log
---
2018-05-04 01:36:41 efc1c6a1 [app] [I] Started GET "/unattended/provision?token=1904def9-3855-47b4-9481-cfa7a4f3f570" for 192.168.56.100 at 2018-05-04 01:36:41 -0400
192.168.56.100 - - [04/May/2018:01:36:41 -0400] "GET /unattended/provision?token=1904def9-3855-47b4-9481-cfa7a4f3f570 HTTP/1.1" 200 5222 "-" "Wget/1.14 (linux-gnu)"

2018-05-04 01:36:48 49604880 [app] [I] Started GET "/unattended/provision?token=1904def9-3855-47b4-9481-cfa7a4f3f570" for 192.168.56.100 at 2018-05-04 01:36:48 -0400
192.168.56.100 - - [04/May/2018:01:36:48 -0400] "GET /unattended/provision?token=1904def9-3855-47b4-9481-cfa7a4f3f570 HTTP/1.1" 200 5222 "-" "Wget/1.14 (linux-gnu)"

2018-05-04 01:36:52 6b660c1b [app] [I] Started GET "/unattended/provision?token=1904def9-3855-47b4-9481-cfa7a4f3f570" for 192.168.56.100 at 2018-05-04 01:36:52 -0400
192.168.56.100 - - [04/May/2018:01:36:52 -0400] "GET /unattended/provision?token=1904def9-3855-47b4-9481-cfa7a4f3f570 HTTP/1.1" 200 5222 "-" "Wget/1.14 (linux-gnu)"
    
2018-05-04 01:37:00 fca12c39 [app] [I] Started GET "/unattended/provision?token=1904def9-3855-47b4-9481-cfa7a4f3f570" for 192.168.56.100 at 2018-05-04 01:37:00 -0400
192.168.56.100 - - [04/May/2018:01:37:00 -0400] "GET /unattended/provision?token=1904def9-3855-47b4-9481-cfa7a4f3f570 HTTP/1.1" 200 5222 "-" "Wget/1.14 (linux-gnu)"

2018-05-04 01:37:06 0390a5f3 [app] [I] Started GET "/unattended/provision?token=1904def9-3855-47b4-9481-cfa7a4f3f570" for 192.168.56.100 at 2018-05-04 01:37:06 -0400
192.168.56.100 - - [04/May/2018:01:37:06 -0400] "GET /unattended/provision?token=1904def9-3855-47b4-9481-cfa7a4f3f570 HTTP/1.1" 200 5222 "-" "Wget/1.14 (linux-gnu)"

2018-05-04 01:37:12 ff957fb7 [app] [I] Started GET "/unattended/provision?token=1904def9-3855-47b4-9481-cfa7a4f3f570" for 192.168.56.100 at 2018-05-04 01:37:12 -0400
192.168.56.100 - - [04/May/2018:01:37:12 -0400] "GET /unattended/provision?token=1904def9-3855-47b4-9481-cfa7a4f3f570 HTTP/1.1" 200 5222 "-" "Wget/1.14 (linux-gnu)"

2018-05-04 01:37:16 c7631577 [app] [I] Started GET "/unattended/provision?token=1904def9-3855-47b4-9481-cfa7a4f3f570" for 192.168.56.100 at 2018-05-04 01:37:16 -0400
192.168.56.100 - - [04/May/2018:01:37:16 -0400] "GET /unattended/provision?token=1904def9-3855-47b4-9481-cfa7a4f3f570 HTTP/1.1" 200 5222 "-" "Wget/1.14 (linux-gnu)"

2018-05-04 01:37:21 27bbb019 [app] [I] Started GET "/unattended/provision?token=1904def9-3855-47b4-9481-cfa7a4f3f570" for 192.168.56.100 at 2018-05-04 01:37:21 -0400
192.168.56.100 - - [04/May/2018:01:37:21 -0400] "GET /unattended/provision?token=1904def9-3855-47b4-9481-cfa7a4f3f570 HTTP/1.1" 200 5222 "-" "Wget/1.14 (linux-gnu)"

2018-05-04 01:37:25 2a8ee37d [app] [I] Started GET "/unattended/provision?token=1904def9-3855-47b4-9481-cfa7a4f3f570" for 192.168.56.100 at 2018-05-04 01:37:25 -0400
192.168.56.100 - - [04/May/2018:01:37:25 -0400] "GET /unattended/provision?token=1904def9-3855-47b4-9481-cfa7a4f3f570 HTTP/1.1" 200 5222 "-" "Wget/1.14 (linux-gnu)"

2018-05-04 01:37:30 c74f81cd [app] [I] Started GET "/unattended/provision?token=1904def9-3855-47b4-9481-cfa7a4f3f570" for 192.168.56.100 at 2018-05-04 01:37:30 -0400
192.168.56.100 - - [04/May/2018:01:37:30 -0400] "GET /unattended/provision?token=1904def9-3855-47b4-9481-cfa7a4f3f570 HTTP/1.1" 200 5222 "-" "Wget/1.14 (linux-gnu)"
---

And the conf file still the same.
---
[root@sat631 pxelinux.cfg]# cat 01-52-54-00-41-df-d2
# 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://sat631.local.domain/unattended/provision?token=1904def9-3855-47b4-9481-cfa7a4f3f570  network ksdevice=bootif ks.device=bootif BOOTIF=00-52-54-00-41-df-d2 kssendmac ks.sendmac inst.ks.sendmac
  IPAPPEND 2
[root@sat631 pxelinux.cfg]#
---

Note. I put the debug mode on Satellite just to check if should be able to collect more info, nothing.


Best Regards
-- 
Waldirio M Pinheiro | Senior Software Maintenance Engineer

Comment 3 Waldirio M Pinheiro 2018-05-04 17:01:19 UTC
Hello all

btw I believe we can close this case once worked on a fresh sat 6.3.1 installation as well on the upgraded machine *6.2.x to 6.3.1*.

Thank you all


Best Regards
-- 
Waldirio M Pinheiro | Senior Software Maintenance Engineer

Comment 4 Waldirio M Pinheiro 2018-05-04 17:02:46 UTC
Just to keep on track / public view.

// The call
---
# wget -q -O /dev/null --no-check-certificate http://sat631.local.domain/unattended/built?token=e410f5e3-9437-4ada-9ae0-2d72b4feecd6
---

// The result of *foreman-tail | grep unat*
---
2018-05-04 12:53:26 e53a156b [app] [I] Started GET "/unattended/built?token=e410f5e3-9437-4ada-9ae0-2d72b4feecd6" for 192.168.56.100 at 2018-05-04 12:53:26 -0400
2018-05-04 12:53:26 e53a156b [app] [I] unattended: test01.local.domain is Built!
192.168.56.100 - - [04/May/2018:12:53:26 -0400] "GET /unattended/built?token=e410f5e3-9437-4ada-9ae0-2d72b4feecd6 HTTP/1.1" 201 - "-" "Wget/1.14 (linux-gnu)"
---

and file was updated.


Note. The call on the first test was wrong, instead built I was pasting the provision link.


More attention next time. :)

Best Regards
-- 
Waldirio M Pinheiro | Senior Software Maintenance Engineer