Project

General

Profile

Bug #16197

Cannot rebuild when proxy from hostgroup is unreachable

Added by Daniel Lobato Garcia over 4 years ago. Updated over 2 years ago.

Status:
Closed
Priority:
Normal
Category:
Smart Proxy
Target version:
Difficulty:
Triaged:
Bugzilla link:
Fixed in Releases:
Found in Releases:

Description

Doing the following:
- Create 2 smart proxies, one for dhcp/dns/tft/puppetca/puppet, another for realms. Let's keep the realms proxy off, so it's unreachable.
- Create a hostgroup A that sets domain, subnet, realm, puppet_proxy, puppet_ca_proxy
- Create a host that uses hostgroup A, but uncheck 'inherit' and remove the 'realm' attribute. The host is created just fine with no realm
- When I try to rebuild the host, `HostBuildStatus#check_all_statuses` is called. This checks the host_status (OK), templates_status(OK), and smart_proxies_status(FAIL). The host cannot be rebuilt.

The reason `smart_proxies_status` fails is that `smart_proxy_ids` tries to find whether Realm is set.
- If it's set, it adds the proxy to 'Host#smart_proxies`
- If it's not set, it looks in the hostgroup to see if it's set there. However, I have overridden the option, because I don't want to set a Realm since I don't want to boot the Realm proxy I have.

Host#smart_proxies should not look in the host.hostgroup object to retrieve values for the proxy, but instead retrieve those from itself

Associated revisions

Revision 15f2f291 (diff)
Added by Daniel Lobato Garcia over 4 years ago

Fixes #16197 - Host#smart_proxies returns only the host proxies

Doing the following:
- Create 2 smart proxies, one for dhcp/dns/tft/puppetca/puppet, another
for realms. Let's keep the realms proxy off, so it's unreachable.
- Create a hostgroup A that sets domain, subnet, realm, puppet_proxy,
puppet_ca_proxy
- Create a host that uses hostgroup A, but uncheck 'inherit' and
remove the 'realm' attribute. The host is created just fine with no
realm
- When I try to rebuild the host, `HostBuildStatus#check_all_statuses`
is called. This checks the host_status (OK), templates_status(OK), and
smart_proxies_status(FAIL). The host cannot be rebuilt.

The reason `smart_proxies_status` fails is that `smart_proxy_ids`
tries to find whether Realm is set.
- If it's set, it adds the proxy to 'Host#smart_proxies`
- If it's not set, it looks in the hostgroup to see if it's set there.
However, I have overridden the option, because I don't want to set a
Realm since I don't want to boot the Realm proxy I have.

Host#smart_proxies should not look in the host.hostgroup object to
retrieve values for the proxy, but instead retrieve those from itself

Revision a49f2499 (diff)
Added by Daniel Lobato Garcia about 4 years ago

Fixes #16197 - Host#smart_proxies returns only the host proxies

Doing the following:
- Create 2 smart proxies, one for dhcp/dns/tft/puppetca/puppet, another
for realms. Let's keep the realms proxy off, so it's unreachable.
- Create a hostgroup A that sets domain, subnet, realm, puppet_proxy,
puppet_ca_proxy
- Create a host that uses hostgroup A, but uncheck 'inherit' and
remove the 'realm' attribute. The host is created just fine with no
realm
- When I try to rebuild the host, `HostBuildStatus#check_all_statuses`
is called. This checks the host_status (OK), templates_status(OK), and
smart_proxies_status(FAIL). The host cannot be rebuilt.

The reason `smart_proxies_status` fails is that `smart_proxy_ids`
tries to find whether Realm is set.
- If it's set, it adds the proxy to 'Host#smart_proxies`
- If it's not set, it looks in the hostgroup to see if it's set there.
However, I have overridden the option, because I don't want to set a
Realm since I don't want to boot the Realm proxy I have.

Host#smart_proxies should not look in the host.hostgroup object to
retrieve values for the proxy, but instead retrieve those from itself

(cherry picked from commit 15f2f2918f60ec5af84196c9c5cd026ae5654731)

History

#1 Updated by Daniel Lobato Garcia over 4 years ago

  • Subject changed from Cannot rebuild to Cannot rebuild when proxy from hostgroup is unreachable

This happens for all the attributes, not just realm, it was just meant to be an example

#2 Updated by Dominic Cleal over 4 years ago

  • Category set to Smart Proxy

#3 Updated by The Foreman Bot over 4 years ago

  • Status changed from New to Ready For Testing
  • Assignee set to Daniel Lobato Garcia
  • Pull request https://github.com/theforeman/foreman/pull/3752 added

#4 Updated by Daniel Lobato Garcia over 4 years ago

  • Status changed from Ready For Testing to Closed
  • % Done changed from 0 to 100

#5 Updated by Dominic Cleal over 4 years ago

  • Legacy Backlogs Release (now unused) set to 181

#6 Updated by Daniel Lobato Garcia over 4 years ago

  • Target version set to 1.6.2

Also available in: Atom PDF