Skip to content
This repository has been archived by the owner on Feb 14, 2018. It is now read-only.

Fixed double callback invoke that would break deployments and crash agent #37

Merged
merged 1 commit into from
Sep 6, 2012

Conversation

ryanrolds
Copy link
Contributor

An async.forEachSeries iterators callback was being fired twice. This only manifested when cast.json data_files included a dir and that dir needed to be copied to the instance data during deployment. The deployment would claim to complete, but not symlink the dir. The agent would then crash when async tried another pass with a bad dataFile var.

opt/cast/cast/lib/deployment/files.js:95
    var dataFileIsDirectory = (dataFile[dataFile.length - 1] === '/');
                                                ^
TypeError: Cannot read property 'length' of undefined
    at /opt/cast/cast/lib/deployment/files.js:95:49
    at /opt/cast/cast/node_modules/async/lib/async.js:91:13
    at /opt/cast/cast/node_modules/async/lib/async.js:99:26
    at addToPathsToLinkArray (/opt/cast/cast/lib/deployment/files.js:51:5)
    at /opt/cast/cast/lib/deployment/files.js:111:17
    at callback (/opt/cast/cast/lib/util/fs.js:198:5)
    at dirdone (/opt/cast/cast/lib/util/fs.js:241:17)
    at callback (/opt/cast/cast/lib/util/fs.js:198:5)
    at dirdone (/opt/cast/cast/lib/util/fs.js:241:17)
    at callback (/opt/cast/cast/lib/util/fs.js:198:5)

…iles. Would break deployment and not link dir.
@russellhaering
Copy link
Member

Looks good.

russellhaering added a commit that referenced this pull request Sep 6, 2012
Fixed double callback invoke that would break deployments and crash agent
@russellhaering russellhaering merged commit e64fe64 into cloudkick:develop Sep 6, 2012
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants