Bug #560
Sunstone crashes when adding/updating a VM images attribute
Status: | Closed | Start date: | 04/02/2011 | |
---|---|---|---|---|
Priority: | High | Due date: | ||
Assignee: | Hector Sanjuan | % Done: | 0% | |
Category: | Sunstone | |||
Target version: | Release 2.2 | |||
Resolution: | invalid | Pull request: | ||
Affected Versions: |
Description
Steps:
- log in as oneadmin
- list VM images
- select a non public VM image
- select update attribute
- insert PUBLIC as name, yes as value
or
- log in as oneadmin
- list VM images
- select a non public VM image
- select add attribute
- insert PUBLIC as name, yes as value
the server hangs and the log displays:
(update)
217.133.20.189 - - [02/Apr/2011 10:25:18] "GET /image?timeout=false HTTP/1.1" 200 584 0.0241
/usr/bin/ruby: symbol lookup error: /usr/lib/ruby/gems/1.8/gems/json-1.5.1/ext/json/ext/json/ext/parser.so: undefined symbol: RSTRING_PTR
(add)
217.133.20.189 - - [02/Apr/2011 10:32:59] "GET /image?timeout=false HTTP/1.1" 200 584 0.0245
/usr/bin/ruby: symbol lookup error: /usr/lib/ruby/gems/1.8/gems/json-1.5.1/ext/json/ext/json/ext/parser.so: undefined symbol: RSTRING_PTR
Restarting the sunstone service restores full functionality (but you must log on again)
History
#1 Updated by Hector Sanjuan over 10 years ago
I cannot reproduce this bug in ruby 1.8.7 nor 1.9.2 with the json-1.5.1 gem on the master sunstone version (unstable but without major changes that could cause this). Can you give some more information about the versions you are using (opennebula, ruby, browser...). Attributes are added, updated and removed correctly.
Still, Im not sure if that was your intent, but in order to make an image public you need to hit 'publish' in the drop-down action menu, as adding the PUBLIC attribute will not make it.
Regards
#2 Updated by Gian Uberto Lauri over 10 years ago
My fault not mentioning that I use:
ruby 1.8.6 (2010-02-05 patchlevel 399) [x86_64-linux]
which is currently the latest version available on CentOS 5 (just ran yum to ckeck). The machine is rated "production", so it must use software out of the distribution repository, I can't go to search different versions of ruby.
I agree that is not the correct way to make an image public, but by no mean the server has to crash, the error must be trapped and handled correctly and, in case of user fault, an appropriate message should be displayed.
#3 Updated by Hector Sanjuan over 10 years ago
Hi, maybe your json gem is not compiled for your current version of ruby? Can you try reinstalling it?
#4 Updated by Gian Uberto Lauri over 10 years ago
Nice suggestion Hector! Problem fixed, the server does not crash any more.
#5 Updated by Hector Sanjuan over 10 years ago
- Status changed from New to Closed
- Assignee changed from Jaime Melis to Hector Sanjuan
- Resolution set to invalid
Nice! Will close this ticket then.