Project

General

Profile

Actions

Bug #16475

closed

Provisioning fails when proxy is not updated

Added by Ohad Levy about 8 years ago. Updated over 7 years ago.

Status:
Rejected
Priority:
High
Assignee:
-
Category:
Host creation
Target version:
-
Difficulty:
Triaged:
Fixed in Releases:
Found in Releases:

Description

Since the introduction of UEFI boot, the proxy is required to be updated in order to use the tftp feature, however, if a user forget to upgrade, the following error message is presented:

Deploy TFTP PXELinux config for hostname task failed with the following error: ERF12-5472 [ProxyAPI::ProxyException]: Unable to set TFTP boot entry for 52:54:00:88:52:e6 ([RestClient::Forbidden]: 403 Forbidden) for proxy http://proxy/tftp
Failed to perform rollback on Deploy TFTP PXEGrub2 config for hostname - ERF12-7299 [ProxyAPI::ProxyException]: Unable to delete TFTP boot entry for 52:54:00:88:52:e6 ([RestClient::InternalServerError]: 500 Internal Server Error) for proxy http://proxy/tftp

It would be nice if we could:
  • present a more explicit message (as we already check the proxy version for something else) OR
  • fallback to legacy behavior if you are still using an older proxy

thoughts?


Related issues 2 (0 open2 closed)

Related to Smart Proxy - Refactor #15864: Pxelinux kind as an alias for SyslinuxClosedLukas Zapletal07/27/2016Actions
Related to Foreman - Feature #12634: New HW Model flag pxe_loader in UI/APIClosedLukas Zapletal11/30/2015Actions
Actions #1

Updated by Lukas Zapletal about 8 years ago

By updating you mean upgrading the instance? We don't have an installer patch merged, upgrade should do it (there is a migration as well).

WORKAROUND: mkdir -p /var/lib/tftproot/{grub,grub2} (this is for redhats, different paths on Debian/Ubuntu systems)

Actions #2

Updated by Dominic Cleal about 8 years ago

  • Translation missing: en.field_release set to 160

Please also provide the proxy logs, it's unclear from the error what the cause of the failure is.

Actions #3

Updated by Ohad Levy about 8 years ago

sorry, the proxy error is:

