Bug #4041
sunstone problems when retrieving resource information
Status: | Closed | Start date: | 10/08/2015 | |
---|---|---|---|---|
Priority: | Normal | Due date: | ||
Assignee: | - | % Done: | 0% | |
Category: | Sunstone | |||
Target version: | - | |||
Resolution: | Pull request: | |||
Affected Versions: | OpenNebula 4.14 |
Description
I have opennebula 4.14 installed in Debian 7.
In sunstone there is a problem. For any resource it returns error message that it doesn't exists.
By looking into sunstone.log I found entries:
... GET /vm/8509?id=8509&csrftoken=XXX ...
and error message shows missing entry for 85098509 what looks like duplication of resource id.
In older 4.12 requests are send without id= part in URL.
As a workaround I put into sunstone-server.rb:
... get '/:resource/:id' do l = params[:id].length / 2 - 1 params[:id] = params[:id][0..l] if params[:extended] ...
and it works.
I think something is wrong in sunstone javascript code.
History
#1 Updated by Daniel Molina almost 6 years ago
Hi Rolandas,
Could you check if there is any error in the browser developer console?
#2 Updated by Rolandas Naujikas almost 6 years ago
No errors in Firefox 41.0.1 or Google Chrome 45.0.2454.101.
#3 Updated by Daniel Molina almost 6 years ago
- What view are you using?
- Do you have any extension or custom tab?
- Did you change anything in the sunstone yaml files?
#4 Updated by Daniel Molina almost 6 years ago
- Ruby version
- What server are you using tu run sunstone (thin, passenger...)
#5 Updated by Daniel Molina almost 6 years ago
- sinatra gem version would be also useful
#6 Updated by Rolandas Naujikas almost 6 years ago
Daniel Molina wrote:
Let's try to find out the problem, since I cannot reproduce it:
- What view are you using?
In user or admin at least.
- Do you have any extension or custom tab?
No.
- Did you change anything in the sunstone yaml files?
Only disabled support tab in admin view and enabled some more VM tabs for user.
But problem is for any object/resource (VM, Image, Template, ...)
#7 Updated by Rolandas Naujikas almost 6 years ago
$ ruby -v ruby 1.9.3p194 (2012-04-20 revision 35410) [x86_64-linux] $ thin -v thin 1.3.1 codename Triple Espresso $ dpkg -s ruby-sinatra ... Version: 1.3.2-2 ...
sunstone is running from sunstone-server -- means thin is used.
Daniel Molina wrote:
- sinatra gem version would be also useful
#8 Updated by Daniel Molina almost 6 years ago
Probably, it will be a sinatra/ruby version issue. Did it change in your system since one-4.12?
Anyway, we will include the following change to avoid this issue in one-4.14.1:
https://gist.github.com/dmamolina/32e9fe8a426b9b26e82e
#9 Updated by Rolandas Naujikas almost 6 years ago
Installed json(1.8.3)/sinatra(1.4.6)/thin(1.6.4) from gems - no more problems, but URL still contains id=.
#10 Updated by Daniel Molina almost 6 years ago
Yes, the id in the url should not be a problem. What distro are you using?
#11 Updated by Rolandas Naujikas almost 6 years ago
Daniel Molina wrote:
Yes, the id in the url should not be a problem. What distro are you using?
Debian 7 for the moment. Still have some instances on Debian 6 (on 4.12), but didn't try to upgrade to 4.14.
Will try to upgrade OS to Debian 8.
#12 Updated by Tino Vázquez almost 4 years ago
- Status changed from Pending to Closed
Cannot reproduce, please reopen if it also happens in 5.4