Bug 1388013

Summary: "Couldn't obtain IP address ofinstance" is seen in central.log of ceilometer
Product: Red Hat OpenStack Reporter: Chen <cchen>
Component: openstack-ceilometerAssignee: Mehdi ABAAKOUK <mabaakou>
Status: CLOSED ERRATA QA Contact: Sasha Smolyak <ssmolyak>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 8.0 (Liberty)CC: jmelvin, jruzicka, mabaakou, pkilambi, srevivo
Target Milestone: ---Keywords: Triaged, ZStream
Target Release: 8.0 (Liberty)   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: openstack-ceilometer-5.0.5-2.el7ost Doc Type: No Doc Update
Doc Text:
-
Story Points: ---
Clone Of:
: 1441340 1441341 (view as bug list) Environment:
Last Closed: 2017-06-20 12:46:51 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:
Bug Depends On:    
Bug Blocks: 1441340, 1441341    

Description Chen 2016-10-24 08:32:27 UTC
Description of problem:

"Couldn't obtain IP address ofinstance" is seen in central.log of ceilometer


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

OSP 8.0
python-ceilometer-5.0.2-2.el7ost.noarch

How reproducible:

100%

Steps to Reproduce:
1. Deploy an all-in-one openstack environment
2. Launch some instances and wait for 10 minutes
3.

Actual results:

The following errors are seen in central.log of ceilometer

2015-07-27 09:17:12.301 54276 ERROR ceilometer.hardware.discovery [-] Couldn't obtain IP address ofinstance <ID of Instance>
2015-07-27 09:17:12.301 54276 ERROR ceilometer.hardware.discovery [-] Couldn't obtain IP address ofinstance <ID of Instance>


Expected results:

No errors should be output.

Additional info:


Not all the instances are having a network called "ctlplane" and this is leading a KeyError.

/usr/lib/python2.7/site-packages/ceilometer/hardware/discovery.py

 95             except KeyError:
 96                 LOG.error(_("Couldn't obtain IP address of "
 97                             "instance %s") % instance.id)
 98 



 49     def _address(instance, field):
 50         return instance.addresses['ctlplane'][0].get(field) <--- This is where the KeyError exception happened

Comment 1 Chen 2016-10-24 08:34:21 UTC
*** Bug 1386586 has been marked as a duplicate of this bug. ***

Comment 3 Mehdi ABAAKOUK 2016-11-21 13:13:44 UTC
The pending to merge fix is here: https://review.openstack.org/#/c/394452/

Comment 4 Chen 2016-12-08 07:53:10 UTC
Hi Mehdi,

I can see https://review.openstack.org/#/c/394452/ has been merged. When will this fix be imported or backported to our RHOSP ?

Best Regards,
Chen

Comment 5 Mehdi ABAAKOUK 2016-12-08 15:12:39 UTC
No it's not merged, yet.

Comment 6 Chen 2017-01-09 07:30:21 UTC
Hi Mehdi,

If you got any news about the merge please kindly let me know.

Thank you !

Best Regards,
Chen

Comment 8 Mehdi ABAAKOUK 2017-01-23 11:35:44 UTC
I have mis-investigated this BZ, this was not the known issue I have though originally. 

And this is not really a bug for your case, but just an incorrect logging. 
We should log this message only for ironic node deployed by tripleo. But in your case you don't use tripleo, only packstack. I proposed a fix on master to hide this message when it's not necessary.

For your deployment you can simply ignore it. Having this fix will just hide the log.

Comment 9 Mehdi ABAAKOUK 2017-02-17 10:10:37 UTC
The fix have been merged for OSP12 (Pike)

Comment 10 Chen 2017-03-15 14:14:44 UTC
Hi Mehdi,

Any news if we could backport to old versions ?

Best Regards,
Chen

Comment 11 Mehdi ABAAKOUK 2017-04-11 17:48:44 UTC
Backports have landed in newton, mitaka and ocata.

I have prepared the backports for OSP8 and OSP9

I moved this BZ to OSP8, and clone it for OSP10.

Comment 13 Sasha Smolyak 2017-06-15 14:48:40 UTC
No such messages appear

Comment 15 errata-xmlrpc 2017-06-20 12:46:51 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/RHBA-2017:1543