Project

General

Profile

Bug #45849

Prevent creating NFS share without path

Added by William Grzybowski about 2 years ago. Updated almost 2 years ago.

Status:
Done
Priority:
No priority
Assignee:
Vladimir Vinogradenko
Category:
Middleware
Target version:
Seen in:
Severity:
Low 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

IndexError: list index out of range
  File "middlewared/main.py", line 155, in call_method
    result = await self.middleware.call_method(self, message)
  File "middlewared/main.py", line 1033, in call_method
    return await self._call(message['method'], serviceobj, methodobj, params, app=app, io_thread=False)
  File "middlewared/main.py", line 973, in _call
    return await methodobj(*args)
  File "middlewared/service.py", line 283, in update
    f'{self._config.namespace}.update', self, self.do_update, [id, data]
  File "middlewared/main.py", line 973, in _call
    return await methodobj(*args)
  File "middlewared/schema.py", line 664, in nf
    return await f(*args, **kwargs)
  File "plugins/nfs.py", line 147, in do_update
    await self.validate(new, "sharingnfs_update", verrors, old=old)
  File "plugins/nfs.py", line 197, in validate
    self.validate_hosts_and_networks, other_shares, data, schema_name, verrors, dns_cache
  File "middlewared/main.py", line 933, in run_in_thread
    return await self.loop.run_in_executor(executor, functools.partial(method, *args, **kwargs))
  File "concurrent/futures/thread.py", line 56, in run
    result = self.fn(*self.args, **self.kwargs)
  File "plugins/nfs.py", line 268, in validate_hosts_and_networks
    dev = os.stat(data["paths"][0]).st_dev

{
'id': 'dbcb7e85-e9c9-4f6b-ae30-3f7bb764d58f', 
'method': 'sharing.nfs.update', 
'msg': 'method', 
'params': [
1, 
{
'alldirs': True, 
'comment': '', 
'hosts': [], 
'mapall_group': None, 
'mapall_user': None, 
'maproot_group': None, 
'maproot_user': None, 
'networks': [], 
'paths': [], 
'quiet': True, 
'ro': False, 
'security': []
}
]
}

https://sentry.ixsystems.com/ixsystems/freenas-middleware/issues/14702/

Associated revisions

Revision 277f3849 (diff)
Added by Vladimir Vinogradenko about 2 years ago

Disallow NFS share without paths Ticket: #45849

History

#1 Updated by Bug Clerk about 2 years ago

  • Status changed from Unscreened to In Progress

#2 Updated by Bug Clerk about 2 years ago

  • Status changed from In Progress to Ready for Testing

#3 Updated by Dru Lavigne about 2 years ago

  • Subject changed from Traceback when updating NFS share without paths to Prevent creating NFS share without path
  • Needs Merging changed from Yes to No

#5 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

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

Go to Sharing > Unix (NFS) Shares > Add. Verify the Path field is mandatory and the NFS share cannot be saved if the field is left empty.

#6 Updated by Timothy Moore II about 2 years ago

#7 Updated by Timothy Moore II about 2 years ago

  • Needs Doc changed from Yes to No

#8 Updated by Dru Lavigne about 2 years ago

  • Needs Merging changed from No to Yes

#9 Updated by Dru Lavigne almost 2 years ago

  • Status changed from Passed Testing to Done
  • Needs Merging changed from Yes to No

Also available in: Atom PDF