Project

General

Profile

Bug #26555

Fix traceback when creating a volume after destroying the old volume

Added by Bonnie Follweiler about 1 year ago. Updated about 1 year ago.

Status:
Resolved
Priority:
No priority
Assignee:
Marcelo Araujo
Category:
GUI (new)
Target version:
Seen in:
Severity:
New
Reason for Closing:
Reason for Blocked:
Needs QA:
No
Needs Doc:
Yes
Needs Merging:
Yes
Needs Automation:
No
Support Suite Ticket:
n/a
Hardware Configuration:
ChangeLog Required:
No

Description

I destroyed the volume called tank
I clicked Volume Manager to create a tank with a different name
I got a Traceback error and it didn't create the volume

Request Method: POST
Request URL: http://10.20.20.175/storage/volumemanager/
Software Version: FreeNAS-11.1-RC1 (ff06285bd)
Exception Type: MiddlewareError
Exception Value:

[MiddlewareError: Unable to GPT format the disk "ada1": gpart: geom 'ada1': File exists
]

Exception Location: ./freenasUI/middleware/notifier.py in __gpt_labeldisk, line 359
Server time: Wed, 8 Nov 2017 07:40:05 -0800

Traceback
Environment:

Software Version: FreeNAS-11.1-RC1 (ff06285bd)
Request Method: POST
Request URL: http://10.20.20.175/storage/volumemanager/

Traceback:
File "/usr/local/lib/python3.6/site-packages/django/core/handlers/exception.py" in inner
42. response = get_response(request)
File "/usr/local/lib/python3.6/site-packages/django/core/handlers/base.py" in legacy_get_response
249. response = self._get_response(request)
File "/usr/local/lib/python3.6/site-packages/django/core/handlers/base.py" in _get_response
178. response = middleware_method(request, callback, callback_args, callback_kwargs)
File "./freenasUI/freeadmin/middleware.py" in process_view
162. return login_required(view_func)(request, *view_args, **view_kwargs)
File "/usr/local/lib/python3.6/site-packages/django/contrib/auth/decorators.py" in _wrapped_view
23. return view_func(request, *args, **kwargs)
File "./freenasUI/storage/views.py" in volumemanager
147. if form.is_valid() and form.save():
File "./freenasUI/storage/forms.py" in save
298. notifier().create_volume(volume, groups=grouped, init_rand=init_rand)
File "./freenasUI/middleware/notifier.py" in create_volume
750. vdevs = self.
_prepare_zfs_vdev(vgrp['disks'], vdev_swapsize, encrypt, volume)
File "./freenasUI/middleware/notifier.py" in __prepare_zfs_vdev
685. swapsize=swapsize)
File "./freenasUI/middleware/notifier.py" in __gpt_labeldisk
359. raise MiddlewareError(f'Unable to GPT format the disk "{devname}": {error}')

Exception Type: MiddlewareError at /storage/volumemanager/
Exception Value: [MiddlewareError: Unable to GPT format the disk "ada1": gpart: geom 'ada1': File exists
]

Request information
GET

No GET data
POST
Variable Value
all ''
volume_name 'minitank'
layout-__all__ ''
layout-TOTAL_FORMS '1'
layout-INITIAL_FORMS '0'
layout-0-vdevtype 'mirror'
layout-0-disks 'ada2'
__form_id 'dijit_form_Form_9'
FILES

No FILES data
COOKIES
Variable Value
csrftoken '695gCpwRAYQvkaSTzL3BtdPUUw32uWVMntbSpUzP6DTPrIGCrzPKmYL0oxVTcr8f'
fntreeSaveStateCookie 'root%2Croot%2F1%2Croot%2F1%2F5'
sessionid 'bqm1my70d3ew5t3cx9d3pqbq586ghwuf'
META
Variable Value

Associated revisions

Revision 2355af4d (diff)
Added by Marcelo Araujo about 1 year ago

fix(middlewared/vm): Prior to destroy a volume we need to stop all guest vms attached to it or otherwise the volume is busy and we can't perform the action.

Ticket: #26555

Revision 2625b4cb (diff)
Added by Marcelo Araujo about 1 year ago

fix(middlewared/vm): Prior to destroy a volume we need to stop all guest vms attached to it or otherwise the volume is busy and we can't perform the action.

Ticket: #26555

Revision 6391ac62 (diff)
Added by Marcelo Araujo about 1 year ago

[MASTER] Prior to destroy a volume we need to stop all guest vms attached to it or otherwise the volume is busy and we can't perform the action. (#498)

  • fix(middlewared/vm): Prior to destroy a volume we need to stop all guest vms attached to it or otherwise the volume is busy and we can't perform the action.

Ticket: #26555

  • fix(vm): When delete a volume, we need to show to the user the VM is using that pool. Also if user agree to delete the shares, we delete the guest DISK and/or RAW if it is attached to the pool.
  • fix(middlewared/vm): Pet flake8.

Revision c116928e (diff)
Added by Marcelo Araujo about 1 year ago

[STABLE] Prior to destroy a volume we need to stop all guest vms attached to it or otherwise the volume is busy and we can't perform the action. (#497)

  • fix(middlewared/vm): Make guest vm name be unique, now we combine the guest name with its id number.
  • fix(middlewared/vm): Prior to destroy a volume we need to stop all guest vms attached to it or otherwise the volume is busy and we can't perform the action.

Ticket: #26555

  • fix(vm): When delete a volume, we need to show to the user the VM is using that pool. Also if user agree to delete the shares, we delete the guest DISK and/or RAW if it is attached to the pool.
  • fix(middlewared/vm): Pet flake8.

History

#2 Updated by Bonnie Follweiler about 1 year ago

  • File debug-QA-mini01-20171108074448.tgz added

#3 Updated by Bonnie Follweiler about 1 year ago

  • Subject changed from Traceback Error when creating a volume after destroying the old volume to Traceback Error when trying to create a volume after destroying the old volume

#4 Updated by William Grzybowski about 1 year ago

  • Assignee changed from William Grzybowski to Marcelo Araujo
  • Target version set to 11.1

Marcelo, it seems that if a VM is running when you try to destroy a pool it will fail (obviously, pool busy).

I think we need to stop VMs on pool destroy, just like we do with jails and other services.

#5 Avatar?id=14398&size=24x24 Updated by Kris Moore about 1 year ago

  • Target version changed from 11.1 to 11.1-U1

#6 Updated by Marcelo Araujo about 1 year ago

  • Status changed from Unscreened to Screened
  • Target version changed from 11.1-U1 to 11.1

#7 Updated by Marcelo Araujo about 1 year ago

William Grzybowski wrote:

Marcelo, it seems that if a VM is running when you try to destroy a pool it will fail (obviously, pool busy).

I think we need to stop VMs on pool destroy, just like we do with jails and other services.

Hi,

Could you point me out where we are stopping the services and jails?

I made some tests with OLD UI and NEW UI using jails, both of them I have the same issue like with VM.

As an example in the NEW UI when I try to destroy the dataset where JAILS live:
cannot unmount '/mnt/iocage/download/11.1-RELEASE': Device busy

Best,

#8 Updated by Dru Lavigne about 1 year ago

  • Status changed from Screened to 15
  • Assignee changed from Marcelo Araujo to William Grzybowski

#9 Updated by William Grzybowski about 1 year ago

  • Status changed from 15 to Screened
  • Assignee changed from William Grzybowski to Marcelo Araujo

#10 Updated by Marcelo Araujo about 1 year ago

  • Status changed from Screened to Needs Developer Review
  • Assignee changed from Marcelo Araujo to William Grzybowski

#11 Updated by William Grzybowski about 1 year ago

  • Status changed from Needs Developer Review to Reviewed by Developer
  • Assignee changed from William Grzybowski to Marcelo Araujo

#12 Updated by Dru Lavigne about 1 year ago

  • Subject changed from Traceback Error when trying to create a volume after destroying the old volume to Fix traceback when creating a volume after destroying the old volume
  • Status changed from Reviewed by Developer to Ready For Release
  • Target version changed from 11.1 to 11.1-RC2

#13 Updated by Bonnie Follweiler about 1 year ago

  • Needs QA changed from Yes to No
  • QA Status Test Passes FreeNAS added
  • QA Status deleted (Not Tested)

#14 Updated by Dru Lavigne about 1 year ago

  • Target version changed from 11.1-RC2 to 11.1-RC3

#15 Updated by Dru Lavigne about 1 year ago

  • Status changed from Ready For Release to Resolved

#16 Updated by Dru Lavigne about 1 year ago

  • File deleted (debug-QA-mini01-20171108074448.tgz)

Also available in: Atom PDF