<div dir="ltr">Hi Andrey<br><div><br><div class="gmail_quote"><div dir="ltr">On Tue, 2 Aug 2016 at 15:59 Andrey Pavlov <<a href="mailto:andrey.mp@gmail.com">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><div>OK<br> <br></div><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><div>Looks like a good start, I'll comment directly on the review with any specific comments.<br> <br></div><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><div>Sounds like this should be in the glance package:<br><br>  <a href="https://bugs.launchpad.net/ubuntu/+source/glance/+filebug">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><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><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<br><br></div><div>James<br></div><div><br></div></div></div></div>