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
Not able to issue migration #315
Comments
Hi @gabrik You're not misusing the API; unfortunately the version of pylxd you are using is not compatible with the version of lxd you are using. The Which version of lxd are you using ( |
Hi @ajkavanagh I'm using lxd version 3.2 and pylxd 2.2.4 on Xenial |
Yes, I'm pretty sure that 2.2.5 has a fix to this; latest is 2.2.7, but it as an |
Thanks @ajkavanagh
Both nodes have the other one in the list of the remote, but I don't think this is mandatory |
@gabrik The error is actually coming from LXD (i.e. it is being passed through pylxd directly from LXD). However, it could be because pylxd is sending the wrong data, or lxd is not happy with the chatting to the other lxd server. Can you look at versions on the two servers? Are they mostly compatible? |
Thanks @ajkavanagh the version of LXD is the same in both servers (3.2) installed using snap In destination node:
Nothing is written in the source node obviously if I try to sniff the traffic between the two nodes to see the messages I cannot get anything because it is encrypted |
@ajkavanagh I have found I way to make this work, I have to use the correct ip address also when connecting to the source node, the address should be reachable from the destination node.
I always got this:
and the container on the source node remain stopped, I think is because the migration method ends due to the exception above I think this should be well documented, can I add this example to the documentation? |
@gabrik yes, please! Please do submit a PR for any changes/additions to the documentation that you think might be helpful! |
Even if the migration works I got this error:
I think that cames from some reason from here https://github.com/lxc/pylxd/blob/master/pylxd/models/container.py#L425 For what I understand if the container is migrated when is running, the create tries to set it running again and so it returns this error. I am correct? |
I'm closing this as I think it is largely answered/covered by #319. Please feel free to re-open it if there is still an issue NOT related to the actual migration code. |
Hi, I'm still facing this issue with LXD 3.0.3 LTS and the latest version of pylxd running in Ubuntu 18.04. |
@Oussalvatore Please could you: a) Indicate the exact version of pylxd Thanks very much. |
@ajkavanagh Sorry for the late reply, a) Since I thought that the new "live" parameter will solve the problem, currently I'm using pylxd==2.2.10.dev17, however I had the same problem with the version 2.2.9, and I'have just tried the newly released version 2.2.10 but the problem still there. b)
2- The execution traceback is:
Also, bellow you'll find the output of "lxc monitor" rununnig in the destination host:
Thank you :) |
I've checked the code, and it's not obvious what the error might be. Which version of LXD are you using (on both source and target). Are they clustered (i.e. via LXD clustering) vs. standalone? The trace seems to indicate that the container was already started on the target? Is it a naming issue? (i.e. could there have already been a container with the same name on the target)? |
@ajkavanagh I'm using LXD 3.0.3 LTS in standalone mode. I'm sure that the container doesn't exist in the target host. It would be great if you can reproduce the error with the LTS version of LXD. |
@Oussalvatore thanks for the additional info. I'll have to sort out a lab for testing this (it's re-purposed at present), so any additional debug you can offer would be useful. e.g. does it work with straight lxc commands at the CLI, etc. |
Hi everyone,
I'm trying to Live Migrate a very simple container (an empty alpine/edge one) though two different machines
If I use the LXD cli interface the migration works pretty well
But if I try using pylxd API I got some errors, the code is pretty simple:
I'm using
endpoint
also for localhost otherwise I getThe error that I get is this one:
I'm misusing the API?
The text was updated successfully, but these errors were encountered: