Project

General

Profile

Feature #40460

Append mountpoint to jail's root directory when adding storage

Added by Chase Turner over 1 year ago. Updated over 1 year ago.

Status:
Done
Priority:
No priority
Assignee:
Waqar Ahmed
Category:
Middleware
Target version:
Estimated time:
Severity:
Med 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:

FREENAS-MINI-XL (s/n A1-48874)


Description

With apologies, there are two issues here.

1) Need instructions to manually REMOVE and/or MIGRATE GUIDE for the earlier BitTorrent Sync plugin/jail I had working for 3+ years up and to 11.1-U4. (e.g., GUI in 11.2-U1 and 11.2-U2 did not "see" that a previous BitTorrent Sync plugin/jail was installed. Nonetheless the EARLIER BitTorrent Sync Plugin/Jail did work in 11.2-U1 and 11.2-U2); and

2) This error report concerns a NEW BitTorrent Sync Plugin I installed with new 11.2-U2. Steps to reproduce follow, although keep in mind that as of right now, 11.2-U2 GUI can no longer "see" the "BitTorrentSync Plugin/jail I created and so some of the steps might be a bit off...

STEP-1: Go to Plugins->Available. Select "BitTorrentSync 2.5.12_1" and install.

STEP-2: After install completes, click on Plugin and select "Manage". Enter new username/password and instance name

(at this point, the objective is to configure a new mountpoint for the newly created BitTorrentSync jail to use)

STEP-3: Open a freeNAS command shell window. Change directory to the specific pool mountpoint and create a directory "btsync_folders". (note: old BitTorrentSync instructions would have me chmod btsync:btsync on the folder, but I did not do that. )

