Connecting without proxy

I’m trying to provision a server using a smart proxy using the KEXEC template. I see this message in the foreman server log.

2019-09-03T13:40:32 [D|app|8055a] Connecting without proxy, not using SSL client cert
2019-09-03T13:40:32 [D|app|8055a] Image API PUT https://…

Expected outcome:
I expected the foreman smart proxy to communicate directly to the server to be provisioned and not the foreman server. Is this the proper behavior or is it configurable.

Foreman and Proxy versions:
Alll 1.20.3

Templates, Pulp Node, Puppet, Logs, and Discovery

Foreman and Proxy plugin versions:

Other relevant data:
[e.g. logs from Foreman and/or the Proxy, modified templates, commands issued, etc]
(for logs, surround with three back-ticks to get proper formatting, e.g.)

Foreman logs
```2019-09-03T13:40:32 [D|app|8055a] Connecting without proxy, not using SSL client cert
2019-09-03T13:40:32 [D|app|8055a] Image API PUT (path=/kexec, payload={"kernel":"","initram":"","append":"ks=http://<smart proxy hostname>:8000/unattended/provision?token=4b7d8f71-4ee6-4d03-a55e-073c38d86d66\u0026static=yes inst.ks.sendmac ip= nameserver=xxxxxxx ksdevice=bootif BOOTIF=00-54-80-28-4d-29-6a nomodeset nomodeset net.ifnames=0 biosdevname=0","extra":[]})```

Smart proxy logs

2019-09-03T13:40:33 295ba9a3 [I] Started GET /templateServer 
2019-09-03T13:40:33 295ba9a3 [I] Finished GET /templateServer with 200 (0.38 ms)
2019-09-03T13:41:07 5add6167 [I] Started GET /provision token=4b7d8f71-4ee6-4d03-a55e-073c38d86d66&static=yes
2019-09-03T13:41:07 5add6167 [I] Finished GET /provision with 200 (361.08 ms)

Hello, when you set Discovery Proxy in the associated Subnet, then it will use that Smart Proxy to route the request. Otherwise if its blank or no subnet was detected, then Foreman will attempt to connect directly. Its in our docs.

lzap thanks. Discovery Proxy is set on the subnet for the server and foreman_url in the kexec template in the log snippet I provided shows the smart proxy hostname in the ks= section. The issue is the kexec command is not using the smart proxy.

I see this in the log
Enqueued task 'Reloading kernel on ’ to ‘Host::Managed Post’ queue
and then this
2019-09-03T13:40:31 [I|aud|8055a] Nic::Managed (9529) update event on subnet_id 2, 20.

Is this a timing issue has the reload kernel task already checked the subnet before it gets updated?
The proxys are set on subnet id 20.


Thanks for your help. The discovery interface did not have the proxy setup. Once I added it, it used the proxy.