deltacloud-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Marios Andreou (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (DTACLOUD-248) unable to change the provider (region) with ec2 driver
Date Wed, 04 Jul 2012 12:04:36 GMT

     [ https://issues.apache.org/jira/browse/DTACLOUD-248?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Marios Andreou updated DTACLOUD-248:
------------------------------------

    Attachment: 0001-Addresses-JIRA-DTACLOUD_248-frozen-string-1.8-vs-1.9.patch

Attached patch should fix this.


Another 1.8 vs 1.9 compatibility issue:

[marios@name deltacloud]$ ruby -v
ruby 1.8.7 (2012-02-08 patchlevel 358) [i386-linux]
[marios@name deltacloud]$ irb
irb(main):001:0> s = "api[provider]=eu-west-1".freeze
=> "api[provider]=eu-west-1"
irb(main):002:0> s.gsub!(/;([^\/]*)/, '')
=> nil


marios@name deltacloud]$ ruby -v
ruby 1.9.2p290 (2011-07-09 revision 32553) [i686-linux]
[marios@name deltacloud]$ irb
1.9.2p290 :001 > s = "api[provider]=eu-west-1".freeze
 => "api[provider]=eu-west-1" 
1.9.2p290 :002 >  s.gsub!(/;([^\/]*)/, '')
RuntimeError: can't modify frozen string
        from (irb):2:in `gsub!'
        from (irb):2
        from /home/marios/.rvm/rubies/ruby-1.9.2-p290/bin/irb

Explanation seems to be that in 1.8, gsub will not fail on a frozen string if the gsub operation
doesn't actually modify the string. In 1.9 gsub on frozen string will explode either way...
relevant: http://bugs.ruby-lang.org/issues/3200

marios
                
> unable to change the provider (region) with ec2 driver
> ------------------------------------------------------
>
>                 Key: DTACLOUD-248
>                 URL: https://issues.apache.org/jira/browse/DTACLOUD-248
>             Project: DeltaCloud
>          Issue Type: Bug
>          Components: Server, Website
>         Environment: Ubuntu, Deltacloud1.0.0
>            Reporter: Deepika Agrawal
>            Priority: Critical
>              Labels: deltacloudd, ec2, provider
>         Attachments: 0001-Addresses-JIRA-DTACLOUD_248-frozen-string-1.8-vs-1.9.patch,
changeProvider.png, changeProviderResponse.png
>
>
> Hi,
> Trying to change the provider (region) with ec2 driver from GUI. The response at server
shows:
> 172.30.54.46 - - [04/Jul/2012 10:48:58] "POST /api HTTP/1.1" 301 - 0.6828
> can't modify frozen string
> 	/var/lib/gems/1.9.1/gems/deltacloud-core-1.0.0/lib/sinatra/rack_matrix_params.rb:95:in
`gsub!'
> 	/var/lib/gems/1.9.1/gems/deltacloud-core-1.0.0/lib/sinatra/rack_matrix_params.rb:95:in
`call'
> 	/var/lib/gems/1.9.1/gems/rack-1.4.1/lib/rack/builder.rb:134:in `call'
> 	/var/lib/gems/1.9.1/gems/thin-1.3.1/lib/thin/connection.rb:80:in `block in pre_process'
> 	/var/lib/gems/1.9.1/gems/thin-1.3.1/lib/thin/connection.rb:78:in `catch'
> 	/var/lib/gems/1.9.1/gems/thin-1.3.1/lib/thin/connection.rb:78:in `pre_process'
> 	/var/lib/gems/1.9.1/gems/eventmachine-0.12.10/lib/eventmachine.rb:1060:in `call'
> 	/var/lib/gems/1.9.1/gems/eventmachine-0.12.10/lib/eventmachine.rb:1060:in `block in
spawn_threadpool'can't modify frozen string
> 	/var/lib/gems/1.9.1/gems/deltacloud-core-1.0.0/lib/sinatra/rack_matrix_params.rb:95:in
`gsub!'
> 	/var/lib/gems/1.9.1/gems/deltacloud-core-1.0.0/lib/sinatra/rack_matrix_params.rb:95:in
`call'
> 	/var/lib/gems/1.9.1/gems/rack-1.4.1/lib/rack/builder.rb:134:in `call'
> 	/var/lib/gems/1.9.1/gems/thin-1.3.1/lib/thin/connection.rb:80:in `block in pre_process'
> 	/var/lib/gems/1.9.1/gems/thin-1.3.1/lib/thin/connection.rb:78:in `catch'
> 	/var/lib/gems/1.9.1/gems/thin-1.3.1/lib/thin/connection.rb:78:in `pre_process'
> 	/var/lib/gems/1.9.1/gems/eventmachine-0.12.10/lib/eventmachine.rb:1060:in `call'
> 	/var/lib/gems/1.9.1/gems/eventmachine-0.12.10/lib/eventmachine.rb:1060:in `block in
spawn_threadpool'

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Mime
View raw message