← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1854262] [NEW] Django image upload failed when not enough disk space with unrelated exception

 

Public bug reported:

Currently, when horizon use direct file upload for glance image upload
and horizon server does not enough disk space for temporary file,
horizon meets 'KeyError' for 'visibility'.

I think root cause of comment 31 in
https://bugzilla.redhat.com/show_bug.cgi?id=1508725 is same as what I
saw.

Master version of horizon allow empty params of 'visibility' so I guess
master will have something different exception though, I think root
problem is still valid in master too.

Root cause I assume is that

- When request.POST is accessed (openstack_dashboard/api/rest/utils.py post2data())
- Django multipartpaser start to parse
- It does not emit any exception when IOError(No disk space) occurred only with error hint which is emtpy POST dict.
- request.DATA is empty dict {} since request.POST is emtpy.
- [Bug here] Logic access request.DATA is all invalid since this dict is empty. (Actually from my environment, OCata, 'visibility' key is first location that I find KeyError.

Sugguestion

- Raise some exception when Django request.POST is empty when we assume
it's filled with multipart data.

I'm not 100% sure since it's just result of only the phenomenon, so
please correct me what i'm missing if there.

Thanks

** Affects: horizon
     Importance: Undecided
         Status: New

** Description changed:

  Currently, when horizon use direct file upload for glance image upload
  and horizon server does not enough disk space for temporary file,
  horizon meets 'KeyError' for 'visibility'.
  
  I think root cause of comment 31 in
  https://bugzilla.redhat.com/show_bug.cgi?id=1508725 is same as what I
  saw.
  
- Master version of horizon have empty params of 'visibility' so I guess
+ Master version of horizon allow empty params of 'visibility' so I guess
  master will have something different exception though, I think root
  problem is still valid in master too.
  
  Root cause I assume is that
  
  - When request.POST is accessed (openstack_dashboard/api/rest/utils.py post2data())
  - Django multipartpaser start to parse
  - It does not emit any exception when IOError(No disk space) occurred only with error hint which is emtpy POST dict.
  - request.DATA is empty dict {} since request.POST is emtpy.
  - [Bug here] Logic access request.DATA is all invalid since this dict is empty. (Actually from my environment, OCata, 'visibility' key is first location that I find KeyError.
  
- 
  Sugguestion
  
  - Raise some exception when Django request.POST is empty when we assume
  it's filled with multipart data.
  
  I'm not 100% sure since it's just result of only the phenomenon, so
  please correct me what i'm missing if there.
  
  Thanks

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to OpenStack Dashboard (Horizon).
https://bugs.launchpad.net/bugs/1854262

Title:
  Django image upload failed when not enough disk space with unrelated
  exception

Status in OpenStack Dashboard (Horizon):
  New

Bug description:
  Currently, when horizon use direct file upload for glance image upload
  and horizon server does not enough disk space for temporary file,
  horizon meets 'KeyError' for 'visibility'.

  I think root cause of comment 31 in
  https://bugzilla.redhat.com/show_bug.cgi?id=1508725 is same as what I
  saw.

  Master version of horizon allow empty params of 'visibility' so I
  guess master will have something different exception though, I think
  root problem is still valid in master too.

  Root cause I assume is that

  - When request.POST is accessed (openstack_dashboard/api/rest/utils.py post2data())
  - Django multipartpaser start to parse
  - It does not emit any exception when IOError(No disk space) occurred only with error hint which is emtpy POST dict.
  - request.DATA is empty dict {} since request.POST is emtpy.
  - [Bug here] Logic access request.DATA is all invalid since this dict is empty. (Actually from my environment, OCata, 'visibility' key is first location that I find KeyError.

  Sugguestion

  - Raise some exception when Django request.POST is empty when we
  assume it's filled with multipart data.

  I'm not 100% sure since it's just result of only the phenomenon, so
  please correct me what i'm missing if there.

  Thanks

To manage notifications about this bug go to:
https://bugs.launchpad.net/horizon/+bug/1854262/+subscriptions