[one-users] strange EC2 beahvior in 4.8

Daniel Molina dmolina at opennebula.org
Thu Oct 2 02:25:19 PDT 2014


Hi Olivier,

I found out the problem, and indeed is a bug. You can fix it applying the
following patch:

diff --git a/src/cloud/ec2/lib/instance.rb b/src/cloud/ec2/lib/instance.rb
index 1d069a8..34203df 100644
--- a/src/cloud/ec2/lib/instance.rb
+++ b/src/cloud/ec2/lib/instance.rb
@@ -128,7 +128,8 @@ module Instance
                 end
             }
         else
-            template_pool = TemplatePool.new(@client)
+            user_flag = OpenNebula::Pool::INFO_ALL
+            template_pool = TemplatePool.new(@client, user_flag)
             rc = template_pool.info
             if OpenNebula::is_error?(rc)
                 return rc

Thank you for your feedback


On 30 September 2014 14:48, Olivier Sallou <olivier.sallou at irisa.fr> wrote:

>
> On 09/30/2014 11:06 AM, Daniel Molina wrote:
>
> Hi Olivier,
>
>  Did you fix this issue? I cannot reproduce it
>
> Setting ownership of the template group , plus setting "use" access to
> "group" and "others" fixes the issue. So I do not have the problem anymore
> with this modification, but I wonder why, as "others" have a "use"
> permission. And I do not see such requirement in documentation (or missed
> it).
>
> Olivier
>
>
>  Cheers
>
> On 24 September 2014 15:45, Olivier Sallou <olivier.sallou at irisa.fr>
> wrote:
>
>>  All users have use permissions on image. And as I said, template group
>> ownership modification fix the issue...
>>
>>
>>
>>
>>
>>
>> On 09/24/2014 01:06 PM, Daniel Molina wrote:
>>
>> Hi Olivier,
>>
>>  What about the image (280) permissions?
>>
>>  Cheers
>>
>> On 24 September 2014 10:18, Olivier Sallou <olivier.sallou at irisa.fr>
>> wrote:
>>
>>> As more info,
>>> if  I change the group ownership of the template to users instead of
>>> oneadmin it works.
>>>
>>> However, as Permissions to Use on Other are set, it should work.
>>>
>>> Olivier
>>>
>>> On 09/24/2014 10:16 AM, Olivier Sallou wrote:
>>> > I have updated my config to use the EC2 templates in one instead of old
>>> > template files.
>>> > It works fine when I am the oneadmin user.
>>> >
>>> > However, when I am using an other user I have this error when I create
>>> a
>>> > new VM:
>>> >
>>> > Unexpected server error. response.body is:
>>> >
>>> <Response><RequestId/><Errors><Error><Code>InvalidInstanceAttributeValue.NotFound</Code><Message>InvalidInstanceAttributeValue.NotFound
>>> > m1.small</Message></Error></Errors></Response>
>>> >
>>> >
>>> > The code is:
>>> >
>>> >     response = ec2.run_instances(
>>> >               :image_id       => 'ami-00000280',
>>> >               :min_count      => 1,
>>> >               :max_count      => 1,
>>> >               :instance_type  => 'm1.small',
>>> >               :user_data      => user_data,
>>> >               :base64_encoded => true
>>> >               )
>>> >
>>> > It works fine if I use the oneadmin credentials, but not for other
>>> users.
>>> >
>>> > m1.small is a template in one:
>>> >
>>> > TEMPLATE 143
>>> > INFORMATION
>>> > ID             : 143
>>> > NAME           : m1.small
>>> > USER           : oneadmin
>>> > GROUP          : oneadmin
>>> > REGISTER TIME  : 09/23 10:26:52
>>> >
>>> > PERMISSIONS
>>> >
>>> > OWNER          : um-
>>> > GROUP          : u--
>>> > OTHER          : u--
>>> >
>>> > All users have USE right access.
>>> >
>>> > Any idea?
>>> >
>>> > Thanks
>>> >
>>> > Olviier
>>> >
>>>
>>> --
>>>  Olivier Sallou
>>> IRISA / University of Rennes 1
>>> Campus de Beaulieu, 35000 RENNES - FRANCE
>>> Tel: 02.99.84.71.95
>>>
>>> gpg key id: 4096R/326D8438  (keyring.debian.org)
>>> Key fingerprint = 5FB4 6F83 D3B9 5204 6335  D26D 78DC 68DB 326D 8438
>>>
>>> _______________________________________________
>>> Users mailing list
>>> Users at lists.opennebula.org
>>> http://lists.opennebula.org/listinfo.cgi/users-opennebula.org
>>>
>>
>>
>>
>>  --
>>  --
>>  Daniel Molina
>> Project Engineer
>> OpenNebula - Flexible Enterprise Cloud Made Simple
>> www.OpenNebula.org | dmolina at opennebula.org | @OpenNebula
>>
>>
>> --
>> Olivier Sallou
>> IRISA / University of Rennes 1
>> Campus de Beaulieu, 35000 RENNES - FRANCE
>> Tel: 02.99.84.71.95
>>
>> gpg key id: 4096R/326D8438  (keyring.debian.org)
>> Key fingerprint = 5FB4 6F83 D3B9 5204 6335  D26D 78DC 68DB 326D 8438
>>
>>
>>
>
>
>  --
>  --
>  Daniel Molina
> Project Engineer
> OpenNebula - Flexible Enterprise Cloud Made Simple
> www.OpenNebula.org | dmolina at opennebula.org | @OpenNebula
>
>
> --
> Olivier Sallou
> IRISA / University of Rennes 1
> Campus de Beaulieu, 35000 RENNES - FRANCE
> Tel: 02.99.84.71.95
>
> gpg key id: 4096R/326D8438  (keyring.debian.org)
> Key fingerprint = 5FB4 6F83 D3B9 5204 6335  D26D 78DC 68DB 326D 8438
>
>
>


-- 
--
Daniel Molina
Project Engineer
OpenNebula - Flexible Enterprise Cloud Made Simple
www.OpenNebula.org | dmolina at opennebula.org | @OpenNebula
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opennebula.org/pipermail/users-opennebula.org/attachments/20141002/ee9ea273/attachment-0001.htm>


More information about the Users mailing list