Bug #42821
Auto-fill previously configured jail fields in new UI
Description
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.
History
#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
#3 Updated by Anonymous over 2 years ago
- Assignee changed from Anonymous to Lola Yang
#4
Updated by Lola Yang over 2 years ago
- Status changed from Unscreened to In Progress
#5
Updated by Lola Yang over 2 years ago
- Status changed from In Progress to Ready for Testing
- Needs Merging changed from Yes to No
#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
Test case:
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)
#7
Updated by Dru Lavigne over 2 years ago
- Subject changed from Auto-fill Jail fields on edit to Auto-fill previously configured jail fields in new UI
- Status changed from Passed Testing to Done
- Needs Doc changed from Yes to No