Project

General

Profile

Feature #47642

Add vnet_default_interface field to Jails Advanced menu in new UI

Added by Waqar Ahmed almost 2 years ago. Updated over 1 year ago.

Status:
Done
Priority:
No priority
Assignee:
Lola Yang
Category:
GUI (new)
Target version:
Estimated time:
Severity:
New
Reason for Closing:
Reason for Blocked:
Waiting for feedback
Needs QA:
No
Needs Doc:
No
Needs Merging:
No
Needs Automation:
No
Support Suite Ticket:
n/a
Hardware Configuration:

Description

A new property has been added to iocage and it should be made available in new UI for the end users to use.
The property's name is

vnet_default_interface

An api call in the following way should be made to middlewared to create a jail
midclt call jail.create '{"release": "11.2-RELEASE", "uuid": "m", "props": ["vnet=on", "dhcp=on", "bpf=yes", "vnet_default_interface=lagg0"]}'

The options for this new property are the interfaces we have in the system.

Risk
We risk breaking the creation of jails or the networking in jails.

Acceptance Criteria
After a jail has been created with this property configured, the bridge interface needs to be checked and ensured that the newly created jail's interface shows up on that bridge with the selected interface set in the property's value.


Related issues

Related to FreeNAS - Bug #40484: Add ability to customize default vnet interface to middlewareDone

History

#1 Updated by Dru Lavigne almost 2 years ago

  • Assignee changed from Erin Clark to Lola Yang

#2 Updated by Dru Lavigne almost 2 years ago

  • Related to Bug #40484: Add ability to customize default vnet interface to middleware added

#3 Updated by Lola Yang almost 2 years ago

  • Status changed from Unscreened to In Progress

#4 Updated by Dru Lavigne almost 2 years ago

  • Subject changed from New Field added for Jails Advanced Menu to Add vnet_default_interface field to Jails Advanced menu in new UI
  • Status changed from In Progress to Ready for Testing
  • Needs Merging changed from Yes to No

#6 Updated by Jeff Ervin almost 2 years ago

32936

Test Passed FreeNAS-11.2-MASTER-201810010839

#7 Updated by Aaron St. John almost 2 years ago

  • Status changed from Passed Testing to Blocked
  • Assignee changed from Lola Yang to Waqar Ahmed
  • Reason for Blocked set to Waiting for feedback
  • Needs QA changed from No to Yes

Waqar: In my first test of this bug it didn't seem to work. However, could you give a me a list of steps to take to test this properly? One question I have in particular is "Do I have to create a bridge manually, or does iocage automatically create one for the vnet? Or does it use an existing one?".

My test case:
1. Create a new jail with DCHP, VNET, Berkley pack filter enabled.
2. Select an interface from the new field "vnet_default_interface".
3. Start the jail.
4. Run ifconfig on the host system observe the entries under bridge0. (because the interface of the jail is "vnet0:bridge0".)
5. I didn't really know how to tell that a new vnet_defualt_interface had been selected.

#8 Updated by Waqar Ahmed almost 2 years ago

  • Assignee changed from Waqar Ahmed to Aaron St. John

So how this should be tested is that a system should have at least 2 interfaces by default. Say i1 and i2. First determine which is the default interface, that can be done via python or netstat -nr,

netifaces.gateways()["default"][netifaces.AF_INET]

Let's assume that in our case it's i1. So if the vnet_default_interface field isn't set, iocage will automatically default it to i1. This field gives the user flexibility to define which interface he would like to use for bridging with the vm.
Before creating a jail, it should be ensured that we don't have any running jails and we don't have any bridge interface ( this can be skipped but adding for simplicity ).
Moving on, we should select i2 now in the jails creation menu. And then we can start our newly created jail. When this jail starts, we should have a bridge interface created automatically with iocage which has members i2 and the jail vnet interface.

This will confirm that we wanted i2 as the default vnet interface on the bridge, and we have it now once the jail is running. Please if there are any other queries, kindly let me know. Thank you

#9 Updated by Dru Lavigne almost 2 years ago

  • Status changed from Blocked to Ready for Testing
  • Assignee changed from Aaron St. John to Lola Yang

#10 Updated by Jeff Ervin over 1 year ago

35046

Test Passed FreeNAS-11.2-INTERNAL25

#11 Updated by Timothy Moore II over 1 year ago

  • Needs Doc changed from Yes to No

Docs PR: [angulargui] https://github.com/freenas/freenas-docs/pull/403, no [master] PR necessary.
freenas/webui PRs WIP for UI help text.

#12 Updated by Dru Lavigne over 1 year ago

  • Status changed from Passed Testing to Done

#13 Updated by Timothy Moore II over 1 year ago

webui Help Text PRs for 11.2-RELEASE: [master] https://github.com/freenas/webui/pull/1360, [freenas/11.2-stable] https://github.com/freenas/webui/pull/1361

Also available in: Atom PDF