Bug 1440327 - Get IP address automation code not working Azure
Summary: Get IP address automation code not working Azure
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat CloudForms Management Engine
Classification: Red Hat
Component: Providers
Version: 5.7.0
Hardware: Unspecified
OS: Unspecified
urgent
urgent
Target Milestone: GA
: 5.9.0
Assignee: Ladislav Smola
QA Contact: Milan Falešník
URL:
Whiteboard:
Depends On:
Blocks: 1441753 1441754
TreeView+ depends on / blocked
 
Reported: 2017-04-07 22:48 UTC by myoder
Modified: 2020-08-13 09:02 UTC (History)
11 users (show)

Fixed In Version: 5.9.0.1
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 1441753 1441754 (view as bug list)
Environment:
Last Closed: 2018-03-06 15:24:18 UTC
Category: Inquiry
Cloudforms Team: Azure
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description myoder 2017-04-07 22:48:39 UTC
Description of problem:

We have automation code that uses this method to get the IP address of the VM that is being provisioned:

task       = $evm.root["service_template_provision_task"]
service    = task.destination
vms        = service.vms
ip_address = vms[0].ipaddresses[0]

This code is not working on about half of our subscriptions today's. I need to understand by what mechanism the vms[0].ipaddresses[0] data structure gets populated. Understanding this will help to to now where to get next in trouble shooting this issue.

This is impacting production since we can't reliably build VMs.

If there is a better, more reliable way to obtain the VM IP address I am open to trying it.

Version-Release number of selected component (if applicable):
5.7.1.3

How reproducible:
On half of Azure subscriptions

Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:


Additional info:

Comment 3 Greg McCullough 2017-04-07 23:47:31 UTC
I am wondering if the IP address is not coming back during the initial provider refresh that picks up the new VM.  They should check if the IP eventually shows up in the UI for that VM.  

If so the automate method might need to do a retry until the data is available.

If not then it would sound like the provider is not returning the data during inventory refresh.

Comment 12 CFME Bot 2017-04-12 11:56:22 UTC
New commit detected on ManageIQ/manageiq/master:
https://github.com/ManageIQ/manageiq/commit/dc57d4c3b20f375dcd27f5dd4d3d31723134e857

commit dc57d4c3b20f375dcd27f5dd4d3d31723134e857
Author:     Ladislav Smola <lsmola>
AuthorDate: Wed Apr 12 13:04:07 2017 +0200
Commit:     Ladislav Smola <lsmola>
CommitDate: Wed Apr 12 13:05:17 2017 +0200

    Method for ensuring managers change zone and provider region with CloudManager
    
    Method for ensuring managers change zone and provider region with
    CloudManager, this method needs to be in :before_update in every
    relevant provider
    
    Fixes BZs:
    https://bugzilla.redhat.com/show_bug.cgi?id=1439268
    https://bugzilla.redhat.com/show_bug.cgi?id=1440327

 app/models/mixins/has_network_manager_mixin.rb | 12 +++++++++---
 1 file changed, 9 insertions(+), 3 deletions(-)

Comment 13 CFME Bot 2017-04-12 15:18:08 UTC
New commit detected on ManageIQ/manageiq-providers-azure/master:
https://github.com/ManageIQ/manageiq-providers-azure/commit/34feebe8c43f93c00d02474efcadfc98436ab078

commit 34feebe8c43f93c00d02474efcadfc98436ab078
Author:     Ladislav Smola <lsmola>
AuthorDate: Wed Apr 12 12:53:31 2017 +0200
Commit:     Ladislav Smola <lsmola>
CommitDate: Wed Apr 12 12:53:31 2017 +0200

    Ensure managers change zone and provider region with CloudManager
    
    Ensure managers change zone and provider region with CloudManager
    
    Fixes BZ:
    https://bugzilla.redhat.com/show_bug.cgi?id=1440327

 app/models/manageiq/providers/azure/cloud_manager.rb  |  1 +
 .../manageiq/providers/azure/cloud_manager_spec.rb    | 19 +++++++++++++++++++
 2 files changed, 20 insertions(+)

Comment 22 Milan Falešník 2017-11-24 13:05:01 UTC
Verified in 5.9.0.10, after adding the Azure provider I switched zones of it and provisioned a VM. The IP addresses are retrieved.


Note You need to log in before you can comment on or make changes to this bug.