Auto-fill previously configured jail fields in new UI
When trying to edit a jail which was created from the command line with the command
iocage create -n myjail ip4_addr="192.168.1.10" -r 11.2-RELEASE
the network fields ( ipv4 field ) isn't updated in the new UI when we try to update this jail and it manually requires us to input all of the ipv4 related fields. I believe this is related to how new UI parses middlewared jail.query. I have verified and jail.query returns accurate stats for ipv4 in this case but the format is different.
#1 Updated by Anonymous over 2 years ago
The reason it does that is because the field currently expects the data to be in the form "interface|<ipaddress>/subnet", if I create a jail like this for example the autofill works.
iocage create -n myjailz ip4_addr="vlan0|192.168.1.10/24" -r 11.2-RELEASE
How should the UI handle the subnet and interface portions if they are not available? (or could the middleware figure out what they are and give them to the ui?)
#2 Updated by Waqar Ahmed over 2 years ago
I have discussed this with Brandon and he and I think that it is best that we allow the end user to set null values for interface and subnet. So when they are null, UI only sends the IP address to Middlewared and if we have subnet and IP, so it sends IP/subnet and if interface is specified and subnet is not, so we send interface|ip to Middlewared. Kindly let me know if there is any confusion. Thank you
#6 Updated by Aaron St. John over 2 years ago
- File jails-edit.png jails-edit.png added
- Status changed from Ready for Testing to Passed Testing
- Needs QA changed from Yes to No
Tested on FreeNAS-11.2-MASTER-201809210904
1. Created the jail from the shell with the given command.
2. Went into the new UI and edited the jail.
3. Observed that the ipv4 field was populated with the address entered in the shell command. (see screenshot)