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

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

Build:
Build:
LAST BUILD BRANCH: topic/config-subnet-bits
DEFAULT BRANCH: master
Ran 23 Jan 2017 04:54PM UTC
Files 98
Run time 14s
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

23 Jan 2017 04:38PM UTC coverage: 66.28%. First build
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 was called by multiple
go routines simulataneously.  This mean that a ciao cluster could 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>

13883 of 20946 relevant lines covered (66.28%)

0.71 hits per line

Source Files on job 367.3 (COVERALLS_TOKEN=mwTn1pOFqEOUT13vylZNHq53NanoMznO7)
  • Tree
  • List 0
  • Changed 0
  • Source Changed 0
  • Coverage Changed 0
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Build 367
  • Travis Job 367.3
  • 96835312 on github
  • Next Job for COVERALLS_TOKEN=mwTn1pOFqEOUT13vylZNHq53NanoMznO7 on fix-1007 (#368.2)
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