-
Notifications
You must be signed in to change notification settings - Fork 139
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Upload config fail #2483 #2484
Upload config fail #2483 #2484
Conversation
Codefix provided by FroggyFlox. Tested by kanecko on 15.4 V4.5.5-0.
Thanks a lot, @kanecko, for taking the time to create this PR and of course for testing the proposed fix in #2483. A bit of explanation here, for reference. Although I cannot reproduce exactly the issue detailed in #2483, I can reproduce the HTTP 400 error (Bad request) upon uploading a config backup file. In my case, however, no response content at all is returned and nothing can be found in the logs (rockstor logs, or gunicorn logs). The only error I could find (in addition to the HTTP 400 response) was the following in
I thus looked further into Looking back into our Django side of things, we are dealing with this upload request in the rockstor-core/src/rockstor/storageadmin/views/config_backup.py Lines 628 to 629 in c99f9f8
We can here see we are using two parsers defined by Django Rest Framework:
This thus recommends the use of The question is why is this showing up as a problem now for us, however, as this has always been the case (and working thus far). Note that #2483 appeared in 4.5.4, which could thus be related to our Django version update, or Django Rest Framework update. @phillxnet, as you can see above, the reason why the error appeared is still uncleared to me and maybe we should look into this a bit further to make sure we're not missing the real reason for #2483 here. It may not be worth wasting too much time on that, however, as given DRF's docs quoted above, using only |
@kanecko Thanks from me also for testing and preparing this pr and attributing @FroggyFlox . Much appreciated. @FroggyFlox Thanks for the exposition here, always best if we can have some context as to why, or why we think :) , a change was required. Other than the operational definition of course.
Agreed. I'll do a final build test and if all is well I'll get this merged ready for our pending 4.5.6-0 release. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And rpm built and installed with this patch applied, successfully passed the testing outlined by @FroggyFlox in the following comment #2483 (comment) under the linked issue of #2483:
[25/Jan/2023 16:01:45] INFO [storageadmin.tasks:64] Task [restore_rockons], id: 70715cb9-7087-455c-8dc2-3743f2aad96f completed OK
Codefix provided by @FroggyFlox .
Tested by @kanecko on 15.4 V4.5.5-0.
[EDIT]
Fixes #2483
See issue text/comments for details.