osdir.com

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Openstack] (Juno - *sigh*) Want non-admin access to hypervisor:VM association.


On 2018-11-18 09:11, Mohammed Naser wrote:

> https://blueprints.launchpad.net/nova/+spec/openstack-api-hostid 
> 
> This should take care of it, don't know if it exists in Juno though.

It *does* exist in Juno, it *can't*, however, do what I want -- at
least, generically.  The hostId that gets returned is a value that's
(apparently) used to let you know, semi-anonymously, how affinity is (or
isn't) working for your VMs.  So you get a unique identifier for each
hypervisor -- but it has no *obvious* bearing on the hostname.   It's an
id that's formed from the SHA224 hash of the ID of your tenant and the
hostname of the hypervisor -- a bit of a catch-22, that, and prevents
you from being able to make use of the hash if you don't know your
back-end.  But... I do.  So I created an associative array with all the
current (and, God willing, future) hypervisor hostnames in my company,
with the key being the hostId/hash, and the value being the hypervisor
name.  Then I queried my VMs, got all the hostIds, used that as the
index to query my associative array, and bingo!  My hypervisor's name. 

Kinda fugly, but when you have a standardized hypervisor hostname
nomenclature, it's sufficient, without having to go mucking about with
changing poorly-documented Nova policy.json stuff in a four-year-old
release of OpenStack. 

I'll take it.  Thanks! 

-Ken 

> On Thu, Nov 15, 2018 at 1:49 PM Ken D'Ambrosio <ken at jots.org> wrote: 
> 
>> Hey, all.  We've got a Juno cloud, and we'd like various end-users to be 
>> able to see which hypervisors their VMs spring up on.  
>> /etc/nova/policy.json seems to have some relevant info, but it's hard to 
>> tell what does what.   "compute_extension:hypervisors" looks like a 
>> possible candidate, but that's so vague that there's no telling what, 
>> exactly, is meant by "hypervisors".  So:
>> 
>> * Given that I just want the hypervisor:VM association, any suggestions 
>> as to which rule(s) to modify?
>> * Failing that, wondering if there's any for-real documentation on what 
>> the various options in policy.json *do*.  I've found many, many lists of 
>> what's in a generic policy.json, but nothing that went into detail about 
>> what does what.
>> 
>> Thanks!
>> 
>> -Ken
>> 
>> _______________________________________________
>> Mailing list: http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack
>> Post to     : openstack at lists.openstack.org
>> Unsubscribe : http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack
> 
> -- 
> Mohammed Naser -- vexxhost
> 
> ----------------------------------------------------- 
> D. 514-316-8872 
> D. 800-910-1726 ext. 200 
> E. mnaser at vexxhost.com 
> W. http://vexxhost.com [1]

 

Links:
------
[1] http://vexxhost.com/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstack.org/pipermail/openstack/attachments/20181118/5ff7eaa0/attachment.html>