Project

General

Profile

Bug #46927

Fix errant jail RELEASE types in warden migration script

Added by Brandon Schneider about 2 years ago. Updated about 2 years ago.

Status:
Done
Priority:
No priority
Assignee:
Brandon Schneider
Category:
Middleware
Target version:
Seen in:
Severity:
High
Reason for Closing:
Reason for Blocked:
Needs QA:
No
Needs Doc:
No
Needs Merging:
No
Needs Automation:
No
Support Suite Ticket:
n/a
Hardware Configuration:
ChangeLog Required:
No

Description

Unless the user created the jail with a specific template, the current RELEASE migration will not succeed.


Related issues

Related to FreeNAS - Bug #27236: Improve warden to iocage migration scriptDone

Associated revisions

Revision 2f9ab841 (diff)
Added by Brandon Schneider about 2 years ago

fix(warden/migration): Use proper RELEASE - Before we used whatever the template was used to create warden jails as the source of truth. We now use the world's version from jailpath/bin/sh. - Fix fstab not existing causing a failed migration Ticket: #46927

Revision 38776875 (diff)
Added by Brandon Schneider about 2 years ago

fix(warden/migration): Use proper RELEASE (#1807) - Before we used whatever the template was used to create warden jails as the source of truth. We now use the world's version from jailpath/bin/sh. - Fix fstab not existing causing a failed migration Ticket: #46927

Revision dc0a1c59 (diff)
Added by Brandon Schneider about 2 years ago

Fix RELEASE selection for 11.0 jails and rtsold for ipv6 migration Ticket: #46927

Revision bed12fe0 (diff)
Added by Brandon Schneider about 2 years ago

Fix RELEASE selection for 11.0 jails and rtsold for ipv6 migration Ticket: #46927

History

#1 Updated by Brandon Schneider about 2 years ago

  • Status changed from Unscreened to In Progress

#2 Updated by Brandon Schneider about 2 years ago

  • Related to Bug #27236: Improve warden to iocage migration script added

#3 Updated by Brandon Schneider about 2 years ago

#4 Updated by Bug Clerk about 2 years ago

  • Status changed from In Progress to Ready for Testing

#5 Updated by Dru Lavigne about 2 years ago

  • Subject changed from Warden migration has errant jail RELEASE types to Fix errant jail RELEASE types in warden migration script
  • Needs Doc changed from Yes to No
  • Needs Merging changed from Yes to No

#6 Updated by Timothy Moore II about 2 years ago

  • Status changed from Ready for Testing to Failed Testing

Testing with a FreeNAS VM installed with 11.1-U5 and updated to latest 11.2 Nightly:

Create VM on 11.5-U5. Create two simple Warden jails: test1-dhcp-ipv6 and test2-static-noip6. Update VM to latest nightly. Go to Shell and enter `migrate_warden.py -j <name> -p <pool>` for each Warden jail. Go to Jails page. Click More Options > Start for test1. ValueError appears:

could not convert string to float: '(1100122)'
Error: concurrent.futures.process._RemoteTraceback: 
""" 
Traceback (most recent call last):
  File "/usr/local/lib/python3.6/concurrent/futures/process.py", line 175, in _process_worker
    r = call_item.fn(*call_item.args, **call_item.kwargs)
  File "/usr/local/lib/python3.6/site-packages/middlewared/worker.py", line 122, in main_worker
    res = loop.run_until_complete(coro)
  File "/usr/local/lib/python3.6/asyncio/base_events.py", line 468, in run_until_complete
    return future.result()
  File "/usr/local/lib/python3.6/site-packages/middlewared/worker.py", line 82, in _run
    return await self._call(f'{service_name}.{method}', serviceobj, methodobj, params=args, job=job)
  File "/usr/local/lib/python3.6/site-packages/middlewared/worker.py", line 75, in _call
    return methodobj(*params)
  File "/usr/local/lib/python3.6/site-packages/middlewared/worker.py", line 75, in _call
    return methodobj(*params)
  File "/usr/local/lib/python3.6/site-packages/middlewared/schema.py", line 668, in nf
    return f(*args, **kwargs)
  File "/usr/local/lib/python3.6/site-packages/middlewared/plugins/jail.py", line 534, in start
    iocage.start()
  File "/usr/local/lib/python3.6/site-packages/iocage_lib/iocage.py", line 1593, in start
    release = float(release.rsplit("-", 1)[0].rsplit("-", 1)[0])
ValueError: could not convert string to float: '(1100122)'
""" 

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/usr/local/lib/python3.6/site-packages/middlewared/main.py", line 161, in call_method
    result = await self.middleware.call_method(self, message)
  File "/usr/local/lib/python3.6/site-packages/middlewared/main.py", line 1043, in call_method
    return await self._call(message['method'], serviceobj, methodobj, params, app=app, io_thread=False)
  File "/usr/local/lib/python3.6/site-packages/middlewared/main.py", line 980, in _call
    return await self._call_worker(serviceobj, name, *args)
  File "/usr/local/lib/python3.6/site-packages/middlewared/main.py", line 1007, in _call_worker
    job,
  File "/usr/local/lib/python3.6/site-packages/middlewared/main.py", line 938, in run_in_proc
    return await self.run_in_executor(self.__procpool, method, *args, **kwargs)
  File "/usr/local/lib/python3.6/site-packages/middlewared/main.py", line 923, in run_in_executor
    return await loop.run_in_executor(pool, functools.partial(method, *args, **kwargs))
ValueError: could not convert string to float: '(1100122)'

#7 Updated by Dru Lavigne about 2 years ago

  • Status changed from Failed Testing to Ready for Testing

#9 Updated by Timothy Moore II about 2 years ago

  • Status changed from Ready for Testing to Failed Testing

Created FreeNAS 11.1-U5 VM and two jails, one from a template and one with manual settings. Update the VM to the latest Nightly (FreeNAS-11.2-MASTER-201809190906). Log in and go to the Shell. Enter these commands:

warden list
iocage list
migrate_warden.py -j test2-static-noip6 -p pool1
iocage list
iocage start test2-static-noip6

Migration appears to run properly. When I tried to start the jail a Traceback is generated:

[root@freenas ~]# iocage start test2-static-noip6
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 1593, in start
    release = float(release.rsplit("-", 1)[0].rsplit("-", 1)[0])
ValueError: could not convert string to float: '(1100122)'

Reviewing the jail settings shows the RELEASE as

(1100122)-RELEASE
, which seems to be the cause of the traceback.

#10 Updated by Brandon Schneider about 2 years ago

  • Status changed from Failed Testing to In Progress

#11 Updated by Bug Clerk about 2 years ago

  • Status changed from In Progress to Ready for Testing

#12 Updated by Timothy Moore II about 2 years ago

  • Status changed from Ready for Testing to Passed Testing
  • Needs QA changed from Yes to No

Retest with FreeNAS system starting at 11.1-U5 updated to FreeNAS-11.2-MASTER-201809270855:

11.1-U5 system: create warden jail simple1-DHCP with default warden settings. Update FreeNAS system to nightly version mentioned above and open the shell. Enter

warden list
iocage list
migrate_warden.py -j simple1-dhcp -p pool1

and confirm the FreeBSD release version for simple1-dhcp is properly migrated and visible in both iocage CLI commands and the UI.

#13 Updated by Dru Lavigne about 2 years ago

  • Status changed from Passed Testing to Done

Also available in: Atom PDF