Closed bigjools closed 8 years ago
That is, hmm, special. It sure isn't a generalized problem as that very thing is very actively tested in our testsuite and by our users...
The error suggests some kind of collision in the database of the target server.
sqlite3 /var/lib/lxd/lxd.db .dump
Would probably provide enough information to figure out what the problem is and what to do to make it happy again. Figuring out how it go to that state is a whole different problem though...
We used to have a couple of issues around database cleanup that was leading to that sort of issue, but that far predates LXD 2.0 and we've had a CI check in place to ensure that the database is clean after every test run since.
Ok I think I know how I got into the state because I just did a successful copy with a new target name.
The key - I hit ctrl-c part way through, and then retried. The retry fails with the error.
If you lxc list after ctrl-c, you can see the container listed, and it should not be. This looks like a transactional error.
On 18 August 2016 at 13:33, Stéphane Graber notifications@github.com wrote:
That is, hmm, special. It sure isn't a generalized problem as that very thing is very actively tested in our testsuite and by our users...
The error suggests some kind of collision in the database of the target server.
sqlite3 /var/lib/lxd/lxd.db .dump
Would probably provide enough information to figure out what the problem is and what to do to make it happy again. Figuring out how it go to that state is a whole different problem though...
We used to have a couple of issues around database cleanup that was leading to that sort of issue, but that far predates LXD 2.0 and we've had a CI check in place to ensure that the database is clean after every test run since.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/lxc/lxd/issues/2293#issuecomment-240615283, or mute the thread https://github.com/notifications/unsubscribe-auth/ALHikc0Nqizqr2ivmheP9pRQy8HSLnkWks5qg9KjgaJpZM4JnGRP .
Ok, so you actually attempted to initiate a second copy while the first was still going, leading to the collision in the DB, I guess that makes sense.
Right now, pressing ctrl-c at any point in LXD will never cancel the server side operation after it started. That's partly because most server side operation aren't cancel-able (go routines can't be killed...) and also because we don't actually catch ctrl-c in the client in the first place...
Fair enough. It's a surprising UI scenario though, and apart from dealing with ctrl-c, you should be able to cancel this as it's copying hundreds of megs around, and if you get the wrong one by mistake you can end up eating up bandwidth until it finishes.
On 18 August 2016 at 13:42, Stéphane Graber notifications@github.com wrote:
Ok, so you actually attempted to initiate a second copy while the first was still going, leading to the collision in the DB, I guess that makes sense.
Right now, pressing ctrl-c at any point in LXD will never cancel the server side operation after it started. That's partly because most server side operation aren't cancel-able (go routines can't be killed...) and also because we don't actually catch ctrl-c in the client in the first place...
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/lxc/lxd/issues/2293#issuecomment-240616268, or mute the thread https://github.com/notifications/unsubscribe-auth/ALHikX07zMvdWejPElxIWIVN3ZPfQxPGks5qg9TDgaJpZM4JnGRP .
Can you try recycling the name that caused the DB error just to confirm that you didn't actually end up with a corrupted DB in the end?
If it looks like it's fine now, then I guess we can close this bug and track the ctrl-c experience in the bug I just filed.
Yep, I can create new instances with the names that were failing.
Cheers.
On 18 August 2016 at 14:10, Stéphane Graber notifications@github.com wrote:
Can you try recycling the name that caused the DB error just to confirm that you didn't actually end up with a corrupted DB in the end?
If it looks like it's fine now, then I guess we can close this bug and track the ctrl-c experience in the bug I just filed.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/lxc/lxd/issues/2293#issuecomment-240619158, or mute the thread https://github.com/notifications/unsubscribe-auth/ALHikTeavm8WeJtCBO6RfimA0dub3Oahks5qg9tSgaJpZM4JnGRP .
Required information
Issue description
As per the title
Steps to reproduce
Just copy a container from one remote to another.
Information to attach
LXD log shows: t=2016-08-18T13:09:48+1000 lvl=eror msg="Error during migration sink" err="FOREIGN KEY constraint failed"
And that is all you see, apart from comms logging with the remote LXD from a few minutes prior.