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

OVS bridges are not listed when creating a new host in Foreman #43

Closed
rogerfachini opened this issue Nov 2, 2018 · 2 comments · Fixed by #44
Closed

OVS bridges are not listed when creating a new host in Foreman #43

rogerfachini opened this issue Nov 2, 2018 · 2 comments · Fixed by #44
Labels
bug Something isn't working
Milestone

Comments

@rogerfachini
Copy link
Contributor

rogerfachini commented Nov 2, 2018

Describe the bug
When creating a new host, under the Nic section the dropdown menu for selecting a bridge is empty, even though the Proxmox node has an OpenVirtualSwitch (OVS) bridge in its network config.

To Reproduce
Steps to reproduce the behavior:

  1. Go through the process of creating a new host within Foreman, up until the interfaces tab is reached.
  2. Click on the Edit button for the first interface
  3. Scroll down to the Nic section
  4. The bridge section is empty, and does not list the OVS bridges available to the system.

Expected behavior
OVS bridges available to the node should be listed in the dropdown menu.

Screenshots

nic
The OVS bridge is not listed under Foreman.

proxnic
The OVS bridge is listed under Proxmox.

Desktop

  • OS: Windows 10
  • Browser Chrome
  • Version 70.0.3538.77

Foreman

  • OS: Ubuntu 18.04
  • foreman_fog_proxmox version: 0.5.3
  • foreman version: 1.19.0

Proxmox

  • Version: 5.2-10

Additional context
I read through the plugin's code, and this issue appears to be caused on line 89 of app/models/foreman_fog_proxmox/proxmox.rb. In this function, only interfaces of type bridge are returned, however OVS bridges have the type OVSBridge. According to Proxmox's API documentation there also appears to be a type of any_bridge, which I assume would return bridges of both types.

@rogerfachini
Copy link
Contributor Author

I just stumbled through the process of getting a dev environment set up (I've never done ruby development before) and I can confirm that changing the type to any_bridge does allow the OVS bridge to be present in the list. I'll do further testing to verify it works with normal bridges as well, and if that is successful I'll submit a pull request with the fix.

@tristanrobert tristanrobert added the enhancement New feature or request label Nov 5, 2018
@tristanrobert tristanrobert added this to the Not planned milestone Nov 5, 2018
@tristanrobert
Copy link
Collaborator

Hello, you are right and your contribution is welcome!

@tristanrobert tristanrobert modified the milestones: Not planned, 0.5.4 Nov 8, 2018
@tristanrobert tristanrobert added bug Something isn't working and removed enhancement New feature or request labels Nov 9, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants