Bug 1296347 - Error when attaching glusterfs image: unsupported operand type(s) for +=: 'NoneType' and 'str'
Error when attaching glusterfs image: unsupported operand type(s) for +=: 'No...
Status: CLOSED DEFERRED
Product: Virtualization Tools
Classification: Community
Component: virt-manager (Show other bugs)
unspecified
x86_64 Linux
unspecified Severity urgent
: ---
: ---
Assigned To: Cole Robinson
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2016-01-06 18:45 EST by Slava
Modified: 2016-07-07 09:55 EDT (History)
6 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2016-06-09 07:04:03 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
virt-manager debug (276.29 KB, text/plain)
2016-01-06 20:02 EST, Slava
no flags Details
debugging patch (1.71 KB, text/plain)
2016-04-08 15:58 EDT, Cole Robinson
no flags Details
virt-manager 1.2.1 debug log (9.34 KB, text/plain)
2016-07-07 04:01 EDT, Attila Zsiros
no flags Details

  None (edit)
Description Slava 2016-01-06 18:45:00 EST
Hello Everyone,
Getting error when adding glusterfs image disk.

Uncaught error validating install parameters: unsupported operand type(s) for +=: 'NoneType' and 'str'

Traceback (most recent call last):
  File "/usr/share/virt-manager/virtManager/create.py", line 1685, in _validate
    return self._validate_install_page()
  File "/usr/share/virt-manager/virtManager/create.py", line 1864, in _validate_install_page
    if not self._validate_storage_page():
  File "/usr/share/virt-manager/virtManager/create.py", line 1971, in _validate_storage_page
    if disk and self._addstorage.validate_disk_object(disk) is False:
  File "/usr/share/virt-manager/virtManager/addstorage.py", line 297, in validate_disk_object
    names = disk.is_conflict_disk()
  File "/usr/share/virt-manager/virtinst/devicedisk.py", line 918, in is_conflict_disk
    read_only=self.read_only)
  File "/usr/share/virt-manager/virtinst/devicedisk.py", line 350, in path_in_use_by
    if disk.path in vols and vm.name not in ret:
  File "/usr/share/virt-manager/virtinst/devicedisk.py", line 487, in _get_path
    self._set_default_storage_backend()
  File "/usr/share/virt-manager/virtinst/devicedisk.py", line 760, in _set_default_storage_backend
    path = self._build_url_from_network_source()
  File "/usr/share/virt-manager/virtinst/devicedisk.py", line 635, in _build_url_from_network_source
    ret += "://"
TypeError: unsupported operand type(s) for +=: 'NoneType' and 'str'

Reproduce.

1. create new vm
2. select use existing image.
3. in open dialog try select image from glusterfs pool.
4. click "Save" error will show up.

Same error if just add image disk to existing vm.
Comment 1 Cole Robinson 2016-01-06 18:47:36 EST
Please provide full virt-manager --debug output when reproducing
Comment 2 Slava 2016-01-06 20:02 EST
Created attachment 1112309 [details]
virt-manager debug
Comment 3 Cole Robinson 2016-01-07 11:08:36 EST
Seems the offending volume XML is:

<volume type="network">
  <name>cawebsrv01_1.qcow2</name>
  <key>gluster://my_server/datapoint02/cawebsrv01_1.qcow2</key>
  <source>
  </source>
  <capacity unit="bytes">42949672960</capacity>
  <allocation unit="bytes">39882784768</allocation>
  <target>
    <path>gluster://my_server/datapoint02/cawebsrv01_1.qcow2</path>
    <format type="qcow2"/>
    <permissions>
      <mode>0755</mode>
      <owner>107</owner>
      <group>107</group>
    </permissions>
    <timestamps>
      <atime>1452099373.212940894</atime>
      <mtime>1448523521.816306775</mtime>
      <ctime>1452099347.935292229</ctime>
    </timestamps>
    <compat>1.1</compat>
    <features/>
  </target>
</volume>
Comment 4 Slava 2016-04-02 12:54:13 EDT
Hello Cole,
Same error is preventing to add flat disk in directory. I consider this as blocker. It make Virtual Manager not operational at all.


