Skip to content

TrueNAS Incus Driver - iSCSI#2

Merged
mrstux merged 1004 commits intoadd-truenas-storage-driverfrom
se/add-truenas-iscsi
May 26, 2025
Merged

TrueNAS Incus Driver - iSCSI#2
mrstux merged 1004 commits intoadd-truenas-storage-driverfrom
se/add-truenas-iscsi

Conversation

@mrstux
Copy link
Copy Markdown
Collaborator

@mrstux mrstux commented May 26, 2025

Re-implements the TrueNAS Incus storage driver using iSCSI instead of NFS

The127 and others added 30 commits April 28, 2025 11:18
Removes code in the internalImportFromBackup function that was unreachable since the same condition further up leads to a return of the function.

Signed-off-by: karo <karolin.kostial@gmail.com>
Removes an unnecessary err check in archive.go. `err`is always nil in this case.

Signed-off-by: karo <karolin.kostial@gmail.com>
…ctively

Refactors unnecessary condition checks where the result of the condition was always true or false respectively.

Signed-off-by: karo <karolin.kostial@gmail.com>
Refactors unnecessary err checks where err was already known to be nil or not nil respectively.

Signed-off-by: karo <karolin.kostial@gmail.com>
Refactors an unnecessary err check where err was already known to be nil.

Signed-off-by: karo <karolin.kostial@gmail.com>
Removes an unnecessary err check where ioErr was never assigned to a value and therefore always nil. Also removes the variable all together since it is now no longer used anywhere.

Signed-off-by: karo <karolin.kostial@gmail.com>
Refactors a wrong err check where err was checked but err2 should have been checked.

Signed-off-by: karo <karolin.kostial@gmail.com>
Refactors a wrong for loop where a qemu device is being looked up. The loop started by setting `deviceFound` to true instead of false.

Signed-off-by: karo <karolin.kostial@gmail.com>
Signed-off-by: Benjamin Somers <benjamin.somers@imt-atlantique.fr>
incusd/firewall/nftables: Fix handling of address set deletion
Refactors the initialization code for the config in admin_init.go. This switch case based approach represents the intention of the if chain, since the cases are exclusive.

Signed-off-by: karo <karolin.kostial@gmail.com>
In some busy environments, the 2.5s timeout wasn't quite enough.

Signed-off-by: Stéphane Graber <stgraber@stgraber.org>
Sponsored-by: Luizalabs (https://luizalabs.com)
Add server-side filtering for incus storage bucket list
Add support for running the Incus agent on Windows
Refactors the DHCPValidIP condition checks. The way it was written had a redundant else branch to check the `inSubnet` variable.

Signed-off-by: karo <karolin.kostial@gmail.com>
incusd/network/ovn: Wait up to 10s for OVN northd to allocate an IP
incusd: refactor process kill error being ignored
incusd/instance: fix device finding logic
…le-code

incusd: remove unreachable code in api internal
Rewrite legacy QEMU config code
Signed-off-by: Piotr Resztak <piotr.resztak@futurfusion.io>
Set time limit for sendControl to avoid I/O timeouts after large file
transfers.

Signed-off-by: Piotr Resztak <piotr.resztak@futurfusion.io>
Signed-off-by: Piotr Resztak <piotr.resztak@futurfusion.io>
Signed-off-by: Piotr Resztak <piotr.resztak@futurfusion.io>
…volumes

Signed-off-by: Piotr Resztak <piotr.resztak@futurfusion.io>
Signed-off-by: Stéphane Graber <stgraber@stgraber.org>
incus: refactor admin_init.go config initialization
Signed-off-by: Rahaf Aljerwi <aljerwi.rahaf@yahoo.com>
Signed-off-by: Rahaf Aljerwi <aljerwi.rahaf@yahoo.com>
Stuart Espey added 27 commits May 13, 2025 04:44
…eware

The TrueNAS middleware does not allow shrinking. The shrinking can be effected by
using `zfs set zvolsize` on the server, but not from the driver. In the future there
may be a better solution.

As the errors are ignored, the size and size.state properties will be updated in
incus.
the tests perform volume shrinking. We now ignore failed zvol shrinking so
can pass the tests.
force_reuse will allow the driver to adopt a remote dataset which already has content
…6, --allow-shrinking

The v0.6 truenas tool refactored the global arguments, allowing a simplication to the truenas.* properties
supported by the driver.

Primarily, truenas.url has been removed, and truenas.config, truneas.config-file and truenas.allow_insecure have been added

Note, you do not need to supply any properties except truenas.dataset, which can be derived from source. The other properties
optional, and the local trunas tool's default config will be used

In the tool, `-H` is now used for --host, instead of --no-headers, meaning the driver must replace its usage of -H with --no-headers

Additionally, --allow-shrinking support has been added, even though the middleware does not support this functionality yet.
not currently implemented in v0.6
`locate --create` allows locating, activating or creating then activating a dataset in single step.
allow-shrink will be used in the future to allow zvol shrinking when the mw supports it
@mrstux mrstux merged commit 96e3e92 into add-truenas-storage-driver May 26, 2025
27 of 37 checks passed
@mrstux mrstux deleted the se/add-truenas-iscsi branch May 26, 2025 09:06
@mrstux mrstux restored the se/add-truenas-iscsi branch May 26, 2025 09:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.