Bug 1217785
| Summary: | RHOS inventory only finds availability zone if instance exists in the zone | |||
|---|---|---|---|---|
| Product: | Red Hat CloudForms Management Engine | Reporter: | Pete Savage <psavage> | |
| Component: | Providers | Assignee: | Ladislav Smola <lsmola> | |
| Status: | CLOSED ERRATA | QA Contact: | Ola Pavlenko <opavlenk> | |
| Severity: | medium | Docs Contact: | ||
| Priority: | medium | |||
| Version: | 5.4.0 | CC: | abellott, jfrey, jhardy, jprause, lsmola, obarenbo, ukalifon | |
| Target Milestone: | GA | |||
| Target Release: | 5.6.0 | |||
| Hardware: | Unspecified | |||
| OS: | Unspecified | |||
| Whiteboard: | providers:openstack:av_zone | |||
| Fixed In Version: | 5.6.0.0 | Doc Type: | Bug Fix | |
| Doc Text: | Story Points: | --- | ||
| Clone Of: | ||||
| : | 1291713 (view as bug list) | Environment: | ||
| Last Closed: | 2016-06-29 14:54:16 UTC | Type: | Bug | |
| Regression: | --- | Mount Type: | --- | |
| Documentation: | --- | CRM: | ||
| Verified Versions: | Category: | --- | ||
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | ||
| Cloudforms Team: | --- | Target Upstream Version: | ||
| Embargoed: | ||||
| Bug Depends On: | ||||
| Bug Blocks: | 1291713 | |||
|
Description
Pete Savage
2015-05-01 15:52:00 UTC
I believe the code here
def get_availability_zones
azs = servers.collect(&:availability_zone)
azs.concat(volumes.collect(&:availability_zone)).compact!
azs.uniq!
azs << nil # force the null availability zone for openstack
process_collection(azs, :availability_zones) { |az| parse_availability_zone(az) }
end
Iterates and creates a unique list of each availability zone from the list of servers
I don't believe this is possible to be retrieved from the OpenStack API, which is why it is done by inspecting instances. We can review if newer versions of OpenStack provide this API. The nova api does allow some inspection http://docs.openstack.org/developer/nova/api/nova.api.openstack.compute.contrib.availability_zone.html However I have not tested it, and fog doesn't seem to reference them as far as I can see. This is true. Unfortunately, this is the only way we can get the list of availability zones from Nova via Fog. I'll leave this open for now to see if there's enough pressure to add this functionality to Fog ourselves. Ladas, can you check on the level of effort to add this functionality to Fog? Adding it will be pretty easy, I've put it into our trello API paths are /os-availability-zone/detail /os-availability-zone Seems like there is OpenStack[:compute].list_zones, that we can use right now, it's just not packed to Fog::Model Full support of availability zones here https://github.com/fog/fog/pull/3636 New commit detected on ManageIQ/manageiq/master: https://github.com/ManageIQ/manageiq/commit/a00d1b99081d5b86cbf6a4081c859ef9edc21d48 commit a00d1b99081d5b86cbf6a4081c859ef9edc21d48 Author: Ladislav Smola <lsmola> AuthorDate: Wed Jul 29 10:23:33 2015 +0200 Commit: Ladislav Smola <lsmola> CommitDate: Mon Nov 2 15:37:18 2015 +0100 Openstack availability zones from the API Fetching Availability zones from nova and cinder API, rather than reading them from the instances and volumes. BZ https://bugzilla.redhat.com/show_bug.cgi?id=1217785 .../openstack/cloud_manager/refresh_parser.rb | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) Since it's likely I may not get to be the tester for this particular bug, if we inventory a rhos instance with no instances, it used to fail to find the nova availability zone. With this change I would think we should see it. Verified in: 5.6.0.8-rc1-nightly.20160531084619_1bff101 Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHBA-2016:1348 |