Horizon Dashboard incompatible (partially) with Apple Safari 11.1 browser

Bug #1766678 reported by Javier Diaz Jr
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Mirantis OpenStack
Invalid
Medium
MOS Maintenance
8.0.x
Invalid
Medium
MOS Maintenance

Bug Description

Detailed bug description:

Confirmed in MOS 8.0 - MOS 9.2

Creating an instance from the Horizon dashboard results in the following error message:

Danger: There was an error submitting the form. Please try again.

Upon further review in the /var/log/horizon/horizon.log I find the following traceback:

```
2018-04-24 17:47:33,091 17773 ERROR django.request Internal Server Error: /horizon/project/instances/launch
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/django/core/handlers/base.py", line 104, in get_response
    response = middleware_method(request, callback, callback_args, callback_kwargs)
  File "/usr/lib/python2.7/dist-packages/django/middleware/csrf.py", line 174, in process_view
    request_csrf_token = request.POST.get('csrfmiddlewaretoken', '')
  File "/usr/lib/python2.7/dist-packages/django/core/handlers/wsgi.py", line 135, in _get_post
    self._load_post_and_files()
  File "/usr/lib/python2.7/dist-packages/django/http/request.py", line 233, in _load_post_and_files
    self._post, self._files = self.parse_file_upload(self.META, data)
  File "/usr/lib/python2.7/dist-packages/django/http/request.py", line 198, in parse_file_upload
    return parser.parse()
  File "/usr/lib/python2.7/dist-packages/django/http/multipartparser.py", line 146, in parse
    for item_type, meta_data, field_stream in Parser(stream, self._boundary):
  File "/usr/lib/python2.7/dist-packages/django/http/multipartparser.py", line 618, in __iter__
    for sub_stream in boundarystream:
  File "/usr/lib/python2.7/dist-packages/django/utils/six.py", line 535, in next
    return type(self).__next__(self)
  File "/usr/lib/python2.7/dist-packages/django/http/multipartparser.py", line 431, in __next__
    return LazyStream(BoundaryIter(self._stream, self._boundary))
  File "/usr/lib/python2.7/dist-packages/django/http/multipartparser.py", line 458, in __init__
    unused_char = self._stream.read(1)
  File "/usr/lib/python2.7/dist-packages/django/http/multipartparser.py", line 329, in read
    out = b''.join(parts())
  File "/usr/lib/python2.7/dist-packages/django/http/multipartparser.py", line 322, in parts
    chunk = next(self)
  File "/usr/lib/python2.7/dist-packages/django/utils/six.py", line 535, in next
    return type(self).__next__(self)
  File "/usr/lib/python2.7/dist-packages/django/http/multipartparser.py", line 344, in __next__
    output = next(self._producer)
  File "/usr/lib/python2.7/dist-packages/django/utils/six.py", line 535, in next
    return type(self).__next__(self)
  File "/usr/lib/python2.7/dist-packages/django/http/multipartparser.py", line 406, in __next__
    data = self.flo.read(self.chunk_size)
  File "/usr/lib/python2.7/dist-packages/django/http/request.py", line 267, in read
    six.reraise(UnreadablePostError, UnreadablePostError(*e.args), sys.exc_info()[2])
  File "/usr/lib/python2.7/dist-packages/django/http/request.py", line 265, in read
    return self._stream.read(*args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/django/core/handlers/wsgi.py", line 59, in read
    result = self.buffer + self._read_limited(size - len(self.buffer))
  File "/usr/lib/python2.7/dist-packages/django/core/handlers/wsgi.py", line 47, in _read_limited
    result = self.stream.read(size)
UnreadablePostError: Apache/mod_wsgi request data read error: Partial results are valid but processing is incomplete.
```

This is an issue for one particular customer as MacOS + Safari is their primary OS+Browser.

Steps to reproduce:

1. On Apple Safari Version 11.1 (13605.1.33.1.2) go to Horizon Dashboard.
2. Create instance.
3. Error produced.

Expected results:

1. Launching an instance should complete successfully.

Actual result:

See detailed bug description.

Reproducibility:

100% of the time.

Workaround:

User alternate browser or downgrade Safari.

Impact:
For most people this might not be an issue. However, customer requires use of Safari. Impact is high for them.

Changed in mos:
milestone: none → 9.x-updates
milestone: 9.x-updates → 8.0-updates
milestone: 8.0-updates → 9.x-updates
Changed in mos:
importance: Undecided → Medium
milestone: 9.x-updates → 9.2-mu-6
assignee: nobody → MOS Maintenance (mos-maintenance)
status: New → Confirmed
no longer affects: mos/9.x
Revision history for this message
Denis Meltsaykin (dmeltsaykin) wrote :

So far the root cause is not found. I only see that Safari 11 sends a partially filled POST form and wsgi doesn't recognize this as valid data. This behavior is not observed with other browsers. Mitaka is not affected too, but I didn't find much difference in django wsgi data handling and used JS-libraries are totally the same as for Liberty.

Revision history for this message
Denis Meltsaykin (dmeltsaykin) wrote :
Revision history for this message
Denis Meltsaykin (dmeltsaykin) wrote :
Revision history for this message
Denis Meltsaykin (dmeltsaykin) wrote :

As a workaround you can attach a local file in "Post-Creation" tab, if changing a browser to something more adequate like Chrome is not an option. Or you can wait until the fix reaches the stable version of Safari. But an empty "file" option in a POST form is a valid option, so I don't see any reason to hack this in Horizon.

Revision history for this message
Denis Meltsaykin (dmeltsaykin) wrote :

Setting as Invalid, since the bug in Safari, not in Horizon.

Changed in mos:
status: Confirmed → Invalid
Changed in mos:
milestone: 9.2-mu-6 → 9.x-updates
Revision history for this message
Denis Meltsaykin (dmeltsaykin) wrote :

Checked with the most recent Safari Technology Preview Release 56 (Safari 11.2, WebKit 12606.1.17.2.2) and the issue is gone.

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.