Project

General

Profile

Bug #33945

Fix maproot/mapall not having default null values in NFS create API

Added by Eric Turgeon 11 months ago. Updated 11 months ago.

Status:
Done
Priority:
No priority
Assignee:
Vladimir Vinogradenko
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

I have added my XML logs.

The POST /sharing/nfs return 500

------------- generated xml file: /usr/home/ericbsd/projects/freenas/freenas/tests/results/nfs_tests_result.xml --------------
========================================================== FAILURES ==========================================================
__________________________________________ test_04_creating_a_nfs_share_on_nfs_PATH __________________________________________

    def test_04_creating_a_nfs_share_on_nfs_PATH():
        paylaod = {"comment": "My Test Share",
                   "paths": [NFS_PATH],
                   "security": ["SYS"]}
        results = POST("/sharing/nfs", paylaod)
>       assert results.status_code == 200, results.text
E       AssertionError: <h1>500 Internal Server Error</h1><br><h2>Traceback:</h2>
E         &lt;pre&gt;Traceback (most recent call last):
E           File &amp;quot;/usr/local/lib/python3.6/site-packages/aiohttp/web_protocol.py&amp;quot;, line 381, in start
E             resp = await self._request_handler(request)
E           File &amp;quot;/usr/local/lib/python3.6/asyncio/coroutines.py&amp;quot;, line 110, in __next__
E             return self.gen.send(None)
E           File &amp;quot;/usr/local/lib/python3.6/site-packages/aiohttp/web_app.py&amp;quot;, line 322, in _handle
E             resp = await handler(request)
E           File &amp;quot;/usr/local/lib/python3.6/asyncio/coroutines.py&amp;quot;, line 110, in __next__
E             return self.gen.send(None)
E           File &amp;quot;/usr/local/lib/python3.6/site-packages/aiohttp/web_middlewares.py&amp;quot;, line 88, in impl
E             return await handler(request)
E           File &amp;quot;/usr/local/lib/python3.6/asyncio/coroutines.py&amp;quot;, line 110, in __next__
E             return self.gen.send(None)
E           File &amp;quot;/usr/local/lib/python3.6/site-packages/aiohttp/web_middlewares.py&amp;quot;, line 78, in impl
E             return await handler(request)
E           File &amp;quot;/usr/local/lib/python3.6/asyncio/coroutines.py&amp;quot;, line 110, in __next__
E             return self.gen.send(None)
E           File &amp;quot;/usr/local/lib/python3.6/site-packages/middlewared/restful.py&amp;quot;, line 362, in on_method
E             return await do(method, req, resp, *args, **kwargs)
E           File &amp;quot;/usr/local/lib/python3.6/asyncio/coroutines.py&amp;quot;, line 110, in __next__
E             return self.gen.send(None)
E           File &amp;quot;/usr/local/lib/python3.6/site-packages/middlewared/restful.py&amp;quot;, line 488, in do
E             result = await self.middleware.call(methodname, *method_args)
E           File &amp;quot;/usr/local/lib/python3.6/asyncio/coroutines.py&amp;quot;, line 110, in __next__
E             return self.gen.send(None)
E           File &amp;quot;/usr/local/lib/python3.6/site-packages/middlewared/main.py&amp;quot;, line 1018, in call
E             return await self._call(name, serviceobj, methodobj, params, pipes=pipes)
E           File &amp;quot;/usr/local/lib/python3.6/asyncio/coroutines.py&amp;quot;, line 110, in __next__
E             return self.gen.send(None)
E           File &amp;quot;/usr/local/lib/python3.6/site-packages/middlewared/main.py&amp;quot;, line 953, in _call
E             return await methodobj(*args)
E           File &amp;quot;/usr/local/lib/python3.6/asyncio/coroutines.py&amp;quot;, line 110, in __next__
E             return self.gen.send(None)
E           File &amp;quot;/usr/local/lib/python3.6/site-packages/middlewared/service.py&amp;quot;, line 269, in create
E             f&amp;#x27;{self._config.namespace}.create&amp;#x27;, self, self.do_create, [data]
E           File &amp;quot;/usr/local/lib/python3.6/asyncio/coroutines.py&amp;quot;, line 110, in __next__
E             return self.gen.send(None)
E           File &amp;quot;/usr/local/lib/python3.6/site-packages/middlewared/main.py&amp;quot;, line 953, in _call
E             return await methodobj(*args)
E           File &amp;quot;/usr/local/lib/python3.6/asyncio/coroutines.py&amp;quot;, line 110, in __next__
E             return self.gen.send(None)
E           File &amp;quot;/usr/local/lib/python3.6/site-packages/middlewared/schema.py&amp;quot;, line 623, in nf
E             return await f(*args, **kwargs)
E           File &amp;quot;/usr/local/lib/python3.6/asyncio/coroutines.py&amp;quot;, line 110, in __next__
E             return self.gen.send(None)
E           File &amp;quot;/usr/local/lib/python3.6/site-packages/middlewared/plugins/nfs.py&amp;quot;, line 95, in do_create
E             await self.validate(data, &amp;quot;sharingnfs_create&amp;quot;, verrors)
E           File &amp;quot;/usr/local/lib/python3.6/asyncio/coroutines.py&amp;quot;, line 110, in __next__
E             return self.gen.send(None)
E           File &amp;quot;/usr/local/lib/python3.6/site-packages/middlewared/plugins/nfs.py&amp;quot;, line 204, in validate
E             if not data[f&amp;quot;{k}_user&amp;quot;] and not data[f&amp;quot;{k}_group&amp;quot;]:
E         KeyError: &amp;#x27;maproot_user&amp;#x27;
E         &lt;/pre&gt;
E       assert 500 == 200
E        +  where 500 = &lt;Response [500]&gt;.status_code

api2/nfs.py:72: AssertionError

nfs_tests_result.xml (16.1 KB) nfs_tests_result.xml Eric Turgeon, 05/23/2018 07:03 AM

Associated revisions

Revision 13845149 (diff)
Added by Vladimir Vinogradenko 11 months ago

fix(nfs): Fix maproot/mapall not having default null values in create

Ticket: #33945

Revision db9db6b8 (diff)
Added by Vladimir Vinogradenko 11 months ago

fix(nfs): Fix maproot/mapall not having default null values in create

Ticket: #33945

History

#1 Updated by Dru Lavigne 11 months ago

  • Assignee changed from Release Council to William Grzybowski

#2 Updated by William Grzybowski 11 months ago

  • Assignee changed from William Grzybowski to Vladimir Vinogradenko
  • Target version changed from Backlog to 11.2-BETA1
  • Severity changed from New to Medium
  • Seen in changed from Master - FreeBSD-HEAD to Master - FreeNAS Nightlies

#3 Updated by Vladimir Vinogradenko 11 months ago

  • Status changed from Unscreened to Ready for Testing

#4 Updated by Dru Lavigne 11 months ago

  • Subject changed from Rest API POST /sharing/nfs failed to Fix maproot/mapall not having default null values in NFS create API
  • Needs Merging changed from Yes to No

#5 Updated by Eric Turgeon 11 months ago

I tested the new change it is working now.

#6 Updated by Dru Lavigne 11 months ago

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

Also available in: Atom PDF