STEP-4: Open the BitTorrentSync 2.5.12_1 jail and click to add a new mountpoint. For the "Source", click to select the folder created at STEP-3. For the "Destination", click the root folder of the Jail. (e.g., objective is to tell BitTorrentSync 2.5.12_1 to use "/btsync_folders" in its configuration. Click done.

In a moment, the following traceback will be seen and from this point forward, 11.2-U2 GUI no longer can "see" that the BitTorrentSync 2.5.12_1 Plugin is installed, nor the jail

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 662, in nf
return f(*args, **kwargs)
File "/usr/local/lib/python3.6/site-packages/middlewared/plugins/jail.py", line 278, in list_resource
resource_list = iocage.list("all", plugin=True)
File "/usr/local/lib/python3.6/site-packages/iocage/lib/iocage.py", line 1144, in list
exit_on_error=self.exit_on_error).list_datasets()
File "/usr/local/lib/python3.6/site-packages/iocage/lib/ioc_list.py", line 76, in list_datasets
_all = self.list_all(ds)
File "/usr/local/lib/python3.6/site-packages/iocage/lib/ioc_list.py", line 228, in list_all
out = su.check_output(full_ip4_cmd)
File "/usr/local/lib/python3.6/subprocess.py", line 336, in check_output
**kwargs).stdout
File "/usr/local/lib/python3.6/subprocess.py", line 418, in run
output=stdout, stderr=stderr)
subprocess.CalledProcessError: Command '['jexec', 'ioc-btsync', 'ifconfig', 'epair0b', 'inet']' returned non-zero exit status 1.
"""

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 154, in call_method
result = await self.middleware.call_method(self, message)
File "/usr/local/lib/python3.6/asyncio/coroutines.py", line 129, in throw
return self.gen.throw(type, value, traceback)
File "/usr/local/lib/python3.6/site-packages/middlewared/main.py", line 1013, in call_method
return await self._call(message['method'], serviceobj, methodobj, params, app=app, io_thread=False)
File "/usr/local/lib/python3.6/asyncio/coroutines.py", line 129, in throw
return self.gen.throw(type, value, traceback)
File "/usr/local/lib/python3.6/site-packages/middlewared/main.py", line 950, in call
return await self._call_worker(serviceobj, name, *args)
File "/usr/local/lib/python3.6/asyncio/coroutines.py", line 129, in throw
return self.gen.throw(type, value, traceback)
File "/usr/local/lib/python3.6/site-packages/middlewared/main.py", line 977, in _call_worker
job,
File "/usr/local/lib/python3.6/asyncio/coroutines.py", line 129, in throw
return self.gen.throw(type, value, traceback)
File "/usr/local/lib/python3.6/site-packages/middlewared/main.py", line 908, in run_in_proc
return await self.run_in_executor(self.
_procpool, method, *args, **kwargs)
File "/usr/local/lib/python3.6/asyncio/coroutines.py", line 129, in throw
return self.gen.throw(type, value, traceback)
File "/usr/local/lib/python3.6/site-packages/middlewared/main.py", line 902, in run_in_executor
return await loop.run_in_executor(pool, functools.partial(method, *args, **kwargs))
subprocess.CalledProcessError: Command '['jexec', 'ioc-btsync', 'ifconfig', 'epair0b', 'inet']' returned non-zero exit status 1.


Related issues

Related to FreeNAS - Bug #42353: Fix mountpoint destination issue in new UIDone

Associated revisions

Revision bfae61a5 (diff)
Added by Waqar Ahmed over 1 year ago

Adjust destination path in mountpoints for jails This commits adds functionality which automatically adjusts the destination path wrt jails root directory. It prepends the system path's till jails root directory meaning that the end user will only specify the path starting from root directory of jail. Ticket: #40460

Revision 34493d08 (diff)
Added by Waqar Ahmed over 1 year ago

Adjust destination path in mountpoints for jails This commits adds functionality which automatically adjusts the destination path wrt jails root directory. It prepends the system path's till jails root directory meaning that the end user will only specify the path starting from root directory of jail. Ticket: #40460

History

#1 Updated by Chase Turner over 1 year ago

If it would help to conduct a realtime screen sharing of my freeNAS system to investigate this issue, I am available to do that using my https://zoom.us screen sharing system. Please visit https://doodle.com/chase to schedule the time to meet and note I'm in the central time zone. I need at least a 1 business day advance notice of your proposed meeting date.

#2 Updated by Dru Lavigne over 1 year ago

  • Subject changed from Command '['jexec', 'ioc-btsync', 'ifconfig', 'epair0b', 'inet']' returned non-zero exit status 1 to traceback when adding mountpoint for qbittorent plugin
  • Private changed from No to Yes
  • Seen in changed from 11.2-U3 to 11.2-BETA2
  • Reason for Blocked set to Need additional information from Author

Chase: issue number 1 is expected as warden jails will not display in the new UI.

In order to help the dev pinpoint the cause of the traceback, please attach a debug (System -> Advanced -> Save debug) to this ticket.

#3 Updated by Chase Turner over 1 year ago

  • File Bug_40460_debug.tgz added

Dru Lavigne wrote:

Chase: issue number 1 is expected as warden jails will not display in the new UI.

In order to help the dev pinpoint the cause of the traceback, please attach a debug (System -> Advanced -> Save debug) to this ticket.

See "Bug_40460_debug.tgz" -- it is the debug from the affected 11.2-U2 system.

Per Issue #1, My follow-on question is this : how do I go about deleting a previously operational 11.1 plugin & jail manually such as the BitTorrentSync Plugin -- that continues to operate in 11.2-U2 albeit that I cannot GUI "see" it to manage the plugin & jail to start/stop and delete the instance?

#4 Updated by Dru Lavigne over 1 year ago

  • Assignee changed from Release Council to William Grzybowski
  • Reason for Blocked deleted (Need additional information from Author)

The recommendation is to reinstall in the new UI and once it is working as expected, to delete the old one. This is necessary as we have changed from the old middleware/warden plugins to the new middleware/iocage plugins.

#5 Updated by William Grzybowski over 1 year ago

Chase, can you see your old qbittorrent under the legacy UI?

#6 Updated by William Grzybowski over 1 year ago

  • Assignee changed from William Grzybowski to Brandon Schneider
  • Target version changed from Backlog to 11.2-BETA3
  • Severity changed from New to Med High

#7 Updated by Chase Turner over 1 year ago

William Grzybowski wrote:

Chase, can you see your old qbittorrent under the legacy UI?

Yes, I could see the old bittorrent jail & plugin in the legacy UI before I upgraded my freeNAS host to 11.2-U1 and then to 11.2-U2. After upgrading however, neither 11.2-U1 and 11.2-U2 will display the legacy jail and plugin. NOTE: I did upgrade my zfs volumes after installing 11.2-U2 and so, I'm assuming I cannot boot back to 11.1-U5 to use the legacy UI again. Assuming that is the case, is there a general guide for me to consult for deleting (by hand) an legacy PlugIn and Jail (e.g, I know where the Jail is located on the freeNAS host file system, but I don't know the control files that are consulted to launch the legacy jail and plugin in the 11.2-U2 system.)

#8 Updated by William Grzybowski over 1 year ago

Chase Turner wrote:

William Grzybowski wrote:

Chase, can you see your old qbittorrent under the legacy UI?

Yes, I could see the old bittorrent jail & plugin in the legacy UI before I upgraded my freeNAS host to 11.2-U1 and then to 11.2-U2. After upgrading however, neither 11.2-U1 and 11.2-U2 will display the legacy jail and plugin. NOTE: I did upgrade my zfs volumes after installing 11.2-U2 and so, I'm assuming I cannot boot back to 11.1-U5 to use the legacy UI again. Assuming that is the case, is there a general guide for me to consult for deleting (by hand) an legacy PlugIn and Jail (e.g, I know where the Jail is located on the freeNAS host file system, but I don't know the control files that are consulted to launch the legacy jail and plugin in the 11.2-U2 system.)

You can still access the legacy UI in 11.2.

Or do you mean on the legacy UI in 11.2 you cant see them?

#9 Updated by Chase Turner over 1 year ago

William Grzybowski wrote:

Chase Turner wrote:

William Grzybowski wrote:

Chase, can you see your old qbittorrent under the legacy UI?

Yes, I could see the old bittorrent jail & plugin in the legacy UI before I upgraded my freeNAS host to 11.2-U1 and then to 11.2-U2. After upgrading however, neither 11.2-U1 and 11.2-U2 will display the legacy jail and plugin. NOTE: I did upgrade my zfs volumes after installing 11.2-U2 and so, I'm assuming I cannot boot back to 11.1-U5 to use the legacy UI again. Assuming that is the case, is there a general guide for me to consult for deleting (by hand) an legacy PlugIn and Jail (e.g, I know where the Jail is located on the freeNAS host file system, but I don't know the control files that are consulted to launch the legacy jail and plugin in the 11.2-U2 system.)

You can still access the legacy UI in 11.2.

Or do you mean on the legacy UI in 11.2 you cant see them?

If there is a legacy UI in 11.2, I am reporting that I cannot see the old btsync jail & and Plugin using the 11.2 GUI. NOTE: I installed that old btsync jail and Plugin back in 2015 using the following directions: https://www.resilio.com/blog/sync-hacks-how-to-set-up-freenas-with-bittorrent-sync-using-a-plugin

#10 Updated by William Grzybowski over 1 year ago

Chase Turner wrote:

William Grzybowski wrote:

Chase Turner wrote:

William Grzybowski wrote:

Chase, can you see your old qbittorrent under the legacy UI?

Yes, I could see the old bittorrent jail & plugin in the legacy UI before I upgraded my freeNAS host to 11.2-U1 and then to 11.2-U2. After upgrading however, neither 11.2-U1 and 11.2-U2 will display the legacy jail and plugin. NOTE: I did upgrade my zfs volumes after installing 11.2-U2 and so, I'm assuming I cannot boot back to 11.1-U5 to use the legacy UI again. Assuming that is the case, is there a general guide for me to consult for deleting (by hand) an legacy PlugIn and Jail (e.g, I know where the Jail is located on the freeNAS host file system, but I don't know the control files that are consulted to launch the legacy jail and plugin in the 11.2-U2 system.)

You can still access the legacy UI in 11.2.

Or do you mean on the legacy UI in 11.2 you cant see them?

If there is a legacy UI in 11.2, I am reporting that I cannot see the old btsync jail & and Plugin using the 11.2 GUI. NOTE: I installed that old btsync jail and Plugin back in 2015 using the following directions: https://www.resilio.com/blog/sync-hacks-how-to-set-up-freenas-with-bittorrent-sync-using-a-plugin

We are definitely not getting each other.

Yes, you cannot see old plugins in NEW GUI. That is by design.

Can you answer if you can see them using the LEGACY UI in 11.2?

#11 Updated by Chase Turner over 1 year ago

  1. UPDATE

Issue #1 is resolved with my new awareness that 11.2-U2 offers a "Legacy UI" view so as to manage earlier jails and plugins. Thank you William Grzybowski for alerting me to my ignorance there.

Concerning Issue #2, the root cause leading to the traceback is this : reading the 14.3.3 "Adding Storage to a Jail" docset, I read that I was to "select an existing, empty directory within the jail to link to the Source storage area". This reading left me with the impression that freeNAS would "append" the last path component of the SOURCE to the DESTINATION. But my selecting a non-empty DESTINATION did not result in dataset being mounted in the btsync jail. At that point, I experimented with a root level DESTINATION target -- "/mnt/iocage/jails/btsync/root" -- and doing that led directly to the plugin crash.

  1. WORKAROUND to add storage to a jail

Specify a complete destination path -- with the intended mountpoint name -- in the GUI e.g.,
SOURCE: /mnt/virtualization/rslsync
DESTINATON: /mnt/iocage/jails/btsync/root/mnt/rslsync

With that workaround, I am successful in adding storage to my btsync jail.

As for disposition of this bug report, it would be helpful to stop end-users from shooting themselves in the foot by analyzing the DESTINATION path to see if there is a conflict -- and if so, alert the user as to the problem.

#12 Updated by Brandon Schneider over 1 year ago

  • Status changed from Unscreened to Not Started

#13 Updated by Brandon Schneider over 1 year ago

  • Tracker changed from Bug to Feature
  • Subject changed from traceback when adding mountpoint for qbittorent plugin to Append proper mountpoint for user jails mounts
  • Seen in deleted (11.2-BETA2)
  • ChangeLog Required deleted (No)

Chase: Sorry about that! Currently, that's how it's meant to function, we can add some intelligence to this, however.

Appreciate the thorough ticket!

#14 Updated by William Grzybowski over 1 year ago

  • Assignee changed from Brandon Schneider to Waqar Ahmed

Load-balancing from Brandon

#15 Updated by Waqar Ahmed over 1 year ago

  • Status changed from Not Started to In Progress

#16 Updated by Bug Clerk over 1 year ago

  • Status changed from In Progress to Ready for Testing

#17 Updated by Dru Lavigne over 1 year ago

  • Subject changed from Append proper mountpoint for user jails mounts to Append mountpoint to jail's root directory when adding storage
  • Private changed from Yes to No
  • Needs Merging changed from Yes to No

#18 Updated by Dru Lavigne over 1 year ago

  • File deleted (Bug_40460_debug.tgz)

#20 Updated by Dru Lavigne over 1 year ago

  • Related to Bug #42353: Fix mountpoint destination issue in new UI added

#21 Updated by Timothy Moore II over 1 year ago

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

Testing with FreeNAS system updated to FreeNAS-11.2-MASTER-201808270839:

Log in, go to Jails. Create new simple jail with DHCP and the 11.2 RELEASE. Ensure jail Status is down and click More Options (three vertical dots)/Mount points. Click + to add new mount point. Verify clicking the folder (browse) for Source starts the file explorer in the system /mnt directory and clicking the folder (browse) for Destination starts the file explorer pointed within the jail /root directory. Set these fields and click SAVE. New mount point is created with no errors or unexpected output.

#22 Updated by Timothy Moore II over 1 year ago

  • Needs Doc changed from Yes to No

#23 Updated by Dru Lavigne over 1 year ago

  • Status changed from Passed Testing to Done

Also available in: Atom PDF