GoVM instances naming issue
Closed this issue · 2 comments
obedmr commented
When creating an instance without the --name
parameter, it will be created. Then, a second instance's creation without --name
will fail because it's trying to use the same latest created instance.
➜ govm create --image image.qcow2 --efi --cloud
INFO[0000] GoVM Instance happy-poitras has been successfully created
➜ govm list
ID Name Namespace IP
fbe73e890f happy-poitras myuser 172.17.0.9
➜ govm create --image image.qcow2 --efi --cloud
FATA[0000] Error when creating the new VM: Error response from daemon: Conflict. The container name "/govm.myuser.happy-poitras" is already in use by container "fbe73e890f85eec0604651ac8f718935d0dd5566e33898e01e69885d33eac6b5". You have to remove (or rename) that container to be able to reuse that name.
peterctl commented
This might have to do with the random seed used for the random name generator... Did you try this multiple times to ensure it was a reproducible error? If so, it might be a good idea to play around with the argument being passed to docker's namegenerator.RandomName
inside govm/internal/names.go
on RandomName
.
obedmr commented
This issue is not happening anymore. I've tested it by creating 100 instances with no --name
flag, it worked in all with the automatic generated new name.