/NetworkDriver.CreateEndpoint validation is failing with docker 1.9.0

Bug #1507508 reported by vikas choudhary
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
kuryr
Fix Committed
Undecided
vikas choudhary

Bug Description

In Interface properties, Address and AddressIPv6 are coming as empty strings from libnetwork and that is breaking current validation logic.

root@vikas-VirtualBox:/home/vikas/kuryr# sudo docker run --net=voo -itd --name=container1 busybox
8ae45742d9ee680905dc2faad2f3d71a4508f8276b400270333d8e3b2631ad46

Error response from daemon: Cannot start container 8ae45742d9ee680905dc2faad2f3d71a4508f8276b400270333d8e3b2631ad46: failed to create endpoint container1 on network voo: Plugin Error: NetworkDriver.CreateEndpoint, {
  "Err": "u'' does not match u'^((([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}\\\\:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\\\\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\\\\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))(/(1[0-2][0-8]|[1-9]?[0-9])))$'\n\nFailed validating u'pattern' in schema[u'properties'][u'Interface'][u'properties'][u'AddressIPv6']:\n {u'description': u'A IPv6 CIDR of the subnet',\n u'pattern': u'^((([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}\\\\:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\\\\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\\\\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))(/(1[0-2][0-8]|[1-9]?[0-9])))$',\n u'type': u'string'}\n\nOn instance[u'Interface'][u'AddressIPv6']:\n u''

Changed in kuryr:
assignee: nobody → vikas choudhary (choudharyvikas16)
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to kuryr (master)

Fix proposed to branch: master
Review: https://review.openstack.org/236936

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to kuryr (master)

Reviewed: https://review.openstack.org/236936
Committed: https://git.openstack.org/cgit/openstack/kuryr/commit/?id=81a89f2bc2f3d5a4e140c935d3835cc2d3acb8a5
Submitter: Jenkins
Branch: master

commit 81a89f2bc2f3d5a4e140c935d3835cc2d3acb8a5
Author: Vikas Choudhary <email address hidden>
Date: Mon Oct 19 17:33:43 2015 +0530

    Fix /NetworkDriver.CreateEndpoint validation

    In Interface properties, Address and AddressIPv6 are coming as empty
    strings from libnetwork and that is breaking current validation logic.
    Logic is added to accept empty string also for mac and ipv4 address.

    Change-Id: Ib32bee76c6add1c5af616b7d74b346eef906fa8b
    Closes-Bug: #1507508

Changed in kuryr:
status: In Progress → Fix Committed
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.