Bug 1468700 - Azure refresh fails with private_ip_address property not found
Summary: Azure refresh fails with private_ip_address property not found
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat CloudForms Management Engine
Classification: Red Hat
Component: Providers
Version: 5.8.0
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: GA
: 5.8.2
Assignee: Daniel Berger
QA Contact: Leo Khomenko
URL:
Whiteboard: azure:ems_refresh
Depends On: 1467403 1494143
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-07-07 16:49 UTC by Satoe Imaishi
Modified: 2022-07-09 08:42 UTC (History)
11 users (show)

Fixed In Version: 5.8.1.2
Doc Type: If docs needed, set a value
Doc Text:
Clone Of: 1467403
Environment:
Last Closed: 2017-08-02 17:33:18 UTC
Category: ---
Cloudforms Team: CFME Core
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2017:1758 0 normal SHIPPED_LIVE Important: Red Hat CloudForms security, bug fix, and enhancement update 2017-08-02 21:23:43 UTC

Comment 2 CFME Bot 2017-07-07 16:53:07 UTC
New commit detected on ManageIQ/manageiq-providers-azure/fine:
https://github.com/ManageIQ/manageiq-providers-azure/commit/352f7052bddc3c66651ad772e478e8eb0175e811

commit 352f7052bddc3c66651ad772e478e8eb0175e811
Author:     Bronagh Sorota <bsorota>
AuthorDate: Tue Jun 27 09:38:26 2017 -0400
Commit:     Satoe Imaishi <simaishi>
CommitDate: Fri Jul 7 12:49:33 2017 -0400

    Merge pull request #85 from djberg96/private_ip
    
    Handle possibility of network_port not having private_ip_address
    (cherry picked from commit cb44c138c3496d5cc7326dc4df923c10969e170e)
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1468700

 app/models/manageiq/providers/azure/network_manager/refresh_parser.rb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comment 5 Bronagh Sorota 2017-07-25 13:50:11 UTC
Hi Jeff,
Can you answer Leo's question?
Thanks
Bronagh

Comment 6 Jeff Teehan 2017-07-25 15:34:14 UTC
You automatically get a 10.x.x.x ip address (or however you define your sub) when you create a VM whether you ask for it or not.  You have to connect somehow.  Is the bug that it's not showing up in the IP list.

Just picking a VM at random, it is showing the private IP address - 

Azure

PUBLIC IP ADDRESS/DNS NAME LABEL
13.68.100.168/<none>
PRIVATE IP ADDRESS
10.3.0.4

CFME

Name	cu-24x7
IP Addresses	10.3.0.4, 13.68.100.168

Looks fine to me.

Comment 8 Jeff Teehan 2017-07-25 16:10:19 UTC
It is possible to add an IPV6 to a load balancer for internal communication.  I'll have to take a look.  I'm still not aware of how to assign an IPV6 to a VM directly but that doesn't mean something hasn't changed recently.

Comment 9 Jeff Teehan 2017-07-25 23:56:25 UTC
Took a half a day but I think I figured it out.  The only way to get an IPV6 attached to a VM is to spin up an entire Load Balancer.  I'll paste the code under a separate pastebin or equivelent.

[----] E, [2017-07-25T17:05:11.235152 #21461:79b134] ERROR -- : MIQ(MiqQueue#deliver) Message id: [31243], Error: [undefined method `subnet' for #<Azure::Armrest::Network::NetworkInterface::Properties::IpConfiguration::Properties:0x0000000a025be8>]
[----] E, [2017-07-25T17:05:11.235323 #21461:79b134] ERROR -- : [EmsRefresh::Refreshers::EmsRefresherMixin::PartialRefreshError]: undefined method `subnet' for #<Azure::Armrest::Network::NetworkInterface::Properties::IpConfiguration::Properties:0x0000000a025be8>  Method:[rescue in deliver]

Comment 10 Bronagh Sorota 2017-07-27 18:00:01 UTC
Leo,
Are you in a position to test this now that Jeff has provided steps to reproduce this?
Thanks
Bronagh

Comment 11 Jeff Teehan 2017-07-27 19:44:53 UTC
Here's a script to create what you need, but it's already been run.  Just add the standard azure provider and check the evm.log until the error goes away.

You'll see the whole shebang in a resource group called LBIP4IP6.  Just turn the two VMs on and refresh cfme after they are running.

https://mojo.redhat.com/docs/DOC-1145084

Comment 12 Leo Khomenko 2017-08-01 07:59:51 UTC
Bronagh, it's reproducible
As Jeff wrote - now we have:
E, [2017-08-01T03:47:36.722872 #32376:98713c] ERROR -- : MIQ(ManageIQ::Providers::Azure::NetworkManager::Refresher#refresh) EMS: [azure Network Manager], id: [2] Refresh failed
[----] E, [2017-08-01T03:47:36.728311 #32376:98713c] ERROR -- : [NoMethodError]: undefined method `subnet' for #<Azure::Armrest::Network::NetworkInterface::Properties::IpConfiguration::Properties:0x000000124bf480>  Method:[rescue in block in refresh]
[----] E, [2017-08-01T03:47:36.728455 #32376:98713c] ERROR -- : /opt/rh/cfme-gemset/bundler/gems/manageiq-providers-azure-ae2e0e06ee85/app/models/manageiq/providers/azure/network_manager/refresh_parser.rb:394:in `parse_cloud_subnet_network_port'

It is based on IPV6 IP Configuration without Private IP address assigned to VM/Nic

Comment 15 errata-xmlrpc 2017-08-02 17:33:18 UTC
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/RHSA-2017:1758


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