[1.9,2.0,UX] Creating a Bcache disk is not prevented when is not created in partition

Bug #1600198 reported by Jacek Nykis
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
MAAS
Fix Released
High
Blake Rouse
2.0
Fix Released
High
Blake Rouse

Bug Description

Steps to replicate:
* create small partition on a block device so that there is space left
* try to create bcache by clicking on the block device with free space (see maas1.png and maas2.png attachments)
* when "Create bcache" is clicked the block device with free space disappears from "Available disks and partitions" (attachment maas3.png) but does not appear under "Filesystems. Also "Create bcache" causes the following traceback:

2016-07-08 11:13:41 [-] Error on request (54) node.create_bcache: <ul class="errorlist"><li>__all__<ul class="errorlist"><li>Either backing_device or backing_partition must be specified.</li></ul></li><li>backing_device<ul class="errorlist"><li>Select a valid choice. 99 is not one of the available choices.</li></ul></li></ul>
 Traceback (most recent call last):
   File "/usr/lib/python2.7/threading.py", line 783, in __bootstrap
     self.__bootstrap_inner()
   File "/usr/lib/python2.7/threading.py", line 810, in __bootstrap_inner
     self.run()
   File "/usr/lib/python2.7/threading.py", line 763, in run
     self.__target(*self.__args, **self.__kwargs)
   File "/usr/lib/python2.7/dist-packages/provisioningserver/utils/twisted.py", line 793, in worker
     return target()
 --- <exception caught here> ---
   File "/usr/lib/python2.7/dist-packages/twisted/python/threadpool.py", line 191, in _worker
     result = context.call(ctx, function, *args, **kwargs)
   File "/usr/lib/python2.7/dist-packages/twisted/python/context.py", line 118, in callWithContext
     return self.currentContext().callWithContext(ctx, func, *args, **kw)
   File "/usr/lib/python2.7/dist-packages/twisted/python/context.py", line 81, in callWithContext
     return func(*args,**kw)
   File "/usr/lib/python2.7/dist-packages/provisioningserver/utils/twisted.py", line 826, in callInContext
     return func(*args, **kwargs)
   File "/usr/lib/python2.7/dist-packages/maasserver/utils/orm.py", line 501, in call_within_transaction
     return func_outside_txn(*args, **kwargs)
   File "/usr/lib/python2.7/dist-packages/maasserver/utils/orm.py", line 328, in retrier
     return func(*args, **kwargs)
   File "/usr/lib/python2.7/dist-packages/django/db/transaction.py", line 339, in inner
     return func(*args, **kwargs)
   File "/usr/lib/python2.7/dist-packages/maasserver/websockets/handlers/node.py", line 980, in create_bcache
     raise HandlerError(form.errors)
 maasserver.websockets.base.HandlerError: <ul class="errorlist"><li>__all__<ul class="errorlist"><li>Either backing_device or backing_partition must be specified.</li></ul></li><li>backing_device<ul class="errorlist"><li>Select a valid choice. 99 is not one of the available choices.</li></ul></li></ul>

Problems:
1. MAAS UI suggests it's possible to create bcache on a disk with free space but that does not work
2. MAAS UI does not show error message or create bcache as requested

Ideally default behavior should be to just use all free disk space as backing device but simple error message similar to "Please create partition first" would do the job

Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name Version Architecture Description
+++-===========================================================-=============================================-============-===============================================================================
un maas <none> <none> (no description available)
ii maas-cli 1.9.3+bzr4577-0ubuntu1~trusty1 all MAAS command line API tool
un maas-cluster-controller <none> <none> (no description available)
ii maas-common 1.9.3+bzr4577-0ubuntu1~trusty1 all MAAS server common files
un maas-dhcp <none> <none> (no description available)
ii maas-dns 1.9.3+bzr4577-0ubuntu1~trusty1 all MAAS DNS server
ii maas-proxy 1.9.3+bzr4577-0ubuntu1~trusty1 all MAAS Caching Proxy
ii maas-region-controller 1.9.3+bzr4577-0ubuntu1~trusty1 all MAAS server complete region controller
ii maas-region-controller-min 1.9.3+bzr4577-0ubuntu1~trusty1 all MAAS Server minimum region controller
ii python-django-maas 1.9.3+bzr4577-0ubuntu1~trusty1 all MAAS server Django web framework
ii python-maas-client 1.9.3+bzr4577-0ubuntu1~trusty1 all MAAS python API client
ii python-maas-provisioningserver 1.9.3+bzr4577-0ubuntu1~trusty1 all MAAS server provisioning libraries

Related branches

Revision history for this message
Jacek Nykis (jacekn) wrote :
Revision history for this message
Jacek Nykis (jacekn) wrote :
Revision history for this message
Jacek Nykis (jacekn) wrote :
description: updated
Changed in maas:
milestone: none → 2.0.0
milestone: 2.0.0 → 2.1.0
summary: - Bcache creation is unintuitive and causes traceback
+ [1.9,2.0,UX] Bcache creation is unintuitive and causes traceback
summary: - [1.9,2.0,UX] Bcache creation is unintuitive and causes traceback
+ [1.9,2.0,UX] Creating a Bcache disk is not prevented when is not created
+ in partition
Changed in maas:
status: New → In Progress
importance: Undecided → High
assignee: nobody → Blake Rouse (blake-rouse)
Changed in maas:
status: In Progress → Fix Committed
Changed in maas:
milestone: 2.0.1 → none
status: Fix Committed → Fix Released
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.