-
-
Notifications
You must be signed in to change notification settings - Fork 261
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
Add linstor
storage driver
#1621
base: main
Are you sure you want to change the base?
Conversation
We expect to send integration tests validating the scenarios in the next few days. I think we'll probably need some Linstor setup on the testing environment as well. |
ea94519
to
cf18bb1
Compare
There's a bunch of static analysis failure around code styling/formatting that should be pretty easy to handle. |
5723ea8
to
6d4dede
Compare
func (d *Daemon) getLinstor() (*linstor.Client, error) { | ||
// Setup the client if it does not exist | ||
if d.linstor == nil { | ||
err := d.setupLinstor() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I’m seeing a small race condition leading to a double execution of setupLinstor
:
getLinstor
gets called until after thed.linstor == nil
condition is checkedsetupLinstor
gets called beforeerr := d.setupLinstor()
gets calledsetupLinstor
gets called again byerr := d.setupLinstor()
.
I’d put a synchronization here…
7c04d43
to
3d7e8c7
Compare
Hey @stgraber just a quick update on the state of things. @winiciusallan, @bensmrs and I did a quick call about the current state of the implementation and the next steps. Here are the main takeaways:
|
c38398e
to
120ae22
Compare
…hot volumes Signed-off-by: Luís Simas <[email protected]> Co-authored-by: Benjamin Somers <[email protected]>
Signed-off-by: Luís Simas <[email protected]> Co-authored-by: Benjamin Somers <[email protected]>
5fca045
to
a2e483d
Compare
8045125
to
672bdc5
Compare
Signed-off-by: Benjamin Somers <[email protected]> Co-authored-by: Luís Simas <[email protected]>
Signed-off-by: Benjamin Somers <[email protected]>
Signed-off-by: Benjamin Somers <[email protected]>
Signed-off-by: Luís Simas <[email protected]>
Signed-off-by: Luís Simas <[email protected]>
Signed-off-by: Benjamin Somers <[email protected]>
Signed-off-by: Benjamin Somers <[email protected]>
Signed-off-by: Luís Simas <[email protected]>
…ng of volumes with snapshots Signed-off-by: Luís Simas <[email protected]>
Signed-off-by: Benjamin Somers <[email protected]>
Signed-off-by: Luís Simas <[email protected]>
Signed-off-by: Luís Simas <[email protected]>
Signed-off-by: Luís Simas <[email protected]>
Signed-off-by: Luís Simas <[email protected]>
Signed-off-by: Benjamin Somers <[email protected]>
Signed-off-by: Luís Simas <[email protected]>
…r resource definitions Signed-off-by: Luís Simas <[email protected]>
…rieving device paths Signed-off-by: Luís Simas <[email protected]>
…grating lxc instances Signed-off-by: Luís Simas <[email protected]>
…olumes Signed-off-by: Luís Simas <[email protected]>
Signed-off-by: Luís Simas <[email protected]> Co-authored-by: Benjamin Somers <[email protected]>
Signed-off-by: Benjamin Somers <[email protected]>
Description
This PR introduces a new
linstor
storage driver to enable provisioning of volumes backed by LINSTOR, as discussed in #564. Currently only the following core features are implemented:linstor
root volumeOther features such as snapshots, migrating volumes, optimized images, etc are planned to be handled in subsequent PRs.
For an easy way to deploy Linstor alongside Incus, check out lxc/incus-deploy#20.
Example
The following example shows some simple use cases that were tested while developing the core driver functionality. In this example we set the
storage.linstor.controller_connection
option and create a newlinstor
storage pool. We then create a virtual machinev1
usinglinstor
as the storage pool for the root volume. We then create a custom block volumedata
, attach it to the virtual machine and write some data to it. Then, we delete thev1
instance and create a newv2
instance in another node. Finally, we verify that we can attach thedata
volume to the new instance and retrieve its data.