dotCMS / core

Headless/Hybrid Content Management System for Enterprises
http://dotcms.com
Other
865 stars 467 forks source link

Auto Cluster Licensing Race Condition #6581

Closed brentgriffin closed 10 years ago

brentgriffin commented 10 years ago

When servers using the autowire functionality startup there is a race condition that exists as it relates to the claiming of licenses from the cluster licence pack. In this test on a four node cluster, three servers all grabbed the same license.

Steps to recreate:

  1. Configure multiple node cluster (just share assets and db - autowire will do the rest) - the more nodes the more likely to recreate issue. (Only took 2 tries with a four node cluster)
  2. Start node one to create db schema
  3. Login to backend of node one
  4. Upload cluster license pack (with enough licenses for your nodes)
  5. Grab license for node one
  6. As simultaneously as possible start the remaining nodes.
  7. Log into backend of each node and go to configuration->License Manager page to see what licenses were grabbed.

Ubuntu 14.04 LTS // Open JDK 7u65-2.5.2-3~14.04 // Postgres DB // 20141010 Nightly build

In screenshots below, notice how nodes 2, 3, and 4 all have the same server ID and License ID:

Node 2

image

Node 3

image

Node 4

image

wezell commented 10 years ago

And servers with the same id should not be able to cluster together.....