Skip to content

Commit

Permalink
tkt-75648: Correct when we update conf version and catch conf 14 (#173)
Browse files Browse the repository at this point in the history
* Correct when we update conf version and catch conf 14

This is required to migrate users to auto with vnet_default_interface now that the version has been upgraded.

FreeNAS Ticket: #75648

* Bump to a U2/U2.1 specific version
  • Loading branch information
Brandon Schneider authored Feb 27, 2019
1 parent e400148 commit a0856e0
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions iocage_lib/ioc_json.py
Original file line number Diff line number Diff line change
Expand Up @@ -872,7 +872,7 @@ def json_set_value(self, prop, _import=False, default=False):
@staticmethod
def json_get_version():
"""Sets the iocage configuration version."""
version = "14"
version = "14.1"

return version

Expand Down Expand Up @@ -1074,9 +1074,6 @@ def json_check_config(self, conf, default=False):
# Set all keys, even if it's the same value.
conf["vnet_interfaces"] = vnet_interfaces

# Set all keys, even if it's the same value.
conf["CONFIG_VERSION"] = self.json_get_version()

# Version 11 keys
try:
hostid_strict_check = conf["hostid_strict_check"]
Expand All @@ -1092,7 +1089,7 @@ def json_check_config(self, conf, default=False):
else:
# Catch all users migrating from old prop value of none, which
# meant auto
if current_conf_version in ('12', '13') \
if current_conf_version in ('12', '13', '14') \
and conf['vnet_default_interface'] == 'none':
conf['vnet_default_interface'] = 'auto'

Expand All @@ -1109,6 +1106,9 @@ def json_check_config(self, conf, default=False):
if not conf.get('allow_tun'):
conf['allow_tun'] = '0'

# Set all keys, even if it's the same value.
conf["CONFIG_VERSION"] = self.json_get_version()

if not default:
try:
if not renamed:
Expand Down

0 comments on commit a0856e0

Please sign in to comment.