Setting NTP or MTU fails when some interfaces don't have have an AF_INET address

Bug #1787361 reported by Alessandro Pilotti
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
cloudbase-init
Fix Released
Medium
Alessandro Pilotti

Bug Description

2018-08-16 12:20:12.151 668 INFO cloudbaseinit.plugins.common.ntpclient [-] NTP client service enabled
2018-08-16 12:20:12.214 668 ERROR cloudbaseinit.init [-] plugin 'NTPClientPlugin' failed with error '2'
2018-08-16 12:20:12.229 668 ERROR cloudbaseinit.init [-] 2: KeyError: 2
2018-08-16 12:20:12.229 668 ERROR cloudbaseinit.init Traceback (most recent call last):
2018-08-16 12:20:12.229 668 ERROR cloudbaseinit.init File "c:\program files\cloudbase solutions\cloudbase-init\python\lib\site-packages\cloudbaseinit\init.py", line 67, in _exec_plugin
2018-08-16 12:20:12.229 668 ERROR cloudbaseinit.init shared_data)
2018-08-16 12:20:12.229 668 ERROR cloudbaseinit.init File "c:\program files\cloudbase solutions\cloudbase-init\python\lib\site-packages\cloudbaseinit\plugins\common\ntpclient.py", line 64, in execute
2018-08-16 12:20:12.229 668 ERROR cloudbaseinit.init [dhcp.OPTION_NTP_SERVERS])
2018-08-16 12:20:12.229 668 ERROR cloudbaseinit.init File "c:\program files\cloudbase solutions\cloudbase-init\python\lib\site-packages\cloudbaseinit\utils\dhcp.py", line 142, in get_dhcp_options
2018-08-16 12:20:12.229 668 ERROR cloudbaseinit.init mac_address = _get_mac_address_by_local_ip(local_ip_addr)
2018-08-16 12:20:12.229 668 ERROR cloudbaseinit.init File "c:\program files\cloudbase solutions\cloudbase-init\python\lib\site-packages\cloudbaseinit\utils\dhcp.py", line 103, in _get_mac_address_by_local_ip
2018-08-16 12:20:12.229 668 ERROR cloudbaseinit.init for addr in addrs[netifaces.AF_INET]:
2018-08-16 12:20:12.229 668 ERROR cloudbaseinit.init KeyError: 2
2018-08-16 12:20:12.229 668 ERROR cloudbaseinit.init

Changed in cloudbase-init:
importance: Undecided → Medium
assignee: nobody → Alessandro Pilotti (alexpilotti)
summary: - Setting the MTU fails when some interfaces don't have have an AF_INET
+ Setting NTP or MTU fails when some interfaces don't have have an AF_INET
address
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to cloudbase-init (master)

Fix proposed to branch: master
Review: https://review.openstack.org/592328

Changed in cloudbase-init:
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to cloudbase-init (master)

Reviewed: https://review.openstack.org/592328
Committed: https://git.openstack.org/cgit/openstack/cloudbase-init/commit/?id=b2f738236df7188a11505090ddbc00261b3f6d98
Submitter: Zuul
Branch: master

commit b2f738236df7188a11505090ddbc00261b3f6d98
Author: Alessandro Pilotti <email address hidden>
Date: Thu Aug 16 12:25:32 2018 +0300

    Fix issue in retrieving MAC address

    Retrieving the MAC address fails when there are interfaces that
    don't have a AF_INET address.

    Change-Id: I1e7f4bd897e8e2a0b79f16326f59f2495b946b80
    Closes-Bug: #1787361

Changed in cloudbase-init:
status: In Progress → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.