Re: iocage on current seems broken / ascii errors with iocage

From: Alan Somers <asomers_at_freebsd.org>
Date: Sun, 25 Feb 2018 16:15:58 -0700
On Sun, Feb 25, 2018 at 3:50 PM, Eitan Adler <lists_at_eitanadler.com> wrote:

> ∴sudo iocage activate zroot
> ∴sudo iocage list
> +-----+------+-------+---------+-----+
> | JID | NAME | STATE | RELEASE | IP4 |
> +=====+======+=======+=========+=====+
> +-----+------+-------+---------+-----+
> ∴sudo iocage create -r 11.1-RELEASE
> Fetching: 11.1-RELEASE
>
> Downloading : MANIFEST [####################] 100% 0Mbit/s
> Downloading : base.txz [####################] 100%  26.51Mbit/s
> Downloading : lib32.txz [####################] 100%  26.02Mbit/s
> Downloading : doc.txz [####################] 100%  26.12Mbit/s
> Downloading : src.txz [####################] 100%  26.4Mbit/ss
> ...
> 709c103b-1f43-4c3b-a5db-100d19822ccb successfully created!
> ∴sudo iocage list
> ∴zfs list
>                   (git:global)-[master]
> NAME                                                           USED
> AVAIL  REFER  MOUNTPOINT
> ...
> zroot/ROOT                                                    2.98G
> 802G    88K  none
> zroot/ROOT/default                                            2.98G
> 802G  2.98G  /
> ...
> zroot/iocage                                                  1.19G
> 802G   100K  /iocage
> zroot/iocage/download                                          260M
> 802G    88K  /iocage/download
> zroot/iocage/download/11.1-RELEASE                             260M
> 802G   260M  /iocage/download/11.1-RELEASE
> zroot/iocage/images                                             88K
> 802G    88K  /iocage/images
> zroot/iocage/jails                                             368K
> 802G    88K  /iocage/jails
> zroot/iocage/jails/709c103b-1f43-4c3b-a5db-100d19822ccb        280K
> 802G    92K  /iocage/jails/709c103b-1f43-4c3b-a5db-100d19822ccb
> zroot/iocage/jails/709c103b-1f43-4c3b-a5db-100d19822ccb/root   188K
> 802G   961M  /iocage/jails/709c103b-1f43-4c3b-a5db-100d19822ccb/root
> zroot/iocage/log                                                88K
> 802G    88K  /iocage/log
> zroot/iocage/releases                                          961M
> 802G    88K  /iocage/releases
> zroot/iocage/releases/11.1-RELEASE                             961M
> 802G    88K  /iocage/releases/11.1-RELEASE
> zroot/iocage/releases/11.1-RELEASE/root                        961M
> 802G   961M  /iocage/releases/11.1-RELEASE/root
> zroot/iocage/templates                                          88K
> 802G    88K  /iocage/templates
> ...
> ∴sudo iocage rename 709c103b-1f43-4c3b-a5db-100d19822ccb bastion
>                       (git:global)-[master]
> 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/rename.py",
> line 39, in cli
>     ioc.IOCage(exit_on_error=True, jail=jail).rename(new_name)
>   File "/usr/local/lib/python3.6/site-packages/iocage/lib/iocage.py",
> line 1211, in rename
>     self.set(f"host_hostuuid={new_name}", rename=True)
>   File "/usr/local/lib/python3.6/site-packages/iocage/lib/iocage.py",
> line 1415, in set
>     self.get(_prop)
>   File "/usr/local/lib/python3.6/site-packages/iocage/lib/iocage.py",
> line 1121, in get
>     exit_on_error=self.exit_on_error).json_get_value(prop)
>   File "/usr/local/lib/python3.6/site-packages/iocage/lib/ioc_json.py",
> line 563, in json_get_value
>     conf = self.json_load()
>   File "/usr/local/lib/python3.6/site-packages/iocage/lib/ioc_json.py",
> line 226, in json_load
>     if jail_dataset.mountpoint is None:
>   File "libzfs.pyx", line 2311, in libzfs.ZFSDataset.mountpoint.__get__
> UnicodeDecodeError: 'ascii' codec can't decode byte 0xc0 in position
> 320: ordinal not in range(128)
>
>
> What should I do from here?
>
>
It's a well-known problem.  You need to patch your copy of py-libzfs.
Unfortunately, the patch hasn't been picked up by upstream because the port
maintainer believes it to be incorrect, but hasn't found the correct
solution yet.

Here's the patch:
https://github.com/trueos/freebsd-ports/commit/00da370342012d87331eae3d74ef6784ed8172be

And here's the discussion:
https://github.com/iocage/iocage/issues/153

-Alan
Received on Sun Feb 25 2018 - 22:16:01 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:41:15 UTC