2
0
mirror of https://github.com/xcat2/confluent.git synced 2026-09-29 00:31:09 +00:00

Accept updated ip addresses

Merge new ip info rather than just discarding it.
This commit is contained in:
Jarrod Johnson
2017-03-27 11:11:18 -04:00
parent 108c9d3e9d
commit 447a3b3ffe
2 changed files with 19 additions and 2 deletions
@@ -260,6 +260,21 @@ def detected(info):
# also when switch config parameters change, should discard
# and there's also if wiring is fixed...
# of course could periodically revisit known_nodes
# replace potentially stale address info
#TODO(jjohnson2): remove this
# temporary workaround for XCC not doing SLP DA over dedicated port
# bz 93219, fix submitted, but not in builds yet
# strictly speaking, going ipv4 only legitimately is mistreated here,
# but that should be an edge case
oldaddr = known_info[info['hwaddr']]['addresses']
for addr in info['addresses']:
if addr[0].startswith('fe80::'):
break
else:
for addr in oldaddr:
if addr[0].startswith('fe80::'):
info['addresses'].append(addr)
known_info[info['hwaddr']]['addresses'] = info['addresses']
return
known_info[info['hwaddr']] = info
cfg = cfm.ConfigManager(None)
@@ -12,6 +12,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
import errno
import eventlet
webclient = eventlet.import_patched('pyghmi.util.webclient')
@@ -60,6 +61,7 @@ class NodeHandler(object):
wc = webclient.SecureHTTPConnection(ip, verifycallback=self._savecert)
try:
wc.connect()
except Exception:
return None
except IOError as ie:
if ie.errno == errno.ECONNREFUSED:
return None
return self._fp