Project

General

Profile

Actions

Feature #8146

closed

Generate bootdisk to use a capsule

Added by Lukas Zapletal over 9 years ago. Updated over 8 years ago.

Status:
Closed
Priority:
Normal
Difficulty:
Triaged:
Fixed in Releases:
Found in Releases:

Description

Taken from our Etherpad on Brans request, I was unable to find what is this all about. Bryan can you add more details?


Related issues 1 (1 open0 closed)

Blocks Katello - Tracker #8172: Isolate Client Communication through a CapsuleNew

Actions
Actions #1

Updated by Dominic Cleal over 9 years ago

  • Status changed from New to Need more information

Sounds meaningless to me.

Actions #2

Updated by Eric Helms over 9 years ago

  • Blocks Tracker #8172: Isolate Client Communication through a Capsule added
Actions #3

Updated by Lukas Zapletal over 9 years ago

  • Status changed from Need more information to New

generating a bootdisk such that all the communication goes through a particular Capsule and is proxied to the main server where needed.

Actions #4

Updated by Greg Sutcliffe over 9 years ago

  • Status changed from New to Closed
  • Assignee set to Greg Sutcliffe
  • Target version set to 1.7.2

This is automatically covered by the templates feature in the smart proxy. I set up an isolated VM with no access to the Foreman server, and a local Template and TFTP proxy. As expected, since the Bootdisk templates call foreman_url(), the proxy's address is substituted for the foreman url.

I correctly saw requests for the iPXE template proxied to Foreman via the Proxy for the Host Image:

Proxy:
192.168.100.100 - - [05/Dec/2014:17:22:09 GMT] "GET /unattended/iPXE?token=48309204-e537-4346-ba82-09cb44871c08&mac=52%3A54%3A00%3Aea%3A04%3A67 HTTP/1.1" 200 737
Foreman:
Started GET "/unattended/iPXE?token=48309204-e537-4346-ba82-09cb44871c08&url=http%3A%2F%2F192.168.100.1%3A8000" for 172.20.10.149 at 2014-12-05 17:22:09 +0000

Likewise, when testing the Host Full Image, we see a proxied request for the provision template:

Proxy
192.168.100.193 - - [05/Dec/2014:17:23:30 GMT] "GET /unattended/provision?token=48309204-e537-4346-ba82-09cb44871c08 HTTP/1.1" 200 3558
Foreman
Started GET "/unattended/provision?token=48309204-e537-4346-ba82-09cb44871c08&url=http%3A%2F%2F192.168.100.1%3A8000" for 172.20.10.149 at 2014-12-05 17:23:30 +0000

I didn't test the Generic image due to running out of time, but I see no reason for it to behave differently - they all rely on foreman_url, and should be correctly substituted.

Actions #5

Updated by Justin Sherrill about 9 years ago

Hey Greg,

I'm a tad confused how this would work with the generic boot disk with no changes. When you say they rely on 'foreman_url' you mean the setting foreman_url?

If so, I'm not sure I would consider this fully fleshed out if the workflow to generate the bootdisk for the smart-proxy/capsule is:

1. Change foreman_url to be that of the proxy
2. Download the boot disk
3. Change foreman_url back to that of the foreman server

Its a workaround for sure, but it doesn't seem fully finished out to me.

-Justin

Actions #6

Updated by Justin Sherrill about 9 years ago

  • Status changed from Closed to New
  • Target version deleted (1.7.2)

Tested with a host-specific bootdisk and a generic bootdisk.

On the host-specific bootdisk i do see it referencing the smart proxy:

chain http://smart-proxy.example.com:8000/unattended/iPXE?token=88cf7a69-1456-4b48-b7d0-0ac970b9d8e6&mac=26:11:b6:1f:ee:c5

(which is the correct smart proxy name). On the generic bootdisk however i just see:

:net0
isset ${net0/mac} || goto no_nic
echo net0 is a ${net0/chip} with MAC ${net0/mac}
dhcp net0 || goto net1
chain http://abed.example.com/unattended/iPXE?&mac=${net0/mac} || goto net1
exit 0

which is referencing the main foreman server. In fact the url to fetch the generic bootdisK: /bootdisk/disks/generic does not contain any host-specific information so I don't think there is anyway for it to know what tftp or template proxy to use when generating the generic bootdisk.

Reopening

Actions #7

Updated by Justin Sherrill about 9 years ago

  • Bugzilla link set to 1193933
Actions #8

Updated by Greg Sutcliffe about 9 years ago

Justin - I agree, a completely generic image can't possibly know about a specific proxy. Open to suggestions :)

Actions #9

Updated by Bryan Kearney about 9 years ago

Is there a way to generate a bootdisk per capsule/smart proxy?

Actions #10

Updated by Stephen Benjamin about 9 years ago

No, but that would solve the problem. I think maybe you could add a menu option to each Smart Proxy like "Download Generic Image".

Actions #11

Updated by The Foreman Bot about 9 years ago

  • Status changed from New to Ready For Testing
  • Pull request https://github.com/theforeman/foreman_bootdisk/pull/8 added
  • Pull request deleted ()
Actions #12

Updated by Bryan Kearney about 9 years ago

  • Assignee changed from Greg Sutcliffe to Lukas Zapletal
Actions #13

Updated by Lukas Zapletal over 8 years ago

  • Pull request https://github.com/theforeman/foreman_bootdisk/pull/9 added
  • Pull request deleted (https://github.com/theforeman/foreman_bootdisk/pull/8)
Actions #14

Updated by Anonymous over 8 years ago

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

Also available in: Atom PDF