iocage jails fails to start with DHCP, but is it good to use otherwise?

saurav

Contributor
Joined
Jul 29, 2012
Messages
139
I've updated a jail that uses DHCP from 9.3 days using migrate_warden.py, and the upgrade seemed to have gone fine. But I cannot start it:

Code:
$ iocage start cloud
* Starting cloud
  + Started OK
  + Configuring VNET OK
ifconfig: illegal option -- f
usage: ifconfig [-L] [-C] [-g groupname] interface address_family [address [dest_address]]
                [parameters]
       ifconfig interface create
       ifconfig -a [-L] [-C] [-g groupname] [-d] [-m] [-u] [-v] [address_family]
       ifconfig -l [-d] [-u] [address_family]
       ifconfig [-L] [-C] [-g groupname] [-d] [-m] [-u] [-v]
Traceback (most recent call last):
  File "/usr/local/bin/iocage", line 10, in <module>
    sys.exit(cli())
  File "/usr/local/lib/python3.6/site-packages/click/core.py", line 722, in __call__
    return self.main(*args, **kwargs)
  File "/usr/local/lib/python3.6/site-packages/click/core.py", line 697, in main
    rv = self.invoke(ctx)
  File "/usr/local/lib/python3.6/site-packages/click/core.py", line 1066, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/usr/local/lib/python3.6/site-packages/click/core.py", line 895, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/usr/local/lib/python3.6/site-packages/click/core.py", line 535, in invoke
    return callback(*args, **kwargs)
  File "/usr/local/lib/python3.6/site-packages/iocage_cli/start.py", line 54, in cli
    ioc.IOCage(jail=jail, rc=rc).start()
  File "/usr/local/lib/python3.6/site-packages/iocage_lib/iocage.py", line 1641, in start
    callback=self.callback
  File "/usr/local/lib/python3.6/site-packages/iocage_lib/ioc_start.py", line 67, in __init__
    self.__start_jail__()
  File "/usr/local/lib/python3.6/site-packages/iocage_lib/ioc_start.py", line 467, in __start_jail__
    "message": "  + Acquiring DHCP address: FAILED,"
UnboundLocalError: local variable 'addr' referenced before assignment


This is a known issue I believe: Upgraded jails from such old versions that use DHCP don't start. These old jails are not supported, as that linked ticket shows. That's fine. I can configure the networking without using DHCP, and the jail starts. But I have two questions:

1. Is there anything else wrong with such jails that fail to use DHCP, that I should abandon them and create and configure a new one?

2. Are there any guides to fixing DHCP in iocage jails by hand?

Thanks,
Saurav.
 

Samuel Tai

Never underestimate your own stupidity
Moderator
Joined
Apr 24, 2020
Messages
5,399
Is there anything else wrong with such jails that fail to use DHCP, that I should abandon them and create and configure a new one?

Myself, I didn't bother with migrating jails. I documented the settings of each jail, and then recreated them. This also allowed me to rebuild them based on 11.3-RELEASE, instead of upgrading from an 11.2-RELEASE.
 

saurav

Contributor
Joined
Jul 29, 2012
Messages
139
Just an update: I updated the jail to FreeBSD 11:
Code:
sudo iocage upgrade cloud -r 11.0-RELEASE


Now the jail starts fine with DHCP.

The release shows as 11.0-RELEASE-p16 in the GUI, though.
 
Top