Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Running overcast instance import with a name but no IP wipes out clusters.json #32

Closed
garnold opened this issue Jan 14, 2015 · 2 comments

Comments

@garnold
Copy link
Contributor

garnold commented Jan 14, 2015

Steps to reproduce (output below):

  1. Run overcast instance import to populate clusters.json. Also note that Overcast reports "Cluster sux-pi-3 has been created", however the cluster name is actually "sux-pis".
  2. Run overcast info to verify that the instance has been added to clusters.json.
  3. Run overcast instance import again, this time providing a name but no IP.
  4. Run overcast info to see that clusters.json is corrupt (the file is now empty).
overcast garnold$ ./bin/overcast instance import sux-pi-3 10.0.1.5 --cluster sux-pis --user pi
Cluster "sux-pi-3" has been created.
Instance "sux-pi-3" (10.0.1.5) has been imported to the "sux-pis" cluster.

overcast garnold$ ./bin/overcast info
Using /Users/garnold/.overcast/clusters.json

sux-pis

  sux-pi-3
    ip: 10.0.1.5
    name: sux-pi-3
    ssh_port: 22
    ssh_key: overcast.key
    user: pi

overcast garnold$ ./bin/overcast instance import whoops
Using "default" cluster.
Missing [ip] argument.

Usage:
  overcast instance import [name] [ip] [options...]

Description:
  Imports an existing instance to a cluster.

Options:                 Defaults:
  --cluster CLUSTER      default
  --ssh-port PORT        22
  --ssh-key PATH         overcast.key
  --user USERNAME        root
  --password PASSWORD    

Examples:
  $ overcast instance import app.01 127.0.0.1 --cluster app \
      --ssh-port 22222 --ssh-key $HOME/.ssh/id_rsa

overcast garnold$ ./bin/overcast info
Unable to parse the clusters.json file. Please correct the parsing error.
@andrewchilds
Copy link
Owner

Good catch @garnold - this is fixed in 0.6.8.

@garnold
Copy link
Contributor Author

garnold commented Jan 14, 2015

Awesome!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants