Project

General

Profile

Bug #45343

Ensure destination directory exists when adding storage to a jail

Added by Waqar Ahmed almost 2 years ago. Updated almost 2 years ago.

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

When a destination is selected in jails, if the mentioned folders don't exist, they should be created on adding a mount.

Risk
We risk breaking the jails mount point functionality.

Acceptance Criteria
For destination field, a path should be specified in the jail where the folder doesn't exist e.g, for "mnt/iocage/jails/jail1/root/foo", "foo" doesn't exist when adding a mount point. However once the mount point has been added, the foo folder should now exist with a successful mount. Starting the jails should work and if there was any data in the mounted source directory, it should also be reflected under foo.


Related issues

Related to FreeNAS - Feature #41060: Improve the validation process for source and destination fields when adding storage to jails Done
Has duplicate FreeNAS - Bug #46003: iocage mount points do not create new folder inside of jailClosed
Has duplicate FreeNAS - Bug #47129: Mounting folders in a jail doesn't auto-create themClosed

Associated revisions

Revision 572669a2 (diff)
Added by Waqar Ahmed almost 2 years ago

Enhance mountpoints operation in jails plugin This commit makes sure that if a path doesn't exist when adding a mount point, middlewared creates it and it is ensured that the destination path exists when a mount point is finally added by iocage. Ticket: #45343

History

#1 Updated by Waqar Ahmed almost 2 years ago

  • Status changed from Unscreened to In Progress

#2 Updated by Waqar Ahmed almost 2 years ago

  • Related to Feature #41060: Improve the validation process for source and destination fields when adding storage to jails added

#3 Updated by Bug Clerk almost 2 years ago

  • Status changed from In Progress to Ready for Testing

#4 Updated by Dru Lavigne almost 2 years ago

  • Subject changed from Destination directory should be created when mounting in jails to Ensure destination directory exists when adding storage to a jail
  • Needs Merging changed from Yes to No

#5 Updated by Dru Lavigne almost 2 years ago

  • Has duplicate Bug #46003: iocage mount points do not create new folder inside of jail added

#6 Updated by Dru Lavigne almost 2 years ago

  • Has duplicate Bug #47129: Mounting folders in a jail doesn't auto-create them added

#7 Updated by Timothy Moore II almost 2 years ago

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

Testing with FreeNAS Mini updated to FreeNAS-11.2-MASTER-201809210904:

Go to Jails and add a new simple jail. Open Mount Points for that jail and add a new mount point where the Destination is a new directory inside the jail directory structure. Save, Start the jail, open the jail Shell, and the new directory was created and is visible in the jail.

#8 Updated by Timothy Moore II almost 2 years ago

  • Needs Doc changed from Yes to No

Docs PR: [angulargui] https://github.com/freenas/freenas-docs/pull/364. No [master] branch commits necessary.

#9 Updated by Dru Lavigne almost 2 years ago

  • Status changed from Passed Testing to Done

Also available in: Atom PDF