Error refreshing hardware page: unsupported operand type(s) for /: 'NoneType' and 'int'

Bug #1217524 reported by Dave Gilbert
40
This bug affects 6 people
Affects Status Importance Assigned to Milestone
virt-manager (Ubuntu)
Fix Released
Undecided
Marc Deslauriers
Saucy
Fix Released
Undecided
Marc Deslauriers
Trusty
Fix Released
Undecided
Marc Deslauriers

Bug Description

[SRU]

[Impact]
Easily reproducable crash prevents users from modifying the disk devices when performing a custom install.

[Test Case]
1- Start virt-manager
2- Click new, go through the wizard to perform an install, but click "customize" on the last screen
3- In new window, click on the disk section

Step 3 should crash without the fix, and should success with it.

[Regression potential]
The patch is pretty simple. If it is wrong, the disk section in the hardware screen on existing and new VMs could fail to operate properly.

This happens if you do the customise VM before install and click on the Disk section.
It sounds very similar to https://bugzilla.redhat.com/show_bug.cgi?id=978264

ii virt-manager 0.9.5-1ubuntu1 all desktop application for managing virtual machines
(on Saucy/64bit)

Create a new guest;
  create
  Name: tmp
  Local install media: (gave it a Saucy iso)
  Selected the ISO, and OS as Linux/Ubuntu 13.10
  Default of 1024MB RAM/1CPU
  Allocate disk now
  ** click customice conf before install*
  (The options window comes up)
  Click 'Disk 1'

  ** Error refreshing hardware page: unsupported operand type(s) for /: 'NoneType' and 'int'
  Details:
  Error refreshing hardware page: unsupported operand type(s) for /: 'NoneType' and 'int'

Traceback (most recent call last):
  File "/usr/share/virt-manager/virtManager/details.py", line 1307, in hw_selected
    self.refresh_disk_page()
  File "/usr/share/virt-manager/virtManager/details.py", line 2909, in refresh_disk_page
    iotune_read_bytes_sec = disk.iotune_read_bytes_sec / 1024
TypeError: unsupported operand type(s) for /: 'NoneType' and 'int'

ProblemType: Bug
DistroRelease: Ubuntu 13.10
Package: virt-manager 0.9.5-1ubuntu1
ProcVersionSignature: Ubuntu 3.11.0-3.8-generic 3.11.0-rc6
Uname: Linux 3.11.0-3-generic x86_64
ApportVersion: 2.12.1-0ubuntu2
Architecture: amd64
Date: Tue Aug 27 20:02:58 2013
InstallationDate: Installed on 2012-07-17 (406 days ago)
InstallationMedia: Kubuntu 12.10 "Quantal Quetzal" - Alpha amd64 (20120717)
MarkForUpload: True
PackageArchitecture: all
SourcePackage: virt-manager
UpgradeStatus: Upgraded to saucy on 2013-05-21 (98 days ago)

Revision history for this message
Dave Gilbert (ubuntu-treblig) wrote :
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in virt-manager (Ubuntu):
status: New → Confirmed
Revision history for this message
Hontvári József Levente (hontvari) wrote :

It is also similar to another Red Hat bugreport: https://bugzilla.redhat.com/show_bug.cgi?id=949411

According to the Red Hat bug reports the he issue was fixed in either 0.9.5-1 or 0.10, I am not sure.

Revision history for this message
Dave Gilbert (ubuntu-treblig) wrote :

Hontvari: Yeh I think you're right, it looks like thats's fixed in the main stuff but not backported, and unfortunately the variable names have all changed so the git change won't apply; but I'll fix it up.

Revision history for this message
Dave Gilbert (ubuntu-treblig) wrote :
Revision history for this message
Dave Gilbert (ubuntu-treblig) wrote :

Just attached a patch that seems to do the trick, it's just a backport of the upstream change.

Changed in virt-manager (Ubuntu):
status: Confirmed → Triaged
Revision history for this message
Ubuntu Foundations Team Bug Bot (crichton) wrote :

The attachment "Backport of upstream 61369d25" seems to be a patch. If it isn't, please remove the "patch" flag from the attachment, remove the "patch" tag, and if you are a member of the ~ubuntu-reviewers, unsubscribe the team.

[This is an automated message performed by a Launchpad user owned by ~brian-murray, for any issues please contact him.]

tags: added: patch
Revision history for this message
Frank Ye (frank-ye76) wrote :

Mr. Gilbert, thank you for posting the backport file.

