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

Check for already running corectl & stop old version before upgrade #81

Open
quinncomendant opened this issue Jul 12, 2016 · 1 comment

Comments

@quinncomendant
Copy link

I've just brew upgrade corectl and run the new version:

corectld start;
corectl run --offline --channel beta --volume ~/var/coreos/var_lib_docker3.img --cloud_config ~/var/coreos/docker-only-with-persistent-storage.txt --cpus 1 --memory 1024 --name containerland --uuid 11111111-1111-1111-1111-111111111111 --debug;

Running corectl failed with:

[ERROR] Couldn't decode response. Unable to grab VM's IP after 30s (!)... Aborted

I then noticed my old version of corectl was still running:

[q@x] ps ax -o pid,user,command | grep corectl
68775 root  corectl xhyve bGlieGh5dmVfYnVnIC1zIDA6MCxob3N0YnJpZGdlIC1zIDUsdmlydGlvLXJuZCAtbCBjb20xLHN0ZGlvIC1zIDMxLGxwYyAtVSAxMTExMTExMS0xMTExLTExMTEtMTExMS0xMTExMTExMTExMTEgLW0gMTAyNE0gLWMgMSAtQSAtcyAyOjAsdmlydGlvLW5ldCAtcyA0OjAsdmlydGlvLWJsaywvVXNlcnMvcS92YXIvY29yZW9zL3Zhcl9saWJfZG9ja2VyMy5pbWc= a2V4ZWMsL1VzZXJzL3EvLmNvcmVvcy9pbWFnZXMvYmV0YS8xMDY4LjIuMC9jb3Jlb3NfcHJvZHVjdGlvbl9weGUudm1saW51eiwvVXNlcnMvcS8uY29yZW9zL2ltYWdlcy9iZXRhLzEwNjguMi4wL2NvcmVvc19wcm9kdWN0aW9uX3B4ZV9pbWFnZS5jcGlvLmd6LA== ZWFybHlwcmludGs9c2VyaWFsIGNvbnNvbGU9dHR5UzAgY29yZW9zLmF1dG9sb2dpbiB1dWlkPTExMTExMTExLTExMTEtMTExMS0xMTExLTExMTExMTExMTExMSBlbmRwb2ludD1odHRwOi8vMTkyLjE2OC42NC4xOjQ5ODI2L2NvbnRhaW5lcmxhbmQgY2xvdWQtY29uZmlnLXVybD1odHRwOi8vMTkyLjE2OC42NC4xOjQ5ODI2L2NvbnRhaW5lcmxhbmQvY2xvdWQtY29uZmln
20346 root  /usr/local/bin/corectld start --user q

Of course this causes problems (the above error probably just one). Since some users might not notice that an old version is running in the background, I suggest two changes:

  • corectl and corectld check if old (or same) version already running and gives error if so.
  • update Homebrew recipe so it will stop the old running copy of corectl during upgrade.
@AntonioMeireles
Copy link
Member

@quinncomendant the 1st part of your suggestion is doable and very relevant, albeit tricky - as whre we have most interest in stopping running corectl sessions is when they are pre 0.7.x and in pre-0.7.x there's no corectld to do that for us cleanly.
The homebrew part is trickier as afaict there 's no way to do that from a brew Formula. (and there's the additional issue that corectld is running as root). Anyway looking at ways to smooth this. Thanks!

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

No branches or pull requests

2 participants