Project

General

Profile

Bug #16202

GUI: Edit Jail dialog is not working correct, when DHCP is ticked in Jails -> Configuration

Added by Matt Kessler about 3 years ago. Updated almost 3 years ago.

Status:
Closed: Not To Be Fixed
Priority:
Important
Assignee:
William Grzybowski
Category:
GUI (new)
Target version:
Severity:
New
Reason for Closing:
Reason for Blocked:
Needs QA:
Yes
Needs Doc:
Yes
Needs Merging:
Yes
Needs Automation:
No
Support Suite Ticket:
n/a
Hardware Configuration:
ChangeLog Required:
No

Description

When DHCP is ticked in Jails -> Configuration the Edit Jail dialog will not load the proper settings from jails with static IPs.
This has caused me some problems ever since going 9.3 to 9.10 as far as I remember

Steps
  1. unticked DHCP option in Jails -> Configuration
  2. create a TestJail with static IP
  3. go to View Jails, select the TestJail click the Edit Jail at the bottom
  4. now tick DHCP option in Jails -> Configuration and save
  5. go to View Jails, select the TestJail click the Edit Jail at the bottom

It now will treat the TestJail as it was setup using DHCP

Alternative Steps
If you have some Jails with static IPs you can try this too, but be careful!
  1. tick DHCP option in Jails -> Configuration and save
  2. go to View Jails, select yourStaticIpJail and click the Edit Jail at the bottom

If you like, place my uploaded freeadmin.js in /usr/local/www/freenasUI/static/lib/js/
(make sure to load this version then and not a cached version)
I used this script when taking the screen shots I uploaded.

Starting @ ~line 800:

    jail_ipv4_dhcp_toggle = function() {
        // ### MaKe: (05.07.2016)
        var ipv4_dhcp = registry.byId("id_jail_ipv4_dhcp");   
        // If you have set DHCP as default in Jails -> Configuration!
        // This will always return "on" and the ELSE part will never be executed!     
        // Thus I can no longer switch from Static to DHCP or vice versa, when editing the Jail.          
        // IF/ELSE works fine, if DHCP is unticked in Jails -> Configuration!

        var ipv6_autoconf = registry.byId("id_jail_ipv6_autoconf");
        var ipv4 = registry.byId("id_jail_ipv4");
        var ipv4_alias = registry.byId("id_jail_alias_ipv4");
        var ipv4_netmask = registry.byId("id_jail_ipv4_netmask");
        var bridge_ipv4 = registry.byId("id_jail_bridge_ipv4");
        var bridge_ipv4_alias = registry.byId("id_jail_alias_bridge_ipv4");
        var bridge_ipv4_netmask = registry.byId("id_jail_bridge_ipv4_netmask");
        var defaultrouter_ipv4 = registry.byId("id_jail_defaultrouter_ipv4");
        var vnet = registry.byId("id_jail_vnet");
        var nat = registry.byId("id_jail_nat");

        var jail_ipv4_dhcp = ipv4_dhcp.get("value");
        var jail_ipv6_autoconf = ipv6_autoconf.get("value");

        if (jail_ipv4_dhcp == "on") {
            ipv4.set("value", "DHCP");
            // ### MaKe: (05.07.2016) testing if statement
            alert('IF part... Jails -> Configuration, Option IPv4 DHCP: ' +jail_ipv4_dhcp);

            vnet.set("checked", true);

            ipv4.set("readOnly", true);
            ipv4_netmask.set("disabled", true);
            bridge_ipv4.set("disabled", true);
            bridge_ipv4_netmask.set("disabled", true);

            if (ipv4_alias) {
                ipv4_alias.set("disabled", true);
            }
            if (bridge_ipv4_alias) {
                bridge_ipv4_alias.set("disabled", true);
            }

            defaultrouter_ipv4.set("disabled", true);
            vnet.set("readOnly", true);
            nat.set("readOnly", true);

        } else {
            // ### MaKe: (05.07.2016) testing if statement
            alert('ELSE part… Jails -> Configuration, Option IPv4 DHCP: ' +jail_ipv4_dhcp);

            ipv4.set("readOnly", false);
            ipv4_netmask.set("disabled", false);
            bridge_ipv4.set("disabled", false);
            bridge_ipv4_netmask.set("disabled", false);

            if (ipv4_alias) {
                ipv4_alias.set("disabled", false);
            }
            if (bridge_ipv4_alias) {
                bridge_ipv4_alias.set("disabled", false);
            }

            defaultrouter_ipv4.set("disabled", false);

            if (!jail_ipv6_autoconf) {
                vnet.set("readOnly", false);
                nat.set("readOnly", false);
            }
        }
    }

freeadmin.js (86.6 KB) freeadmin.js Matt Kessler, 07/05/2016 11:14 AM
uiDhcpSettingsInJails_bug.png (62.3 KB) uiDhcpSettingsInJails_bug.png Matt Kessler, 07/05/2016 11:14 AM
uiDhcpSettingsInJails_expected.png (51.7 KB) uiDhcpSettingsInJails_expected.png Matt Kessler, 07/05/2016 11:14 AM
6500
6501