E, [2016-09-07T18:44:59.405187 #3815] ERROR -- : Unrecognized pxeboot config type: PXELinux
Actions #4

Updated by Dominic Cleal about 8 years ago

Actions #5

Updated by Dominic Cleal about 8 years ago

  • Related to Feature #12634: New HW Model flag pxe_loader in UI/API added
Actions #6

Updated by Lukas Zapletal about 8 years ago

  • Priority changed from Normal to High
  • Target version set to 1.5.2
Actions #7

Updated by Brandon Weeks about 8 years ago

NameError - uninitialized constant Proxy::TFTP::Pxegrub2:
 /usr/share/foreman-proxy/modules/tftp/tftp_api.rb:18:in `const_get'
 /usr/share/foreman-proxy/modules/tftp/tftp_api.rb:18:in `instantiate'
 /usr/share/foreman-proxy/modules/tftp/tftp_api.rb:26:in `delete'
 /usr/share/foreman-proxy/modules/tftp/tftp_api.rb:53:in `DELETE /:variant/:mac'
 /usr/lib/ruby/gems/1.8/gems/sinatra-1.0/lib/sinatra/base.rb:863:in `call'
 /usr/lib/ruby/gems/1.8/gems/sinatra-1.0/lib/sinatra/base.rb:863:in `route'
 /usr/lib/ruby/gems/1.8/gems/sinatra-1.0/lib/sinatra/base.rb:521:in `instance_eval'
 /usr/lib/ruby/gems/1.8/gems/sinatra-1.0/lib/sinatra/base.rb:521:in `route_eval'
 /usr/lib/ruby/gems/1.8/gems/sinatra-1.0/lib/sinatra/base.rb:500:in `route!'
 /usr/lib/ruby/gems/1.8/gems/sinatra-1.0/lib/sinatra/base.rb:497:in `catch'
 /usr/lib/ruby/gems/1.8/gems/sinatra-1.0/lib/sinatra/base.rb:497:in `route!'
 /usr/lib/ruby/gems/1.8/gems/sinatra-1.0/lib/sinatra/base.rb:476:in `each'
 /usr/lib/ruby/gems/1.8/gems/sinatra-1.0/lib/sinatra/base.rb:476:in `route!'
 /usr/lib/ruby/gems/1.8/gems/sinatra-1.0/lib/sinatra/base.rb:601:in `dispatch!'
 /usr/lib/ruby/gems/1.8/gems/sinatra-1.0/lib/sinatra/base.rb:411:in `call!'
 /usr/lib/ruby/gems/1.8/gems/sinatra-1.0/lib/sinatra/base.rb:566:in `instance_eval'
 /usr/lib/ruby/gems/1.8/gems/sinatra-1.0/lib/sinatra/base.rb:566:in `invoke'
 /usr/lib/ruby/gems/1.8/gems/sinatra-1.0/lib/sinatra/base.rb:566:in `catch'
 /usr/lib/ruby/gems/1.8/gems/sinatra-1.0/lib/sinatra/base.rb:566:in `invoke'
 /usr/lib/ruby/gems/1.8/gems/sinatra-1.0/lib/sinatra/base.rb:411:in `call!'
 /usr/lib/ruby/gems/1.8/gems/sinatra-1.0/lib/sinatra/base.rb:399:in `call'
 /usr/lib/ruby/gems/1.8/gems/rack-1.1.0/lib/rack/commonlogger.rb:18:in `call'
 /usr/share/foreman-proxy/lib/proxy/log.rb:63:in `call'
 /usr/lib/ruby/gems/1.8/gems/rack-1.1.0/lib/rack/showexceptions.rb:24:in `call'
 /usr/lib/ruby/gems/1.8/gems/sinatra-1.0/lib/sinatra/base.rb:979:in `call'
 /usr/lib/ruby/gems/1.8/gems/sinatra-1.0/lib/sinatra/base.rb:1005:in `synchronize'
 /usr/lib/ruby/gems/1.8/gems/sinatra-1.0/lib/sinatra/base.rb:979:in `call'
 /usr/lib/ruby/gems/1.8/gems/rack-1.1.0/lib/rack/urlmap.rb:47:in `call'
 /usr/lib/ruby/gems/1.8/gems/rack-1.1.0/lib/rack/urlmap.rb:41:in `each'
 /usr/lib/ruby/gems/1.8/gems/rack-1.1.0/lib/rack/urlmap.rb:41:in `call'
 /usr/lib/ruby/gems/1.8/gems/rack-1.1.0/lib/rack/builder.rb:77:in `call'
 /usr/lib/ruby/gems/1.8/gems/rack-1.1.0/lib/rack/content_length.rb:13:in `call'
 /usr/lib/ruby/gems/1.8/gems/rack-1.1.0/lib/rack/handler/webrick.rb:48:in `service'
 /usr/lib/ruby/1.8/webrick/httpserver.rb:104:in `service'
 /usr/lib/ruby/1.8/webrick/httpserver.rb:65:in `run'
 /usr/lib/ruby/1.8/webrick/server.rb:173:in `start_thread'
 /usr/lib/ruby/1.8/webrick/server.rb:162:in `start'
 /usr/lib/ruby/1.8/webrick/server.rb:162:in `start_thread'
 /usr/lib/ruby/1.8/webrick/server.rb:95:in `start'
 /usr/lib/ruby/1.8/webrick/server.rb:92:in `each'
 /usr/lib/ruby/1.8/webrick/server.rb:92:in `start'
 /usr/lib/ruby/1.8/webrick/server.rb:23:in `start'
 /usr/lib/ruby/1.8/webrick/server.rb:82:in `start'
 /usr/share/foreman-proxy/lib/launcher.rb:134:in `launch'
 /usr/share/foreman-proxy/lib/launcher.rb:134:in `initialize'
 /usr/share/foreman-proxy/lib/launcher.rb:134:in `new'
 /usr/share/foreman-proxy/lib/launcher.rb:134:in `launch'
 /usr/share/foreman-proxy/bin/smart-proxy:6
NameError: uninitialized constant Proxy::TFTP::Pxegrub2
    /usr/share/foreman-proxy/modules/tftp/tftp_api.rb:18:in `const_get'
    /usr/share/foreman-proxy/modules/tftp/tftp_api.rb:18:in `instantiate'
    /usr/share/foreman-proxy/modules/tftp/tftp_api.rb:26:in `delete'
    /usr/share/foreman-proxy/modules/tftp/tftp_api.rb:53:in `DELETE /:variant/:mac'
    /usr/lib/ruby/gems/1.8/gems/sinatra-1.0/lib/sinatra/base.rb:863:in `call'
    /usr/lib/ruby/gems/1.8/gems/sinatra-1.0/lib/sinatra/base.rb:863:in `route'
    /usr/lib/ruby/gems/1.8/gems/sinatra-1.0/lib/sinatra/base.rb:521:in `instance_eval'
    /usr/lib/ruby/gems/1.8/gems/sinatra-1.0/lib/sinatra/base.rb:521:in `route_eval'
    /usr/lib/ruby/gems/1.8/gems/sinatra-1.0/lib/sinatra/base.rb:500:in `route!'
    /usr/lib/ruby/gems/1.8/gems/sinatra-1.0/lib/sinatra/base.rb:497:in `catch'
    /usr/lib/ruby/gems/1.8/gems/sinatra-1.0/lib/sinatra/base.rb:497:in `route!'
    /usr/lib/ruby/gems/1.8/gems/sinatra-1.0/lib/sinatra/base.rb:476:in `each'
    /usr/lib/ruby/gems/1.8/gems/sinatra-1.0/lib/sinatra/base.rb:476:in `route!'
    /usr/lib/ruby/gems/1.8/gems/sinatra-1.0/lib/sinatra/base.rb:601:in `dispatch!'
    /usr/lib/ruby/gems/1.8/gems/sinatra-1.0/lib/sinatra/base.rb:411:in `call!'
    /usr/lib/ruby/gems/1.8/gems/sinatra-1.0/lib/sinatra/base.rb:566:in `instance_eval'
    /usr/lib/ruby/gems/1.8/gems/sinatra-1.0/lib/sinatra/base.rb:566:in `invoke'
    /usr/lib/ruby/gems/1.8/gems/sinatra-1.0/lib/sinatra/base.rb:566:in `catch'
    /usr/lib/ruby/gems/1.8/gems/sinatra-1.0/lib/sinatra/base.rb:566:in `invoke'
    /usr/lib/ruby/gems/1.8/gems/sinatra-1.0/lib/sinatra/base.rb:411:in `call!'
    /usr/lib/ruby/gems/1.8/gems/sinatra-1.0/lib/sinatra/base.rb:399:in `call'
    /usr/lib/ruby/gems/1.8/gems/rack-1.1.0/lib/rack/commonlogger.rb:18:in `call'
    /usr/share/foreman-proxy/lib/proxy/log.rb:63:in `call'
    /usr/lib/ruby/gems/1.8/gems/rack-1.1.0/lib/rack/showexceptions.rb:24:in `call'
    /usr/lib/ruby/gems/1.8/gems/sinatra-1.0/lib/sinatra/base.rb:979:in `call'
    /usr/lib/ruby/gems/1.8/gems/sinatra-1.0/lib/sinatra/base.rb:1005:in `synchronize'
    /usr/lib/ruby/gems/1.8/gems/sinatra-1.0/lib/sinatra/base.rb:979:in `call'
    /usr/lib/ruby/gems/1.8/gems/rack-1.1.0/lib/rack/urlmap.rb:47:in `call'
    /usr/lib/ruby/gems/1.8/gems/rack-1.1.0/lib/rack/urlmap.rb:41:in `each'
    /usr/lib/ruby/gems/1.8/gems/rack-1.1.0/lib/rack/urlmap.rb:41:in `call'
    /usr/lib/ruby/gems/1.8/gems/rack-1.1.0/lib/rack/builder.rb:77:in `call'
    /usr/lib/ruby/gems/1.8/gems/rack-1.1.0/lib/rack/content_length.rb:13:in `call'
    /usr/lib/ruby/gems/1.8/gems/rack-1.1.0/lib/rack/handler/webrick.rb:48:in `service'
    /usr/lib/ruby/1.8/webrick/httpserver.rb:104:in `service'
    /usr/lib/ruby/1.8/webrick/httpserver.rb:65:in `run'
    /usr/lib/ruby/1.8/webrick/server.rb:173:in `start_thread'
    /usr/lib/ruby/1.8/webrick/server.rb:162:in `start'
    /usr/lib/ruby/1.8/webrick/server.rb:162:in `start_thread'
    /usr/lib/ruby/1.8/webrick/server.rb:95:in `start'
    /usr/lib/ruby/1.8/webrick/server.rb:92:in `each'
    /usr/lib/ruby/1.8/webrick/server.rb:92:in `start'
    /usr/lib/ruby/1.8/webrick/server.rb:23:in `start'
    /usr/lib/ruby/1.8/webrick/server.rb:82:in `start'
    /usr/share/foreman-proxy/lib/launcher.rb:134:in `launch'
    /usr/share/foreman-proxy/lib/launcher.rb:134:in `initialize'
    /usr/share/foreman-proxy/lib/launcher.rb:134:in `new'
    /usr/share/foreman-proxy/lib/launcher.rb:134:in `launch'
    /usr/share/foreman-proxy/bin/smart-proxy:6
foreman.example.com - - [21/Sep/2016:19:06:29 EDT] "DELETE /tftp/PXEGrub2/00:00:00:00:00 HTTP/1.1" 500 173598
- -> /tftp/PXEGrub2/00:00:00:00:00
Actions #8

Updated by Dominic Cleal about 8 years ago

  • Translation missing: en.field_release changed from 160 to 190
Actions #9

Updated by Lukas Zapletal about 8 years ago

  • Assignee set to Lukas Zapletal
Actions #10

Updated by Dominic Cleal about 8 years ago

  • Translation missing: en.field_release changed from 190 to 203
Actions #11

Updated by Dominic Cleal almost 8 years ago

  • Translation missing: en.field_release changed from 203 to 207
Actions #12

Updated by Lukas Zapletal almost 8 years ago

Dom, do I understand correctly that keeping the release flag set means you expect me to fix this for 1.13? I can prioritize if needed.

Actions #13

Updated by Dominic Cleal almost 8 years ago

Yes, because it was filed as a regression versus the previous release. Please don't set assignee if you're not actually working on it.

Actions #14

Updated by Lukas Zapletal almost 8 years ago

  • Assignee deleted (Lukas Zapletal)

Yeah sorry, I was hoping to pick it up from my queue soon, but I forgot I have on-call duty. No chance of pushing this through short term.

Actions #15

Updated by Dominic Cleal almost 8 years ago

  • Status changed from New to Rejected
  • Target version deleted (1.5.2)
  • Translation missing: en.field_release deleted (207)

Closing as this hasn't been fixed in time for the 1.13.x series, and it's of limited use after that - re-open if you are fixing it.

Actions #16

Updated by Julien Pivotto over 7 years ago

We have hit that bug, because ur proxies are on EL6, and we moved our foreman master to 1.14.3.

Applying the patch https://patch-diff.githubusercontent.com/raw/theforeman/smart-proxy/pull/443.patch to our proxies did the trick.

EDIT: Was not enough. We upgraded to 1.13.2 using katello-foreman rebuild for el6.

Actions #17

Updated by Simon Leinen over 7 years ago

We're also hitting that bug. Our Foreman has been upgraded to 1.13.4, but some of our proxies are on switches running Cumulus Linux 2.5.3, so we need Debian "wheezy" packages, which only support up to 1.11.

Does anyone make wheezy packages for foreman-proxy anymore? From Julien's comment today I gather that there are EL6 packages somewhere, which makes me hopeful that I don't have to build those packages myself...

We could fix this by upgrading our switches to Cumulus 3.2, which is based on Debian jessie, but that's a bit risky and time-consuming so I'd like to procrastinate that some more.

Actions #18

Updated by Simon Leinen over 7 years ago

Simon Leinen wrote:

We're also hitting that bug. Our Foreman has been upgraded to 1.13.4, but some of our proxies are on switches running Cumulus Linux 2.5.3, so we need Debian "wheezy" packages, which only support up to 1.11.

Does anyone make wheezy packages for foreman-proxy anymore? From Julien's comment today I gather that there are EL6 packages somewhere, which makes me hopeful that I don't have to build those packages myself...

We could fix this by upgrading our switches to Cumulus 3.2, which is based on Debian jessie, but that's a bit risky and time-consuming so I'd like to procrastinate that some more.

Looks like I was able to work around the problem by applying Lukas's patch (443.patch) on the switch. Thanks!

(Still, in general it would be nice to maintain backwards compatibility with old proxies where possible.)

Actions

Also available in: Atom PDF