Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
wants to merge 1 commit into from

Conversation

dLobatog
Copy link
Member

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

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
@tbrisker
Copy link
Member

Looks good, will merge if [test] is green

@dLobatog
Copy link
Member Author

@tbrisker They are greener than this apple 🍏

@tbrisker
Copy link
Member

Merged as 15f2f29, thanks @dLobatog!

@tbrisker tbrisker closed this Aug 23, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants