Bug #15213
closedDHCP conflict detection fails with exception if proxy is unavailable
Description
Cloned from https://bugzilla.redhat.com/show_bug.cgi?id=1337462
Description of problem:
Following exception raised in production.log while performing "yum update"
to update packages from sat6.1.9 -> Sat6.2 snap12. Though the log-level seems "warning" but following exception is being logged in production.log
==> /var/log/foreman/production.log <== 2016-05-19 04:32:23 [app] [W] failed to detect boot server: ERF12-5139 [ProxyAPI::ProxyException]: Unable to detect TFTP boot server ([Errno::ECONNREFUSED]: Connection refused - connect(2) for "qe-sat6-upgrade-rhel7.satqe.lab.eng.rdu2.redhat.co...) for Capsule https://qe-sat6-upgrade-rhel7.satqe.lab.eng.rdu2.redhat.com:9090/tftp | ProxyAPI::ProxyException: ERF12-5139 [ProxyAPI::ProxyException]: Unable to detect TFTP boot server ([Errno::ECONNREFUSED]: Connection refused - connect(2) for "qe-sat6-upgrade-rhel7.satqe.lab.eng.rdu2.redhat.co...) for Capsule https://qe-sat6-upgrade-rhel7.satqe.lab.eng.rdu2.redhat.com:9090/tftp | /usr/share/foreman/lib/proxy_api/tftp.rb:49:in `rescue in bootServer' | /usr/share/foreman/lib/proxy_api/tftp.rb:42:in `bootServer' | /usr/share/foreman/app/models/concerns/orchestration/dhcp.rb:72:in `boot_server' | /usr/share/foreman/app/models/concerns/orchestration/dhcp.rb:99:in `dhcp_attrs' | /usr/share/foreman/app/models/concerns/orchestration/dhcp.rb:20:in `dhcp_record' | /usr/share/foreman/app/models/concerns/orchestration/dhcp.rb:179:in `dhcp_conflict_detected?' | /opt/rh/rh-ror41/root/usr/share/gems/gems/activesupport-4.1.5/lib/active_support/callbacks.rb:424:in `block in make_lambda' | /opt/rh/rh-ror41/root/usr/share/gems/gems/activesupport-4.1.5/lib/active_support/callbacks.rb:231:in `call' | /opt/rh/rh-ror41/root/usr/share/gems/gems/activesupport-4.1.5/lib/active_support/callbacks.rb:231:in `block in halting'
Version-Release number of selected component (if applicable):
Sat[6.1.9 -> 6.2 snap12]
How reproducible:
Steps to Reproduce:
1. set sat6.2 repo
2. katello-service stop
3. yum update -y
Actual results:
Expected results:
No such exception in logs. If its a real issue then we need to fix it otherwise, we should suppress the exception, if possible.
Additional info:
Updated by Dominic Cleal over 8 years ago
- Subject changed from Upgrade [6.1.9 -> 6.2 snap12] failed to detect boot server: ERF12-5139 [ProxyAPI::ProxyException] to Upgrade failed to detect boot server: ERF12-5139 [ProxyAPI::ProxyException]
- Description updated (diff)
The log is missing context about what was happening (a request?), can you put any more info into this bug report please?
Updated by Marek Hulán over 8 years ago
- Subject changed from Upgrade failed to detect boot server: ERF12-5139 [ProxyAPI::ProxyException] to DHCP conflict detection fails with exception if proxy is unavailable
- Category set to DHCP
The root cause is that whenever existing host is saved (updated) we check for DHCP conflicts through proxy. If the communication with proxy fails, the check fails with exception. I think we should ignore such errors when proxy is unreachable and user wants to change e.g. only the host's comment attribute. Until we have better orchestration not driven by active record callbacks...
Updated by The Foreman Bot over 8 years ago
- Status changed from Assigned to Ready For Testing
- Pull request https://github.com/theforeman/foreman/pull/3554 added
Updated by Marek Hulán over 8 years ago
To reproduce: turn off DHCP proxy and try following from console Host.last.update :comment => 'test'
. If the last host is managed and has the proxy set correctly, it will fail with exception.
Updated by Marek Hulán over 8 years ago
- Related to Tracker #14002: Orchestration build around ActiveRecord hooks tracker added
Updated by Marek Hulán over 8 years ago
Unfortunately there's no easy way to disable the orchestration. The original motivation to fix this was host statuses migration so I fixed that instead so it skips validation. That should not do any harm, since we are not modifying any data, just creating sub-statuses and updating global status respectively.
Updated by Marek Hulán over 8 years ago
- Related to Feature #10782: Add global status for hosts added
Updated by Marek Hulán over 8 years ago
- Status changed from Ready For Testing to Closed
- % Done changed from 0 to 100
Applied in changeset 801c2fecd8762f6f04c9f855d318d7eaff36f16c.
Updated by Dominic Cleal over 8 years ago
- Translation missing: en.field_release set to 160