Feature #49640

Merge upstream iocage into freenas/iocage

Added by Brandon Schneider almost 3 years ago. Updated over 2 years ago.

No priority
Brandon Schneider
Estimated time:
Reason for Closing:
Reason for Blocked:
Needs QA:
Needs Doc:
Needs Merging:
Needs Automation:
Support Suite Ticket:
Hardware Configuration:


Lots of divergence has occured this release, too long to mention individual tickets.

Related issues

Related to FreeNAS - Bug #60489: Sync upstream iocage changes as of 2018/11/28Done


#1 Updated by Brandon Schneider almost 3 years ago

  • Status changed from Unscreened to In Progress

#2 Updated by Brandon Schneider almost 3 years ago

  • Status changed from In Progress to Done
  • Needs QA changed from Yes to No
  • Needs Merging changed from Yes to No

Commits inside:

* We want unix acl's on iocage's datasets

FreeNAS Ticket: #38195

* DNS/SRV/Host fixes

- Parse out the host name, you can't query SRV records from an HTTP
- Don't die if SRV records aren't found, just log it
- pkg-repository(5) doesn't appear to enforce or require SRV records
- TrueOS pkg mirrors work fine without SRV records

* Use branches with plugins

This allows us to freeze the INDEX and do development without users being impacted. In addition safe guard against plugins requiring new iocage features.

FreeNAS Ticket: #39638

* Use branches with plugins

This allows us to freeze the INDEX and do development without users being impacted. In addition safe guard against plugins requiring new iocage features.

FreeNAS Ticket: #39638

* Travis

* Check host release for plugins

- Also commonize the method

FreeNAS Ticket: #39508

* Trrrrravis

* Strip subnet of IP4_ADDR when building plugin's portal URL (#586)

