Project

General

Profile

Bug #45721

Fix traceback on disk.get_unused

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

Status:
Done
Priority:
No priority
Assignee:
William Grzybowski
Category:
Middleware
Target version:
Seen in:
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

CalledProcessError: Command '('/usr/sbin/diskinfo', '/dev/da3')' returned non-zero exit status 1.
  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/schema.py", line 664, in nf
    return await f(*args, **kwargs)
  File "plugins/disk.py", line 156, in get_unused
    disk["partitions"] = await self.__get_partitions(disk)
  File "plugins/disk.py", line 278, in __get_partitions
    info = (await run("/usr/sbin/diskinfo", path)).stdout.decode("utf-8").split("\t")
  File "middlewared/utils/__init__.py", line 82, in run
    cp.check_returncode()
  File "python3.6/subprocess.py", line 369, in check_returncode
    self.stderr)

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

self    
CompletedProcess(args=('/usr/sbin/diskinfo', '/dev/da3'), returncode=1, stdout=b'', stderr=b'diskinfo: /dev/da3: ioctl(DIOCGMEDIASIZE) failed, probably not a disk.\n')

Associated revisions

Revision 3bc5de04 (diff)
Added by William Grzybowski almost 2 years ago

fix(middlewared/disk): do not make diskinfo fatal, instead skip it Ticket: #45721

Revision 731586e7 (diff)
Added by William Grzybowski almost 2 years ago

fix(middlewared/disk): do not make diskinfo fatal, instead skip it Ticket: #45721

History

#1 Updated by William Grzybowski almost 2 years ago

  • Description updated (diff)

#2 Updated by William Grzybowski almost 2 years ago

  • Status changed from Unscreened to Not Started

#3 Updated by Bug Clerk almost 2 years ago

  • Status changed from Not Started to In Progress

#4 Updated by Bug Clerk almost 2 years ago

  • Status changed from In Progress to Ready for Testing

#5 Updated by William Grzybowski almost 2 years ago

  • Status changed from Ready for Testing to Done

There is no sensible way for QA to test this.

#6 Updated by Dru Lavigne almost 2 years ago

  • Subject changed from Traceback on disk.get_unused to Fix traceback on disk.get_unused
  • Needs Doc changed from Yes to No
  • Needs Merging changed from Yes to No

Also available in: Atom PDF