I'm new to Ubuntu and I don't know how to apply this backport patch. Searching on Google for an answer to this was not successful. Could you provide some hint to me? Thanks again.

Revision history for this message
Tom Zhou (zhouqt) wrote :

Hello there,
Is there any new for this bug?

This bug was fixed in upstream by commit:
"""
commit 21858615b509f04ba0702e2f69f89225c322eb8c
Author: Cole Robinson <email address hidden>
Date: Sat Apr 20 18:37:34 2013 -0400

    Fix accessing disk page in virt-manager 'customize before install'
"""

And I can confirm that the patch Dave Gilbert attached works on my trusty box, which contains a virt-manager:
$ dpkg -l | grep virt-manager
ii virt-manager 0.9.5-1ubuntu1

Changed in virt-manager (Ubuntu):
assignee: nobody → Marc Deslauriers (mdeslaur)
Revision history for this message
xuxiaoping (xiaoping378) wrote :

I met the same situation:
error refreshing hardware page unsupported operand type(s) for / 'nonetype' and 'int'

Revision history for this message
xuxiaoping (xiaoping378) wrote :

Now, I find a solution skip it:
 when output the error, just skip it and set your other parameter, when finish just click "Begin Installation", wait for a moment ,then you click the "force off", show the virtual hardware details, then you can change the disk 1.

Revision history for this message
Marc Deslauriers (mdeslaur) wrote :

Thanks for the patch!

I'm preparing an update for trusty, and an SRU for quantal.

Changed in virt-manager (Ubuntu Saucy):
status: New → Confirmed
assignee: nobody → Marc Deslauriers (mdeslaur)
description: updated
Changed in virt-manager (Ubuntu Trusty):
status: Triaged → In Progress
Changed in virt-manager (Ubuntu Saucy):
status: Confirmed → In Progress
Revision history for this message
Dave Gilbert (ubuntu-treblig) wrote :

Marc:
  I think the answer for Trusty is to just update to virt-manager 0.10

Revision history for this message
Stéphane Graber (stgraber) wrote : Please test proposed package

Hello Dave, or anyone else affected,

Accepted virt-manager into saucy-proposed. The package will build now and be available at http://launchpad.net/ubuntu/+source/virt-manager/0.9.5-1ubuntu1.1 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, and change the tag from verification-needed to verification-done. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed. In either case, details of your testing will help us make a better decision.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance!

Changed in virt-manager (Ubuntu Saucy):
status: In Progress → Fix Committed
tags: added: verification-needed
Revision history for this message
Marc Deslauriers (mdeslaur) wrote :

Dave,

virt-manager 0.10 unfortunately isn't in debian yet, and requires a lot of packaging changes, so I'd rather not do it myself and end up doing it substantially different.

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package virt-manager - 0.9.5-1ubuntu2

---------------
virt-manager (0.9.5-1ubuntu2) trusty; urgency=low

  * debian/patches/customize_disk_details_lp_1217524.patch: fix crash when
    attempting to modify disk section in a customized install in
    src/virtManager/details.py. (LP: #1217524)
 -- Marc Deslauriers <email address hidden> Wed, 13 Nov 2013 14:34:32 -0500

Changed in virt-manager (Ubuntu Trusty):
status: In Progress → Fix Released
Revision history for this message
Dave Gilbert (ubuntu-treblig) wrote :

Confirm that the version in Saucy proposed, 0.9.5-1ubuntu1.1 fixes this.

Thanks.

tags: added: verification-done
removed: verification-needed
Revision history for this message
Brian Murray (brian-murray) wrote :

I looked for any occurrences of this on errors and could not find one.

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package virt-manager - 0.9.5-1ubuntu1.1

---------------
virt-manager (0.9.5-1ubuntu1.1) saucy; urgency=low

  * debian/patches/customize_disk_details_lp_1217524.patch: fix crash when
    attempting to modify disk section in a customized install in
    src/virtManager/details.py. (LP: #1217524)
 -- Marc Deslauriers <email address hidden> Wed, 13 Nov 2013 14:34:32 -0500

Changed in virt-manager (Ubuntu Saucy):
status: Fix Committed → Fix Released
Revision history for this message
Brian Murray (brian-murray) wrote : Update Released

The verification of the Stable Release Update for virt-manager has completed successfully and the package has now been released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regresssions.

Revision history for this message
Yash (yashpatel5566789) wrote :

Hello my error in unsupported operand types for non type and int it for dual boot installation when I go to make boot it show like this an get error I dunno how to fix them can u help me please

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.