<div dir="ltr">Hi,<br><br>Maybe I understood this option -<br><br>Instead of adding one more relation to glance, I can relate my charm to new relation 'cinder-volume-service'<br><br>So there is no more changes in the glance charm.<br>And additional in my charm will be -<br><br>metadata.yaml -<br><b>subordinate: true<br>provides:<br>  image-backend:<br>    interface: cinder<br>    scope: container</b><br><br><br>and then I can relate my charm to glance (and my charm will be installed in the same container as glance, so I can configure OS)<br><b>juju add-relation glance:cinder-volume-service scaleio-openstack:image-backend</b><div><b><br></b></div><div>This option works for me - I don't need to add something to glance config. I'm only need to add files to /etc/glance/rootwrap.d/</div><div>and this option allows to do it.</div><div><br></div><div>I've made additional review - <a href="https://review.openstack.org/#/c/350565/">https://review.openstack.org/#/c/350565/</a></div><div>But I don't need it :)</div><div>Should I abandon it or not?</div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Aug 2, 2016 at 6:15 PM, James Page <span dir="ltr"><<a href="mailto:james.page@ubuntu.com" target="_blank">james.page@ubuntu.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hi Andrey<br><div><br><div class="gmail_quote"><span class=""><div dir="ltr">On Tue, 2 Aug 2016 at 15:59 Andrey Pavlov <<a href="mailto:andrey.mp@gmail.com" target="_blank">andrey.mp@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">I need to add glance support via storing images in cinder instead of<br>
local files.<br>
(This works only from Mitaka version due to glance-store package)<br></blockquote><div><br></div></span><div>OK<br> <br></div><span class=""><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
First step I've made here -<br>
<a href="https://review.openstack.org/#/c/348336/" rel="noreferrer" target="_blank">https://review.openstack.org/#/c/348336/</a><br>
This patchset adds ability to relate glance-charm to cinder-charm<br>
(it's similar to ceph/swift relations)<br></blockquote><div><br></div></span><div>Looks like a good start, I'll comment directly on the review with any specific comments.<br> <br></div><span class=""><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
And also it configures glance's rootwrap - original glance package<br>
doesn't have such code<br>
(<br>
  I think that this is a bug in glance-common package - cinder and<br>
nova can do it themselves.<br>
  And if someone point me to bugtracker - I will file the bug there.<br>
)<br></blockquote><div><br></div></span><div>Sounds like this should be in the glance package:<br><br>  <a href="https://bugs.launchpad.net/ubuntu/+source/glance/+filebug" target="_blank">https://bugs.launchpad.net/ubuntu/+source/glance/+filebug</a><br><br></div><div> or use:<br><br></div><div>  ubuntu-bug glance-common<br><br></div><div>on an installed system.<br></div><span class=""><div>   <br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
But main question is about additional configurations' steps -<br>
Some cinder backends need to store additional files in<br>
/etc/glance/rootwrap.d/ folder.<br>
I have two options to implement this -<br>
1) relate my charm to glance:juju-info (it will be run on the same<br>
machine as glance)<br>
and do all work in this hook in my charm.<br>
2) add one more relation to glance - like<br>
'storage-backend:cinder-backend' in cinder.<br>
And write code in a same way - with ability to pass config options. <br></blockquote><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
I prefer option 2. It's more logical and more general. It will allow<br>
to configure any cinder's backend.<br></blockquote><div><br></div></span><div>+1 the subordinate approach in cinder (and nova) works well; lets ensure the semantics on the relation data mean its easy to restart the glance services from the subordinate service if need be.<br><br></div><div>Taking this a step further, it might also make sense to have the relation to cinder on the subordinate charm and pass up the data item to configure glance to use cinder from the sub - does that make sense in this context?<br><br></div><div>Cheers<span class="HOEnZb"><font color="#888888"><br><br></font></span></div><span class="HOEnZb"><font color="#888888"><div>James<br></div><div><br></div></font></span></div></div></div>
<br>__________________________________________________________________________<br>
OpenStack Development Mailing List (not for usage questions)<br>
Unsubscribe: <a href="http://OpenStack-dev-request@lists.openstack.org?subject:unsubscribe" rel="noreferrer" target="_blank">OpenStack-dev-request@lists.openstack.org?subject:unsubscribe</a><br>
<a href="http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev" rel="noreferrer" target="_blank">http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev</a><br>
<br></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr">Kind regards,<div>Andrey Pavlov.</div></div></div>
</div>