{"action":"created","issue":{"url":"https://api.github.com/repos/docker/libnetwork/issues/826","labels_url":"https://api.github.com/repos/docker/libnetwork/issues/826/labels{/name}","comments_url":"https://api.github.com/repos/docker/libnetwork/issues/826/comments","events_url":"https://api.github.com/repos/docker/libnetwork/issues/826/events","html_url":"https://github.com/docker/libnetwork/pull/826","id":122959897,"number":826,"title":"Make IPv6 a first class citizen","user":{"login":"tgraf","id":1417913,"avatar_url":"https://avatars.githubusercontent.com/u/1417913?v=3","gravatar_id":"","url":"https://api.github.com/users/tgraf","html_url":"https://github.com/tgraf","followers_url":"https://api.github.com/users/tgraf/followers","following_url":"https://api.github.com/users/tgraf/following{/other_user}","gists_url":"https://api.github.com/users/tgraf/gists{/gist_id}","starred_url":"https://api.github.com/users/tgraf/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tgraf/subscriptions","organizations_url":"https://api.github.com/users/tgraf/orgs","repos_url":"https://api.github.com/users/tgraf/repos","events_url":"https://api.github.com/users/tgraf/events{/privacy}","received_events_url":"https://api.github.com/users/tgraf/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-12-18T14:40:42Z","updated_at":"2015-12-19T18:08:14Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/docker/libnetwork/pulls/826","html_url":"https://github.com/docker/libnetwork/pull/826","diff_url":"https://github.com/docker/libnetwork/pull/826.diff","patch_url":"https://github.com/docker/libnetwork/pull/826.patch"},"body":"This makes IPv6 a proper citizen by:\r\n * Allowing an endpoint to have only an IPv6 address if network.enableIPv6 is set.\r\n * Enabling allocation of an IPv6 address if netlabel.EnableIPv6 is set even without the presence of a network.ipamV6Conf.\r\n * Fixing ipam.RequestAddress() to properly handle an IPAM driver not returning an address for a particular pool.\r\n\r\nExisting IPv4 behaviour is kept intact: Unless network.enableIPv6 is explicitly set by the user, an IPv4 configuration failure is considered fatal even in the presence of a working IPv6 configuration."},"comment":{"url":"https://api.github.com/repos/docker/libnetwork/issues/comments/166010981","html_url":"https://github.com/docker/libnetwork/pull/826#issuecomment-166010981","issue_url":"https://api.github.com/repos/docker/libnetwork/issues/826","id":166010981,"user":{"login":"aboch","id":10080882,"avatar_url":"https://avatars.githubusercontent.com/u/10080882?v=3","gravatar_id":"","url":"https://api.github.com/users/aboch","html_url":"https://github.com/aboch","followers_url":"https://api.github.com/users/aboch/followers","following_url":"https://api.github.com/users/aboch/following{/other_user}","gists_url":"https://api.github.com/users/aboch/gists{/gist_id}","starred_url":"https://api.github.com/users/aboch/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aboch/subscriptions","organizations_url":"https://api.github.com/users/aboch/orgs","repos_url":"https://api.github.com/users/aboch/repos","events_url":"https://api.github.com/users/aboch/events{/privacy}","received_events_url":"https://api.github.com/users/aboch/received_events","type":"User","site_admin":false},"created_at":"2015-12-19T18:08:14Z","updated_at":"2015-12-19T18:08:14Z","body":"@tgraf \r\nThanks for the clarification.\r\n\r\nI am not sure about the option 2 you mentioned. Considering the behavior would be controlled by a user specified option, how would it be useful to create a network which may get either an ipv4 or an ipv6 pool without knowing it a priori ?\r\n\r\nIn a scenario where the ipam driver and network driver are implemented by the same entity, I am guessing why this would seem to be needed: It would give freedom to the network driver to decide whether to assign ipv4 or ipv6 pool for a specific network, without libnetwork complaining about it.\r\n\r\nBut this would go against the reason for which the IPAM was added into libnetwork in first place, which is to give the docker user control over the ip address management for the containers/networks. The assigned ipam behavior should be deterministic.\r\n\r\nProbably we should allow the ipam driver also express its capability in supporting only v4, only v6 or both during registration. This way libnetwork will handle the ipam request accordingly and, as an example, won't ask for ipv4 pool if ipam driver does not or does not want to support it. This would be more explicit and confined to the iapm driver.\r\nAt the end user chooses the ipam driver, he is expected to know its behavior/capabilities.\r\n\r\nRegarding `netlabel.EnableIPv6`, its current use has it carrying the semantic  `enable ipv6 besides ipv4`, in order to satisfy the existing `docker daemon` `--ipv6` option.\r\n(There is also a proposal to add it to the `docker network` ui as first class option, currently in there it can only be passed as driver option).\r\n\r\nIn other words, ipv6 is currently considered optional and complementary to ipv4."}}