Import createcluster.js from commit 1ec46f5

This is a code import into the release branch, to fix a bug found during testing.