Ask Your Question
0

nova : host ids and extended server attributes [closed]

asked 2014-04-02 07:46:24 -0600

arunuke gravatar image

updated 2014-04-02 13:28:16 -0600

larsks gravatar image

Hello All,

I am trying to find out the hostname of the compute host which runs a certain compute VM. I see that nova's extended server attributes usually list the hostname, but I don't see that happening in my setup (Fedora20/IceHouse). I see the following extended attributes, but not the hostname.

 | OS-DCF:diskConfig           | MANUAL                     |
 | OS-EXT-AZ:availability_zone | nova                       |
 | OS-EXT-STS:power_state      | 1                          |
 | OS-EXT-STS:task_state       | -                          |
 | OS-EXT-STS:vm_state         | active                     |
 | OS-SRV-USG:launched_at      | 2014-03-28T22:42:43.000000 |
 | OS-SRV-USG:terminated_at    | -

I do see a hostId in the output with a key, but I am unable to match it to any of the "nova host*" command outputs.

  • Is there a way to enable nova to print the hostname as part of the extended server attributes?
  • Is there a way to correlate the hostId in the "nova show <server name="">" to identify the compute host?
edit retag flag offensive reopen merge delete

Closed for the following reason the question is answered, right answer was accepted by koolhead17
close date 2014-06-05 07:54:42.626867

1 answer

Sort by ยป oldest newest most voted
1

answered 2014-04-02 13:31:33 -0600

larsks gravatar image

updated 2014-04-02 13:32:23 -0600

If you are interacting with Nova with administrative privileges, you should see a number of OS-EXT-SRV-ATTR: attributes, including OS-EXT-SRV-ATTR:hypervisor_hostname:

# nova show cirros0
[...]
| OS-EXT-SRV-ATTR:host                | compute0             |
| OS-EXT-SRV-ATTR:hypervisor_hostname | compute0.example.com |
| OS-EXT-SRV-ATTR:instance_name       | instance-00000122    |

If you do not have administrative credentials, this information is not available to you.

If you do have administrative privileges and you're still not seeing this information, let me know and I'll take a closer look.

edit flag offensive delete link more

Comments

Fixed :). Thanks larks, As you pointed out, I had created a "member" user who had spawned all the VMs. I created an "admin" user for that tenant and I am now able to see the hypervisor_hostname and the instance_name.

arunuke gravatar imagearunuke ( 2014-04-02 13:43:49 -0600 )edit

Is it good deployment practice to have a "admin" level user for each tenant? In my setup, the user has the same privileges as the overall cloud administrator. Should I be modifying the policy.json files to make the tenant-administrator have restricted privileges only enough to show this information?

arunuke gravatar imagearunuke ( 2014-04-02 13:48:24 -0600 )edit

I'm not sure of the right answer to that question. It seems like their ought to be "out of the box" support for a tenant administrator (someone with privileges in the tenant but not globally), but I don't think that exists yet and I haven't explored the granulatiry available in policy.json.

larsks gravatar imagelarsks ( 2014-04-02 15:23:11 -0600 )edit

PS If this answer help you out, consider clicking the checkmark to the left there. Thanks!

larsks gravatar imagelarsks ( 2014-04-02 15:23:55 -0600 )edit

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower

Stats

Asked: 2014-04-02 07:46:24 -0600

Seen: 1,045 times

Last updated: Apr 02 '14