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

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

Build:
Build:
LAST BUILD BRANCH: topic/config-subnet-bits
DEFAULT BRANCH: master
Ran 24 Jan 2017 11:12AM UTC
Jobs 3
Files 99
Run time 2min
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

pending completion
368

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>

14567 of 21821 relevant lines covered (66.76%)

2.15 hits per line

Jobs
ID Job ID Ran Files Coverage
1 368.1 (COVERALLS_TOKEN=mwTn1pOFqEOUT13vylZNHq53NanoMznO7) 24 Jan 2017 11:12AM UTC 0
66.72
Travis Job 368.1
2 368.2 (COVERALLS_TOKEN=mwTn1pOFqEOUT13vylZNHq53NanoMznO7) 24 Jan 2017 11:12AM UTC 0
66.8
Travis Job 368.2
3 368.3 (COVERALLS_TOKEN=mwTn1pOFqEOUT13vylZNHq53NanoMznO7) 24 Jan 2017 11:14AM UTC 0
66.78
Travis Job 368.3
Source Files on build 368
Detailed source file information is not available for this build.
  • Back to Repo
  • Travis Build #368
  • 6c6c697c on github
  • Prev Build on fix-1007 (#367)
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