* Check release upon create (#589)

* Always Force unmount Datasets when renaming (#590)

* Remove exit_on_error

This is redundant, as it's already the case.

Related to FreeNAS TIcket: #36948

* Check DNS for plugins

- Return a more useful pkg error
- Show more information about the install process
- General formatting improvements
- Tear down jail if DHCP fails
- Tear down jail if VNET fails
- Tear down jail if pkg upgrade fails in plugin installs (required for mismatched ABI errors from previous pkg)

FreeNAS Ticket: #40106

* Flatten Python module names (#592)

* rename iocage.lib to iocage_lib

* rename iocage/cli to iocage_cli

* update to iocage_lib and iocage_cli

* move manpage files to top directory

* move icage/tests/ to top level directory

* add missing dev dependency mock

* gitignore .pytest_cache/

* remove deprecated iocage/ directory

* ./iocage script for local cli testing/development

* Refactor callback method, 

- Also add callback to many places in plugins
- Correctly pass callback into fetch method
- Return the command output message for plugins

FreeNAS Ticket: #36948

* Bump copyright year (better late then never?)

* Fix a couple typos

* Add a debug command

This should help with tickets that need to supply information

* Creating duplicate plugins now name them plugin_NUM

- Fix upgrading for plugins
- Fix jail creation to be basejails for plugins (They were before, but not actually removing any data)

* We want file, not http when specified

This fixes some logic.

Closes #597

* Be less nice for plugin pkg's clogging up stdout

FreeNAS TIcket: #42018

* Fix Makefile names

* Make some plugin exec changes to hopefully address FreeNAS #42018

* Prevent CPU from spinning on plugin tasks

* Fix callback usage in lib/iocage

This was incorrectly calling None on API usage.

FreeNAS Ticket: #42359

* Read output one more time after is finished (#601)

* Change devfs rule generation

- DHCP is much more flexible now
- Plugins are able to have devfs rules specified in their manifests
- Plugin manifests are kept around for devfs rules now, possibly more fun later

FreeNAS Ticket: #42593

* Fix a couple issues with devfs generation

* Only show one interface for the plugin IP

Most plugins that have more then one IP use VNET, so this assumes the first interface to be the default one.

FreeNAS Ticket: #42641

* Update py-libzfs

Closes issues #602, #505, #153

* Fix usage of git@ repos

This allows private repos to be used as plugins.

FreeNAS Ticket: #42653

* fixes BUG, return was one level high (#603)

* Merge pull request #17 from freenas/ticket-41694

Delete jails in case of plugin install failure

* Initialize reference to repo after succesful porcelain.pull() (#606)

* adds thickjail feature to man (#604)

* Fix debug not being as useful as it should be for non-running jails

- Also append .txt to the filenames.
- Drop jexec for most of the debug to instead opt for grabbing from the filesystem directly

FreeNAS Ticket: #45563

* Correctly create aliases for shared IP jails that don't specify iface

It seems jail(8) behavior may have changed, and this is now required for jail to create the aliases. We do a best effort attempt at using the default interface if the user doesn't supply one.

The idea is that if they didn't supply one, they may have already set the alias up themselves, so iocage will do nothing in this case.

FreeNAS Ticket: #46245

* Fixed a bug in fstab

This commit fixes a bug which caused iocage to raise an exception incase an edit/removal was required by index only and destination field was passed on as null in fstab.
Ticket: #45783

* Remove duplicate variable

This would be fatal possibly.

* Let's use the right variable

Possibly shadowing before anyways, this is better.

* Updates to iocage.8: (#612)

- Update entry for ip4_addr to remove text about entering DEFAULT.
- Fix up entry for vnet_interfaces.
- Manual check of iocage.8: no issues.

* Silence!

* Improved error handling

This commit adds a try catch block to a snippet where while removing a file may raise an exception as it might not exist in the first place.
Ticket: #45805

* Potential Bug fix for jail creation

This commit fixes a potential bug which possible arose due to a race condition when the system was unable to find a newly created file. The original referenced issue couldn't be reproduced but necessary steps have been taken to avoid this behavior in this commit.
Ticket: #43119

* Test variable before splitting again, honor IP only for plugin install

This would be fatal if they didn't supply an interface, in addition we don't care about the interface here, so these block's aren't useful.

FreeNAS Ticket: #41670

* Flag debug as rootcmd (#613)

* Fix branch name for plugin repo (#614)

* Don't use ifconfig -f inet:cidr to extract IP/Mask... (#515)

* Don't use ifconfig -f inet:cidr to extract IP/Mask, this is only supported by FreeBSD 11 and newer

* efficiencyfied a redundant operation, reordered for readability, and added comments

* Moved the [2] up to original assignment of addr_split

* Fix devfs rules that have a bracket

add path 'ulpt[0-9]*' mode 666 and such.

FreeNAS Ticket: #46920

* Use a specific exception for pool activation issues

FreeNAS Ticket: #45760

* Merge pull request #37 from freenas/ticket-47085

Bug fix for MAC Addresses

* Be a better env...izen. Less pollution!

FreeNAS Ticket: #46491

* @william-gr noted we should probably have a couple nice defaults

env shouldn't be *so* empty.

* Fix wrong property in doc

* Add "allow_mlock" as a new property (#617)

Introduced in FreeBSD 12.0. Enables running services that
require mlock() in a jail (e.g. MongoDB)

* Do not set allow.mlock when userland < 12.0 (#619)

* Bug fix for installing packages (#607)

This commit fixes a bug which caused an exception when trying to install plugins or packages with no packages specified to be installed.
Ticket: #44735

* Retry on pkg and pkg install failures

Currently we just assume it succeeds or fails, when it could be a slight transient issue.

FreeNAS Ticket: #44834

* What! No sys.exit.

Raise instead.

FreeNAS Ticket: 44834

* Remove debug, add better messages.

* It's not even Monday!

* Tighten up reusage of code for retry

This is better, suggested by William.

* Let's add the string version of the exception too

Why not! Another idea of @william-gr

* Yeah, once is enough for the pkg error

* Add rtsold support

This works much like dhcp, just easier if you have an ipv6 network. Just set the ip6_addr to 'vnet0|accept_rtadv'

FreeNAS Ticket: #40468

* keep_jail_on_failure should be a flag

Previously it required a boolean.

FreeNAS Ticket: #48416

* Fixed iocage list multiple IP4 addresses (#621)

* fixed iocage list: show multiple IP4 addresses correctly

* Fixed long lines in

*  Fixed bug: Jail fails to start when depends jail is already running (#608) (#622)

* Fixed bug: Jail fails to start when depends jail is already running (#608)

* Fixed bug #608: If dependent jail does not start then parent jail is not started
* Added JailRunning exception and use it when dependent jails already started
* Added force_raise flag to default callback() function to force raising exception

* Fix exec_pre|post stop

Previous behavior was borked. It now works.

Closes #611
FreeNAS TIcket: #48449

* Make default interface for vnet customizable (#623)

This commit adds support for customizing the default interface for vnet which should be attached on the relevant bridge. It updates the properties of the jails by adding a new property which is used when starting vnet jails.
Ticket: #40484

* Fixed bug: setting ZFS properties via 'iocage set' raised exception (#624)

* Allow unhiding tun devices with a custom prop "allow_tun" 

This can be either 0 or 1. This change will also make devfs rulesets individual for each jail that sets dhcp or allow_tun. But it also means you can combine them now.

FreeNAS Ticket: #40872

* Catch by @william-gr

* exec_clean now affects exec as expected.

Upstream required -l to be passed to jexec to clean the environment. Otherwise it was just for the jail initialization.

Closes: #610
FreeNAS Ticket: #48581

* Fix Traceback when pkg-static install fails (#627)

* Decomplicate things and just use pool/iocage as mount

Previous behavior could cause us headaches if exporting and importing other pools. In addition it's heavily overengineered.

FreeNAS Ticket: #41268

* We want the jails fstab in debug

FreeNAS Ticket: #49420

* Improve support for dots in jailname (#629)

* Improve support for dots in jailname

* Improve support for dots in jailname (req. chngs)

#3 Updated by Dru Lavigne over 2 years ago

  • Target version changed from 11.3 to 11.3-BETA1

#4 Updated by Dru Lavigne over 2 years ago

  • Related to Bug #60489: Sync upstream iocage changes as of 2018/11/28 added

#5 Updated by Dru Lavigne over 2 years ago

  • Target version changed from 11.3-BETA1 to Master - FreeNAS Nightlies
  • Needs Doc changed from Yes to No

Also available in: Atom PDF