`overcast instance import` allows duplicate instance names
garnold opened this issue · 2 comments
garnold commented
Hey @andrewchilds,
Not sure if this is a bug or feature, but overcast instance import
allows you to enter duplicate instance names:
garnold$ overcast init
garnold$ overcast cluster create cluster-1
Cluster "cluster-1" has been created.
garnold$ overcast cluster create cluster-2
Cluster "cluster-2" has been created.
garnold$ overcast instance import instance-1 127.0.0.1 --cluster cluster-1
Instance "instance-1" (127.0.0.1) has been imported to the "cluster-1" cluster.
garnold$ overcast instance import instance-1 127.0.0.1 --cluster cluster-2
Instance "instance-1" (127.0.0.1) has been imported to the "cluster-2" cluster.
garnold$ overcast info
Using /Users/garnold/.overcast/clusters.json
cluster-1
instance-1
ip: 127.0.0.1
name: instance-1
ssh_port: 22
ssh_key: overcast.key
user: root
password: ""
cluster-2
instance-1
ip: 127.0.0.1
name: instance-1
ssh_port: 22
ssh_key: overcast.key
user: root
password: ""
... which doesn't place nicely with commands like overcast ssh
or overcast instance update
which don't have options to disambiguate which instance/cluster combo you're referring to.
andrewchilds commented
Agree, Overcast should make it a rule that instance names are unique across clusters. Will do.
garnold commented
Boom! Thanks