• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

01org / ciao / 368 / 3
67%
master: 66%

Build:
Build:
LAST BUILD BRANCH: topic/config-subnet-bits
DEFAULT BRANCH: master
Ran 24 Jan 2017 11:14AM UTC
Files 99
Run time 5s
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

24 Jan 2017 11:07AM UTC coverage: 66.781% (+0.5%) from 66.28%
COVERALLS_TOKEN=mwTn1pOFqEOUT13vylZNHq53NanoMznO7

push

travis-ci

markdryan
controller: Fix race condition in confirmTenant

This commit ensures that confirmTenant is only successfully called once
for each tenant during any invocation of controller.  The problem is
that confirmTenant is not re-entrant and yet can be called by multiple
go routines simulataneously.  This means that a ciao cluster can be
broken by two commands issued simultaneously on a new tenant.

The tricky thing about fixing this bug is that we cannot really protect
the whole function with a mutex.  The function is potentially very slow
as it optionally needs to wait for a CNCI to launch.  Using a critical
section for the entire function would result in commands for existing
tenants being blocked while a CNCI was launched for a new tenant, which
wouldn't be great.

The fix works by introducing tenant specific channels that provide
synchronisation points for individual tenants.  These channels are
stored in a global map.  This map requires a lock, but the lock only
needs to be held for a short period of time, the time taken to
read or write something to the map.  Thus the act of launching a
CNCI on a tenant blocks only commands on that tenant and not commands
destined for other tenants.

The fix assumes that tenants do not get deleted, and if they do, that
their UUIDs do not get re-used.

Fixes #1007

Signed-off-by: Mark Ryan <mark.d.ryan@intel.com>

14549 of 21786 relevant lines covered (66.78%)

0.72 hits per line

Source Files on job 368.3 (COVERALLS_TOKEN=mwTn1pOFqEOUT13vylZNHq53NanoMznO7)
  • Tree
  • List 0
  • Changed 2
  • Source Changed 1
  • Coverage Changed 1
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Build 368
  • Travis Job 368.3
  • 6c6c697c on github
  • Prev Job for COVERALLS_TOKEN=mwTn1pOFqEOUT13vylZNHq53NanoMznO7 on fix-1007 (#367.3)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc