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

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

Build:
Build:
LAST BUILD BRANCH: topic/config-subnet-bits
DEFAULT BRANCH: master
Ran 23 Jan 2017 04:44PM UTC
Jobs 3
Files 99
Run time 10min
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
367

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>

14567 of 21821 relevant lines covered (66.76%)

2.12 hits per line

Jobs
ID Job ID Ran Files Coverage
1 367.1 (COVERALLS_TOKEN=mwTn1pOFqEOUT13vylZNHq53NanoMznO7) 23 Jan 2017 04:44PM UTC 0
66.76
Travis Job 367.1
2 367.2 (COVERALLS_TOKEN=mwTn1pOFqEOUT13vylZNHq53NanoMznO7) 23 Jan 2017 04:44PM UTC 0
66.74
Travis Job 367.2
3 367.3 (COVERALLS_TOKEN=mwTn1pOFqEOUT13vylZNHq53NanoMznO7) 23 Jan 2017 04:54PM UTC 0
66.28
Travis Job 367.3
Source Files on build 367
Detailed source file information is not available for this build.
  • Back to Repo
  • Travis Build #367
  • 96835312 on github
  • Next Build on fix-1007 (#368)
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