Re: [ceph-users] ceph cluster_network with linklocal ipv6

2015-08-19 Thread Björn Lässig
On 08/18/2015 03:39 PM, Björn Lässig wrote:
 For not having any dependencies in my cluster network, i want to use
 only ipv6 link-local addresses on interface 'cephnet'.
 cluster_network = fe80::%cephnet/64

RFC4007 11.7

   The IPv6 addressing architecture [1] also defines the syntax of IPv6
   prefixes.  If the address portion of a prefix is non-global and its
   scope zone should be disambiguated, the address portion SHOULD be in
   the format.  For example, a link-local prefix fe80::/64 on the second
   link can be represented as follows:

fe80::%2/64

   In this combination, it is important to place the zone index portion
   before the prefix length when we consider parsing the format by a
   name-to-address library function [11].  That is, we can first
   separate the address with the zone index from the prefix length, and
   just pass the former to the library function.

so my original format would be the correct one.

just looked into the code ... and this is exactly what happens in:

src/common/ipaddr.cc: bool parse_network(const char *s, […]) {

it looks where a '/' is and try to cast everything after to a longint.
Everything before the '/' is thrown into inet_pton

ok = inet_pton(AF_INET6, addr, ((struct sockaddr_in6*)network)-sin6_addr);

and inet_pton6 from glibc does not look at '%'.
No chance, this code could work with an interfacename after or before
the '/'

I'm using addresses with global scope now.

Björn



___
ceph-users mailing list
ceph-users@lists.ceph.com
http://lists.ceph.com/listinfo.cgi/ceph-users-ceph.com


Re: [ceph-users] ceph cluster_network with linklocal ipv6

2015-08-18 Thread Jan Schermer
Should ceph care about what scope the address is in? We don't specify it for 
ipv4 anyway, or is link-scope special in some way?

And isn't this the correct syntax actually?

cluster_network = fe80::/64%cephnet


 On 18 Aug 2015, at 16:17, Wido den Hollander w...@42on.com wrote:
 
 
 
 On 18-08-15 16:02, Jan Schermer wrote:
 Shouldn't this:
 
 cluster_network = fe80::%cephnet/64
 
 be this:
 cluster_network = fe80::/64
 ?
 
 That won't work since the kernel doesn't know the scope. So %devname is
 right, but Ceph can't parse it.
 
 Although it sounds cool to run Ceph over link-local I don't think it
 currently works.
 
 Wido
 
 
 
 On 18 Aug 2015, at 15:39, Björn Lässig b.laes...@pengutronix.de wrote:
 
 Hi,
 
 i just setup my first ceph cluster and after breaking things for a while 
 and let ceph repair itself, i want to setup the cluster network.
 
 Unfortunately i am doing something wrong :-)
 
 For not having any dependencies in my cluster network, i want to use only 
 ipv6 link-local addresses on interface 'cephnet'.
 
 /var/log/ceph/ceph-osd.4.log:2015-08-18 15:10:38.954592 7f24c0ac2880 -1 
 unable to parse network: fe80::%cephnet/64
 
 --- /etc/ceph/ceph.conf
 [global]
 ...
 cluster_network = fe80::%cephnet/64
 
 
 --- /etc/network/interfaces
 auto cephnet
 iface cephnet inet6 auto
   sysctl -wq net.ipv6.conf.$IFACE.accept_ra_defrtr=0
 
 What could i do?
 
 thanks,
 Björn
 ___
 ceph-users mailing list
 ceph-users@lists.ceph.com
 http://lists.ceph.com/listinfo.cgi/ceph-users-ceph.com
 
 ___
 ceph-users mailing list
 ceph-users@lists.ceph.com
 http://lists.ceph.com/listinfo.cgi/ceph-users-ceph.com
 
 ___
 ceph-users mailing list
 ceph-users@lists.ceph.com
 http://lists.ceph.com/listinfo.cgi/ceph-users-ceph.com

___
ceph-users mailing list
ceph-users@lists.ceph.com
http://lists.ceph.com/listinfo.cgi/ceph-users-ceph.com


Re: [ceph-users] ceph cluster_network with linklocal ipv6

2015-08-18 Thread Wido den Hollander




 Op 18 aug. 2015 om 18:15 heeft Jan Schermer j...@schermer.cz het volgende 
 geschreven:
 
 
 On 18 Aug 2015, at 17:57, Björn Lässig b.laes...@pengutronix.de wrote:
 
 On 08/18/2015 04:32 PM, Jan Schermer wrote:
 Should ceph care about what scope the address is in? We don't specify it 
 for ipv4 anyway, or is link-scope special in some way?
 
 fe80::/64 is on every ipv6 enabled interface ... thats different from legacy 
 ip.
 
 I'm not a network guru, but you can have same/overlapping subnets with IPv4 
 as well
 that's why you have scopes, metrics, routing tables, policy routing tables 
 etc.
 That's why I'm wondering what's different here.
 

It's IPv6, that's different. Search for link local, it will tell you what it is.

Wido


 And isn't this the correct syntax actually?
 
 cluster_network = fe80::/64%cephnet
 
 That is a very good question! I will look into it.
 
 Björn
 
 ___
 ceph-users mailing list
 ceph-users@lists.ceph.com
 http://lists.ceph.com/listinfo.cgi/ceph-users-ceph.com
 
 ___
 ceph-users mailing list
 ceph-users@lists.ceph.com
 http://lists.ceph.com/listinfo.cgi/ceph-users-ceph.com
___
ceph-users mailing list
ceph-users@lists.ceph.com
http://lists.ceph.com/listinfo.cgi/ceph-users-ceph.com


Re: [ceph-users] ceph cluster_network with linklocal ipv6

2015-08-18 Thread Jan Schermer

 On 18 Aug 2015, at 17:57, Björn Lässig b.laes...@pengutronix.de wrote:
 
 On 08/18/2015 04:32 PM, Jan Schermer wrote:
 Should ceph care about what scope the address is in? We don't specify it for 
 ipv4 anyway, or is link-scope special in some way?
 
 fe80::/64 is on every ipv6 enabled interface ... thats different from legacy 
 ip.
 

I'm not a network guru, but you can have same/overlapping subnets with IPv4 as 
well
that's why you have scopes, metrics, routing tables, policy routing tables etc.
That's why I'm wondering what's different here.

 And isn't this the correct syntax actually?
 
 cluster_network = fe80::/64%cephnet
 
 That is a very good question! I will look into it.
 
 Björn
 
 ___
 ceph-users mailing list
 ceph-users@lists.ceph.com
 http://lists.ceph.com/listinfo.cgi/ceph-users-ceph.com

___
ceph-users mailing list
ceph-users@lists.ceph.com
http://lists.ceph.com/listinfo.cgi/ceph-users-ceph.com


Re: [ceph-users] ceph cluster_network with linklocal ipv6

2015-08-18 Thread Björn Lässig

On 08/18/2015 04:32 PM, Jan Schermer wrote:

Should ceph care about what scope the address is in? We don't specify it for 
ipv4 anyway, or is link-scope special in some way?


fe80::/64 is on every ipv6 enabled interface ... thats different from 
legacy ip.



And isn't this the correct syntax actually?

cluster_network = fe80::/64%cephnet


That is a very good question! I will look into it.

Björn

___
ceph-users mailing list
ceph-users@lists.ceph.com
http://lists.ceph.com/listinfo.cgi/ceph-users-ceph.com