Related issues

Related to FreeNAS - Bug #15817: Plugins not obtaining an IP from DHCPClosed: Not To Be Fixed2016-06-06
Is duplicate of FreeNAS - Bug #15984: Bug in GUI or Jails-DHCP problemClosed: Not To Be Fixed2016-06-06
Copied to FreeNAS - Bug #16310: GUI: Edit Jail dialog is not working correct, when DHCP is ticked in Jails -> ConfigurationResolved2016-07-05

Associated revisions

Revision 296a220d (diff)
Added by John Hixson about 3 years ago

Don't set dhcp as on if using static IP addresses

Ticket: #16202

Revision 94348a6f (diff)
Added by John Hixson about 3 years ago

Don't set dhcp as on if using static IP addresses

Ticket: #16202
(cherry picked from commit 296a220df1473387548a52420f62dbf13c1fd346)

Revision 1be0b3cb (diff)
Added by John Hixson about 3 years ago

Don't set dhcp as on if using static IP addresses

Ticket: #16202
(cherry picked from commit 296a220df1473387548a52420f62dbf13c1fd346)

Revision 5e54d1f2 (diff)
Added by John Hixson about 3 years ago

Don't set dhcp as on if using static IP addresses

Ticket: #16202
(cherry picked from commit 296a220df1473387548a52420f62dbf13c1fd346)

Revision 47ef7c38 (diff)
Added by John Hixson about 3 years ago

Don't set dhcp as on if using static IP addresses

Ticket: #16202
(cherry picked from commit 296a220df1473387548a52420f62dbf13c1fd346)

History

#1 Updated by John Hixson about 3 years ago

  • Status changed from Unscreened to Investigation
  • Target version set to Maintainance SU

I can reproduce and confirm this bug. More to come.

#2 Updated by John Hixson about 3 years ago

  • Target version changed from Maintainance SU to 9.10.1

#3 Updated by John Hixson about 3 years ago

  • Copied to Bug #16310: GUI: Edit Jail dialog is not working correct, when DHCP is ticked in Jails -> Configuration added

#4 Updated by John Hixson about 3 years ago

  • Status changed from Investigation to Needs Developer Review

Fix committed to master

#5 Updated by Vaibhav Chauhan about 3 years ago

  • Assignee changed from John Hixson to William Grzybowski

review requested.

#6 Updated by William Grzybowski about 3 years ago

  • Status changed from Needs Developer Review to Reviewed
  • Assignee changed from William Grzybowski to John Hixson

#7 Updated by John Hixson about 3 years ago

  • Assignee changed from John Hixson to Vaibhav Chauhan

#8 Updated by Vaibhav Chauhan about 3 years ago

  • Status changed from Reviewed to Ready For Release
  • Priority changed from No priority to Important

Merged FIX-16202 and FIX-TN-16202, to 9.10-STABLE and TN-9.10-STABLE.

#9 Updated by Vaibhav Chauhan about 3 years ago

  • Status changed from Ready For Release to Resolved

#10 Updated by Vaibhav Chauhan almost 3 years ago

  • Related to Bug #15817: Plugins not obtaining an IP from DHCP added

#11 Updated by Vaibhav Chauhan almost 3 years ago

  • Status changed from Resolved to Unscreened

reopening this ticket as this problem still exists.

#12 Updated by Vaibhav Chauhan almost 3 years ago

  • Assignee changed from Vaibhav Chauhan to John Hixson

#13 Updated by Vaibhav Chauhan almost 3 years ago

  • Is duplicate of Bug #15984: Bug in GUI or Jails-DHCP problem added

#14 Updated by John Hixson almost 3 years ago

  • Status changed from Unscreened to Screened

#15 Updated by Dru Lavigne almost 3 years ago

  • Target version changed from 9.10.1 to 9.10.1-U2

#16 Avatar?id=14398&size=24x24 Updated by Kris Moore almost 3 years ago

  • Target version changed from 9.10.1-U2 to 9.10.1-U3

#17 Avatar?id=14398&size=24x24 Updated by Kris Moore almost 3 years ago

  • Assignee changed from John Hixson to William Grzybowski

William, can you review this code since it looks like a UI bug?

#18 Updated by William Grzybowski almost 3 years ago

  • Status changed from Screened to 15

Vaibhav, I cannot reproduce the issue. What was your procedure to test it?

#19 Updated by Dru Lavigne almost 3 years ago

Is there anything to fix here for U3?

#20 Updated by William Grzybowski almost 3 years ago

Thats what I asked...

#21 Avatar?id=14398&size=24x24 Updated by Kris Moore almost 3 years ago

  • Target version changed from 9.10.1-U3 to 9.10.2

#22 Avatar?id=14398&size=24x24 Updated by Kris Moore almost 3 years ago

  • Status changed from 15 to Closed: Not To Be Fixed

Closing this now. We are working hard a new jail implementation for 9.10.3 (hopefully) which will change a lot of this functionality.

Also available in: Atom PDF