Skip to content
This repository was archived by the owner on Aug 16, 2021. It is now read-only.

Conversation

NikolayS
Copy link
Collaborator

@NikolayS NikolayS commented Jul 9, 2018

Since docker-machine rm --force ... wasn't helpful for removing Spot Requests with "price-too-low" status, we need to use AWS CLI to do that.

Additionally, in this PR

  • createDockerMachine function doesn't use global vars anymore
  • destroyDockerMachine function added
  • cleanup function renamed to cleanupAndExit and moved to the top to allow interruptions (Ctrl-C ) at early stages
  • summary items reordered
  • some error messages from AWS pruned

How to check

Run any experiment on r4.xlarge instance (usually their spot prices are increased, sign of high demand):

echo "create table aaa as select i::int4 from generate_series(1, 1000000) _(i);" > ~/tmp/test.dump
bzip2 ~/tmp/test.dump

nancy run --workload-custom-sql 'select now();'   \
  --db-dump-path file://$(echo ~)/tmp/test.dump.bz2 --tmp-path $(echo ~)"/tmp"   \
  --run-on aws --aws-ec2-type r4.xlarge \
  --aws-keypair-name awskey --aws-ssh-key-path /home/nikolay/.ssh/awskey.pem

Something like that should appear after the 1st attempt to launch an instance:

Price .0700700 is too low for r4.xlarge instance. Getting the up-to-date value from the error message...
{
    "CancelledSpotInstanceRequests": [
        {
            "State": "cancelled",
            "SpotInstanceRequestId": "sir-icjg4brg"
        }
    ]
}

-- and in web console the corresponding spot request should be in "cancelled" state.

@NikolayS NikolayS requested a review from dmius July 9, 2018 00:06
@NikolayS NikolayS self-assigned this Jul 9, 2018
@NikolayS NikolayS requested a review from myyorick July 9, 2018 00:06
@NikolayS NikolayS assigned myyorick and dmius and unassigned NikolayS Jul 9, 2018
@NikolayS NikolayS merged commit dffbfa9 into master Jul 9, 2018
@NikolayS NikolayS deleted the price_too_low_cleanup branch July 9, 2018 05:42
NikolayS added a commit that referenced this pull request Sep 18, 2018
Cleanup spot requests with price-too-low status
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants