Project

General

Profile

Bug #35017

Avatar?id=55038&size=50x50

Improve validation for serial ports

Added by Zackary Welch over 2 years ago. Updated about 2 years ago.

Status:
Done
Priority:
No priority
Assignee:
Waqar Ahmed
Category:
Middleware
Target version:
Seen in:
Severity:
Med High
Reason for Closing:
Cannot Reproduce
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 going to save settings in System / Advanced, I get an "Error saving" with the description "[EINVAL] advanced_settings_update.serialport: Serial port specified has not been identified by the system" even though I do not specify a serial port anywhere. Why is this error occurring even with no settings changed?

Traceback:

Error: 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 110, in __next__
    return self.gen.send(None)
  File "/usr/local/lib/python3.6/site-packages/middlewared/main.py", line 1014, in call_method
    return await self._call(message['method'], serviceobj, methodobj, params, app=app)
  File "/usr/local/lib/python3.6/asyncio/coroutines.py", line 110, in __next__
    return self.gen.send(None)
  File "/usr/local/lib/python3.6/site-packages/middlewared/main.py", line 953, in _call
    return await methodobj(*args)
  File "/usr/local/lib/python3.6/asyncio/coroutines.py", line 110, in __next__
    return self.gen.send(None)
  File "/usr/local/lib/python3.6/site-packages/middlewared/service.py", line 193, in update
    f'{self._config.namespace}.update', self, self.do_update, [data]
  File "/usr/local/lib/python3.6/asyncio/coroutines.py", line 110, in __next__
    return self.gen.send(None)
  File "/usr/local/lib/python3.6/site-packages/middlewared/main.py", line 953, in _call
    return await methodobj(*args)
  File "/usr/local/lib/python3.6/asyncio/coroutines.py", line 110, in __next__
    return self.gen.send(None)
  File "/usr/local/lib/python3.6/site-packages/middlewared/schema.py", line 646, in nf
    return await f(*args, **kwargs)
  File "/usr/local/lib/python3.6/asyncio/coroutines.py", line 110, in __next__
    return self.gen.send(None)
  File "/usr/local/lib/python3.6/site-packages/middlewared/plugins/system.py", line 122, in do_update
    raise verrors
middlewared.service_exception.ValidationErrors: [EINVAL] advanced_settings_update.serialport: Serial port specified has not been identified by the system

output.mp4 (850 KB) output.mp4 Zackary Welch, 06/14/2018 01:12 PM

Associated revisions

Revision 09d7776f (diff)
Added by Waqar Ahmed over 2 years ago

Improve validation for serial ports Ticket: #35017

Revision 2b485173 (diff)
Added by Waqar Ahmed over 2 years ago

Improve validation for serial ports Ticket: #35017

Revision 9251121f (diff)
Added by Waqar Ahmed over 2 years ago

Improve validation for serial ports Ticket: #35017

Revision 4155bbf9 (diff)
Added by Waqar Ahmed over 2 years ago

Improve validation for serial ports Ticket: #35017

Revision 4d337e86 (diff)
Added by Waqar Ahmed about 2 years ago

Improve validation for serial ports Ticket: #35017

History

#1 Avatar?id=55038&size=24x24 Updated by Zackary Welch over 2 years ago

  • File debug(1).tgz added

#2 Avatar?id=55038&size=24x24 Updated by Zackary Welch over 2 years ago

This is on a physical box, not a VM. It seems the Serial Port Address and Serial Port Speed options show up in the old UI but not the new UI, and the old UI saves settings without incident. Once I went back to the old UI to save, the new UI was able to save again. Is the System / Advanced page not complete on the new UI, since those Serial Port options are not present? This bug got "fixed", but should probably be still investigated, especially with regards to the UI.

#3 Updated by Dru Lavigne over 2 years ago

  • Assignee changed from Release Council to William Grzybowski

William: can we get an error message instead of a traceback? Let Warren know if the dev wants assistance in crafting the text of the error message.

#4 Updated by William Grzybowski over 2 years ago

  • Assignee changed from William Grzybowski to Waqar Ahmed
  • Target version changed from Backlog to 11.2-RC2

#5 Updated by Waqar Ahmed over 2 years ago

  • Status changed from Unscreened to Screened
  • Assignee changed from Waqar Ahmed to Zackary Welch
  • Severity changed from Low Medium to Med High

Zachary a PR has been merged for improving the validation of serial ports checking in Middlewared. The error described wasn't reproducible, but if it is, then that means new UI is not handling validation errors from Middlewared. That should not happen and necessary changes should be made to accommodate this.

#6 Avatar?id=55038&size=24x24 Updated by Zackary Welch over 2 years ago

Sounds good. I'll see if I can take steps to reproduce this.

#7 Updated by Waqar Ahmed over 2 years ago

Please do ensure that the new UI handles validation errors generated from Middlewared even if this issue is not reproducible. Many thanks !

#9 Avatar?id=55038&size=24x24 Updated by Zackary Welch about 2 years ago

  • Reason for Closing set to Cannot Reproduce
  • Needs QA changed from Yes to No

I cannot reproduce this. This seems to be a fluke bug between the two UIs. I'd say this has been fixed or is not going to happen again.

#10 Updated by William Grzybowski about 2 years ago

  • Subject changed from Serial port error when saving System / Advanced settings even when no settings changed to Improve validation for serial ports
  • Status changed from Screened to Done

#11 Updated by William Grzybowski about 2 years ago

  • Assignee changed from Zackary Welch to Waqar Ahmed

#12 Updated by Dru Lavigne about 2 years ago

  • Target version changed from 11.2-RC2 to 11.2-BETA1

#13 Updated by Dru Lavigne about 2 years ago

  • File deleted (debug(1).tgz)

#14 Updated by Dru Lavigne about 2 years ago

  • Needs Doc changed from Yes to No
  • Needs Merging changed from Yes to No

Also available in: Atom PDF