<html><head><meta http-equiv="Content-Type" content="text/html charset=windows-1252"><base href="x-msg://1342/"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><br><div><div>On Dec 11, 2012, at 5:42 AM, "Karajgi, Rohit" <<a href="mailto:Rohit.Karajgi@nttdata.com">Rohit.Karajgi@nttdata.com</a>> wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div lang="EN-US" link="blue" vlink="purple" style="font-family: Menlo; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><div class="WordSection1" style="page: WordSection1; "><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif; ">Hi,<o:p></o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif; "><o:p> </o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif; ">Referring to bug<span class="Apple-converted-space"> </span><a href="https://bugs.launchpad.net/nova/+bug/1087735" style="color: purple; text-decoration: underline; ">https://bugs.launchpad.net/nova/+bug/1087735</a>, I’d like to get some thoughts on how the current implementation can be improved<o:p></o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif; ">for filtering endpoints by region.<o:p></o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif; "><o:p> </o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif; ">For example, during Cinder volume attachment as described in the bug, if we specify ‘attr’ and ‘filter_value’ correctly for a specific region,<o:p></o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif; ">(Eg: attr=’region’, filter_value=’RegionTwo’) in the call to service_catalog.url_for()  , cinder correctly parses this value and returns a matching endpoint for this region.<o:p></o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif; "><a href="https://github.com/openstack/nova/blob/master/nova/volume/cinder.py#L63" style="color: purple; text-decoration: underline; ">https://github.com/openstack/nova/blob/master/nova/volume/cinder.py#L63</a><o:p></o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif; "><o:p> </o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif; ">However, it is unclear how these parameters should be passed from nova volume API.<o:p></o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif; ">As a possible solution, should the context object also contain a “region_name” parameter added to it, and then extract this parameter into the cinderclient?<o:p></o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif; ">Does it make sense to add another flag/configuration parameter to nova.conf for accepting region?<o:p></o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif; ">How can we ensure that a region name is consistently utilized and validated across APIs as well as python clients?</div></div></div></blockquote><br></div><div>I would think that attaching volumes across regions would not be allowed, so I would assume that we would actually want nova to pass its own region. If there is some way for nova to check what its own region is in the endpoint list, then it could just pass that one along. Unfortunately the only way I can think of doing that is by attempting to parse osapi_compute_link_prefix from config and matching it against the catalog. Probably not the best option. Since this is the case, It appears that a config parameter specifying the region of the install might be best.</div><div><br></div><div>Vish</div><div><br></div></body></html>