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

allow host interfaces management #757

Closed
evgeni opened this issue Mar 26, 2020 · 3 comments · Fixed by #979
Closed

allow host interfaces management #757

evgeni opened this issue Mar 26, 2020 · 3 comments · Fixed by #979

Comments

@evgeni
Copy link
Member

evgeni commented Mar 26, 2020

SUMMARY

Today, foreman_host can only manage the primary interface of a host by specifying mac, ip etc.
However, Foreman can manage ALL the interfaces

There is a interfaces resource: https://theforeman.org/api/1.24/apidoc/v2/interfaces.html

And you can also manage them directly via the hosts API: https://theforeman.org/api/1.24/apidoc/v2/hosts/create.html

I don't mind which way we implement it, but it would be nice to have that feature :)

ISSUE TYPE
  • Feature Idea
@Fobhep
Copy link
Contributor

Fobhep commented Apr 15, 2020

@evgeni Maybe you can add the following to your original post:

Parameters for interface API:

  • host_id
  • location_id
  • organization_id
  • interface[mac]
  • interface[ip]
  • interface[ip6]
  • interface[type]
  • interface[name]
  • interface[subnet_id]
  • interface[subnet6_id]
  • interface[domain_id]
  • interface[identifier]
  • interface[managed]
  • interface[primary]
  • interface[provision]
  • interface[username]
  • interface[password]
  • interface[provider]
  • interface[virtual]
  • interface[tag]
  • interface[mtu]
  • interface[attached_to]
  • interface[mode]
  • interface[attached_devices]
  • interface[bond_options]
  • interface[compute_attributes]

And further the points from you and @bagasse regarding compute resource

Host is booted at creation time and depending on which way you provision your host, you have at least these three ways:
The host try to reach dhcp server to do a network boot (tftp/ipxe)
Foreman try to reach host to execute finish script (ssh)
Cloud init script may try to get external resources / configure network

Some compute resource in foreman don't support updates after host creation.

@mdellweg
Copy link
Member

As i remember it, the foreman_host module is not starting the host after creation. That means you need to call foreman_host_power as a separate task, which gives you enough time to configure every interface needed before the installation process starts.
Not saying that it would be a bad idea to make interfaces available through the host module, but that it is not urgent.

@evgeni
Copy link
Member Author

evgeni commented Apr 17, 2020

@Fobhep I think it's fine in your post, so you can edit it as you go ;)

@mdellweg Foreman will auto-start the host after it got created, unless you tell it not to.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants