-
Notifications
You must be signed in to change notification settings - Fork 133
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
pylxd Connection error on fresh installed LXD from snap #365
Labels
Comments
Who are you running this as? |
Yup, I've reproduced this. It's basically, the "pkg or snap" socket detection software that fails because the socket that the pkg lxd used is still there after the package has been removed and the daemon is no longer running (or exists). The detection behaviour changed to "package first" from "snap first" ... in retrospect, this was a mistake. Workarounds:
|
ajkavanagh
added a commit
to ajkavanagh/pylxd
that referenced
this issue
Jun 10, 2019
A previous change (which added LXD_DIR) switched around the detection of whether LXD is installed as a snap or a package to "test for packaged first". Unfortunately, the LXD pkg leaves behind the unix socket after it is uninstalled when the snap is installed on xenial and a lxd.migrate command is issued. This means that the detection code fails. This patch reverts the behaviour to look "test for snapped first". This is reasonable as the only way that a both unix socket files could exist is if the snapped version was added to a pkg version default install (e.g. Xenial). As running both isn't really a supported scenario, the default of checking for the snap first is more likely to work in most default scenarios. The LXD_DIR environment variable is still available if it needs overriding for the corner cases. Fixes: canonical#365
ajkavanagh
added a commit
to ajkavanagh/pylxd
that referenced
this issue
Jun 10, 2019
A previous change (which added LXD_DIR) switched around the detection of whether LXD is installed as a snap or a package to "test for packaged first". Unfortunately, the LXD pkg leaves behind the unix socket after it is uninstalled when the snap is installed on xenial and a lxd.migrate command is issued. This means that the detection code fails. This patch reverts the behaviour to look "test for snapped first". This is reasonable as the only way that a both unix socket files could exist is if the snapped version was added to a pkg version default install (e.g. Xenial). As running both isn't really a supported scenario, the default of checking for the snap first is more likely to work in most default scenarios. The LXD_DIR environment variable is still available if it needs overriding for the corner cases. Fixes: canonical#365 Signed-off-by: Alex Kavanagh <alex.kavanagh@canonical.com>
ajkavanagh
added a commit
to ajkavanagh/pylxd
that referenced
this issue
Jun 11, 2019
A previous change (which added LXD_DIR) switched around the detection of whether LXD is installed as a snap or a package to "test for packaged first". Unfortunately, the LXD pkg leaves behind the unix socket after it is uninstalled when the snap is installed on xenial and a lxd.migrate command is issued. This means that the detection code fails. This patch reverts the behaviour to look "test for snapped first". This is reasonable as the only way that a both unix socket files could exist is if the snapped version was added to a pkg version default install (e.g. Xenial). As running both isn't really a supported scenario, the default of checking for the snap first is more likely to work in most default scenarios. The LXD_DIR environment variable is still available if it needs overriding for the corner cases. Fixes: canonical#365 Signed-off-by: Alex Kavanagh <alex.kavanagh@canonical.com>
Merged
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi all,
I'm experiencing some issue in using pylxd on a fresh installed machine.
Ubuntu 16.04
LXD 3.13 from snap
all default lxd init
pylxd 2.2.10
Just for information,
same pylxd and LXD version on Ubuntu 18.04 works
Any idea?
The text was updated successfully, but these errors were encountered: