Patching doesn't work for systems with IPv6
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
StarlingX |
Fix Released
|
High
|
Austin Sun |
Bug Description
Bug Description : Distributed cloud lab patches in software management page in horizon doesn’t have correct patch state. It says patch state n/a and progress bar is moving when there is no action in background. Attached image have more info.
[wrsroot@
Patch ID RR Release Repo State Patch State
=======
2018-10-
2018-10-
2018-10-
Severity
--------
Major
Steps to Reproduce
------------------
1. upload patches using horizon
2. Apply patches and check the state on horizon
Expected Behavior
------------------
Patch state
Actual Behavior
----------------
As per description
Reproducibility
---------------
100% Reproduce-able
System Configuration
-------
Distributed cloud
Branch/Pull Time/Commit
-------
StarlingX_
Timestamp/Logs
--------------
2018-10-
Changed in starlingx: | |
assignee: | nobody → Cindy Xie (xxie1) |
Changed in starlingx: | |
assignee: | Cindy Xie (xxie1) → Austin Sun (sunausti) |
tags: |
added: stx.2019.05 removed: stx.2019.03 |
tags: |
added: stx.2.0 removed: stx.2019.05 |
tags: | added: stx.retestneeded |
From Don Penney:
the patching daemons are not properly configuring multicast on IPv6 systems, and cannot talk to each other as a result.
For IPv6 systems, patching is using the following function to determine the interface index, against which the multicast address is configured:
import ctypes
import ctypes.util
libc = ctypes. CDLL(ctypes. util.find_ library( 'c'))
def if_nametoindex( name): nametoindex( name)
return libc.if_
The following commit made changes to how tsconfig parses the platform.conf file: /github. com/openstack/ stx-update/ commit/ a539b771cf6ba5e 1e08ea388342265 f839c53b3e# diff-6ba9d2507c c0d05ce908b2e52 c08dee0
https:/
This results in strings now being returned as Unicode (u'eno4.160'). And the libc function used by patching doesn't handle unicode, it seems, returning 0 instead of the correct ifindex: interface management_ interface) CDLL(ctypes. util.find_ library( 'c')) nametoindex( tsc.management_ interface) nametoindex( str(tsc. management_ interface) )
>>> import tsconfig.tsconfig as tsc
>>> tsc.management_
u'eno4.160'
>>> str(tsc.
'eno4.160'
>>> import ctypes
>>> import ctypes.util
>>>
>>> libc = ctypes.
>>> libc.if_
0
>>> libc.if_
6
>>>
In summary: patching is broken on IPv6 systems.