Not properly handling ipv6 on contrib.network.ip.get_address_in_network

Bug #1671641 reported by Jorge Niedbalski
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Charm Helpers
New
High
Jorge Niedbalski

Bug Description

[Description]

While investigating the root cause of https://bugs.launchpad.net/charm-ceph-fs/+bug/1659338
I discovered a couple of issues on the function get_address_in_network
when using ipv6 addresses.

1) ::1 must be skipped when iterating over the list of available networks
as this is the loopback address.

unit-ceph-fs-4[2718]: 2017-03-06 20:32:16 INFO unit.ceph-fs/4.ceph-mds-relation-changed logger.go:40 netaddr.core.AddrFormatError: '::1' is not a valid IPv4 address string!

2) IPNetwork doesn't support netmasks for ipv6 addresses,
instead a prefix should be used.

unit-ceph-fs-4[2718]: 2017-03-09 21:25:03 INFO unit.ceph-fs/4.ceph-mds-relation-changed logger.go:40 ValueError: IPAddress() does not support netmasks or subnet prefixes! See documentation for details. (Full stacktrace: http://pastebin.ubuntu.com/24148408/)

Tags: sts
tags: added: sts
Changed in charm-helpers:
importance: Undecided → High
assignee: nobody → Jorge Niedbalski (niedbalski)
description: updated
description: updated
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.