Project

General

Profile

Actions

Bug #15213

closed

DHCP conflict detection fails with exception if proxy is unavailable

Added by Marek Hulán over 8 years ago. Updated almost 2 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
DHCP
Target version:
Difficulty:
Triaged:
No
Fixed in Releases:
Found in Releases:

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:


Related issues 2 (1 open1 closed)

Related to Foreman - Tracker #14002: Orchestration build around ActiveRecord hooks trackerNew03/02/2016

Actions
Related to Foreman - Feature #10782: Add global status for hostsClosedMarek Hulán06/11/2015Actions
Actions #1

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?

Actions #2

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...

Actions #3

Updated by Marek Hulán over 8 years ago

  • Status changed from New to Assigned
Actions #4

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
Actions #5

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.

Actions #6

Updated by Marek Hulán over 8 years ago

  • Related to Tracker #14002: Orchestration build around ActiveRecord hooks tracker added
Actions #7

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.

Actions #8

Updated by Marek Hulán over 8 years ago

Actions #9

Updated by Marek Hulán over 8 years ago

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

Updated by Dominic Cleal over 8 years ago

  • Translation missing: en.field_release set to 160
Actions #11

Updated by James lernard almost 2 years ago

  • Triaged set to No
Actions

Also available in: Atom PDF