ncaught error validating hardware input: unsupported operand type(s) for +=: 'NoneType' and 'str'

Traceback (most recent call last):
  File "/usr/share/virt-manager/virtManager/addhardware.py", line 1373, in _finish
    if self._validate() is False:
  File "/usr/share/virt-manager/virtManager/addhardware.py", line 1404, in _validate
    ret = self._validate_page_storage()
  File "/usr/share/virt-manager/virtManager/addhardware.py", line 1525, in _validate_page_storage
    if self.addstorage.validate_disk_object(disk) is False:
  File "/usr/share/virt-manager/virtManager/addstorage.py", line 297, in validate_disk_object
    names = disk.is_conflict_disk()
  File "/usr/share/virt-manager/virtinst/devicedisk.py", line 918, in is_conflict_disk
    read_only=self.read_only)
  File "/usr/share/virt-manager/virtinst/devicedisk.py", line 350, in path_in_use_by
    if disk.path in vols and vm.name not in ret:
  File "/usr/share/virt-manager/virtinst/devicedisk.py", line 487, in _get_path
    self._set_default_storage_backend()
  File "/usr/share/virt-manager/virtinst/devicedisk.py", line 760, in _set_default_storage_backend
    path = self._build_url_from_network_source()
  File "/usr/share/virt-manager/virtinst/devicedisk.py", line 635, in _build_url_from_network_source
    ret += "://"
TypeError: unsupported operand type(s) for +=: 'NoneType' and 'str'
Comment 5 Cole Robinson 2016-04-08 15:58 EDT
Created attachment 1145241 [details]
debugging patch

Sorry this is causing such an issue. I can't really tell what the root problem is and I can't reproduce. Can you do the following bits to get more debug info?

download the attachment to $HOME
git clone git://github.com/virt-manager/virt-manager
cd virt-manager
git am ~/0001-gluster-debug-patch.patch
./virt-manager --debug

Reproduce the issue like that, then provide the full --debug output
Comment 6 Cole Robinson 2016-05-02 10:23:37 EDT
(In reply to Cole Robinson from comment #5)
> Created attachment 1145241 [details]
> debugging patch
> 
> Sorry this is causing such an issue. I can't really tell what the root
> problem is and I can't reproduce. Can you do the following bits to get more
> debug info?
> 
> download the attachment to $HOME
> git clone git://github.com/virt-manager/virt-manager
> cd virt-manager
> git am ~/0001-gluster-debug-patch.patch
> ./virt-manager --debug
> 
> Reproduce the issue like that, then provide the full --debug output



Hi slava, please provide this debugging info so I can understand what's going wrong
Comment 7 Cole Robinson 2016-06-09 07:04:03 EDT
Since no response for a while, closing. Please reopen if you can still reproduce, and provide the info requested in Comment 5
Comment 8 Attila Zsiros 2016-07-07 04:00:31 EDT
I have same problem, patched version log attached.
The patch first line not match!(In reply to Cole Robinson from comment #5)
> Created attachment 1145241 [details]
> debugging patch
> 
> Sorry this is causing such an issue. I can't really tell what the root
> problem is and I can't reproduce. Can you do the following bits to get more
> debug info?
> 
> download the attachment to $HOME
> git clone git://github.com/virt-manager/virt-manager
> cd virt-manager
> git am ~/0001-gluster-debug-patch.patch
> ./virt-manager --debug
> 
> Reproduce the issue like that, then provide the full --debug output
Comment 9 Attila Zsiros 2016-07-07 04:01 EDT
Created attachment 1177210 [details]
virt-manager 1.2.1 debug log

virt-manager --version
1.2.1
uname -a
Linux kmooc1.oe-mgmt 3.10.0-327.18.2.el7.x86_64 #1 SMP Thu May 12 11:03:55 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux
cat /etc/redhat-release 
CentOS Linux release 7.2.1511 (Core)
Comment 10 Cole Robinson 2016-07-07 09:55:50 EDT
Can you reproduce with virt-manager 1.4.0 ? It is the latest version

Note You need to log in before you can comment on or make changes to this bug.