Conversation
0f4c846 to
a9a6817
Compare
|
Launching a new instance with a TrueNAS without iSCSI configure says: <truenas_incus_ctl> share iscsi portal create --ip --port |
|
Logging in using the truenas incus ctl does not seem to work without a SSL certificate: |
|
After manually creating the portal: I had to manually start iSCSI service, a hint would have been great. After that: I tried creating initiator group but got same error. It seems truenas_incus_ctl is hard-coding initiator id 1. |
This bug has been fixed in truenas_incus_ctl now |
I've added a hint to the instructions at the top of this post, and there is an issue to add iscsi service control support to the tool. Once that's added I'll include the exact incantation to ensure the iscsi service is created.
Enhanced Portal + Initiator support is being implemented in the Tool. Once this is implemented, portal+initiator creation/usage should be automatic, but the driver has properties that will allow overriding the automatic selections (tool support is required) |
|
The issues described in this thread should all be fixed, but more testing will be conducted to confirm. |
c1ff8a9 to
cc5588d
Compare
e49e5a0 to
1f37754
Compare
|
|
@stgraber I don’t believe the Linstor failure is related to this PR |
|
Yeah, it's not, we're seeing it everywhere now, something must have changed in Linstor. |
1f37754 to
9b68c3d
Compare
The TrueNAS storage driver uses open-iscsi, which is incompatible with net-ns, which is used by the cluster tests
This file was used during the development of the driver, but should not be needed anymore.
The loop was problematic, it took a long time, and was sensitive to drivers which require longer to re-activate after a kill The core issue was that if we use >4s then we get good reliability, but we can exceed the 60s timeout window, and thus fail the loop The solution is to try to wait for the PID to be available, rather than hoping it it is available after we wait for a fixed time. This actually results in faster testing, and should be more reliable
The `:` characters in IPv6 IP address was resulting in improper host:dataset splitting when parsing source property
…reate activate failure When locate --create is called, and create succeeds, but discovery fails, the tool may not return an error, and skip activation. In this case we return an obtuse error about unable to find path. The error has been fixed in the tool, but as belt+braces, more explici handling has been added to the driver to suggest a possible communications issue Also, the generic error has been improved.
da773ff to
f27d435
Compare
|
And, I applied the EnsureMountPath changes. The neat thing is that the driver and the zfs driver are very similar... so easy to apply the change based on the zfs driver's changes. |
The TrueNAS Storage driver allows an Incus node to utilise a remote TrueNAS storage server to host one or more incus storage pools.
When the node is in a cluster, then all members of the cluster can use the storage pool simultaneously. This works well , for example, when live migrating a VM from one Incus node to another.
The driver is block-based, ie all Incus volumes are created as zvols on the remote server, and the zvol block devices are accessed on the local incus node via iscsi
The driver is modelled after the existing ZFS driver, and supports most existing ZFS functionality, but on a remote TrueNAS server.
For example, a local VM can be snapshotted and then cloned. The snapshot and cloning will be performed on the remote server after synchronizing the local filesystem, and the clone will then be activated via iSCSI as necessary.
The driver uses the
truenas_incus_ctltool, which provides a simple CLI interface to the TrueNAS API to effect changes on the remote server. Additionally, the tool can also activate/deactivate remote zvols using open-iscsi.If the tool is not found, then the driver is disabled.
The latest version of the truenas tool can be obtained from : https://github.com/truenas/truenas_incus_ctl, and must be installed in the PATH supplied to incusd (v0.7.2+ is required)
open-iscsican be installed withapt install open-iscsiTo login to the remote TrueNAS host first run the command:
sudo truenas_incus_ctl config loginExample:
After logging in, ensure iSCSI is configured and working with the following command:
sudo truenas_incus_ctl share iscsi setup --testAs an example of the functionality of the TrueNAS tool, this command can be used to list all datasets on the remote server
Once logged in and iSCSI has been configured, the following command can be used to create a remote storage pool
incus storage create <poolname> truenas source=[host:]<pool>/<dataset>/[remote-poolname]sourceis used to describe the location where the storage pool will be created on the remote TrueNAS hosthostis optional, andremote-poolnamewill be set topoolnameif not supplied.truenas.configcan be used to specify a specific login configtruenas.hostcan be used to specify a specific host, which the tool will lookup in the config.jsonRunning Tests
There are a number of
INCUS_TRUENAS_environment variables that can be used to configure the remote TrueNAS that will be used by the driver during the test. The only environment variable that is required isINCUS_TRUENAS_DATASETI use the following commands in a script called
start-tests.shto run the suite using the default host configured intruenas_incus_ctlconfig filesudo -E env PATH=$PATH INCUS_BACKEND=truenas INCUS_TRUENAS_DATASET=tank/se/incus-tests ./main-tn.sh $1Alternatively, I specify a
configfor a different host. Hosts and API keys can also be specified manually to avoid the use of a config file. Alternate config files can be specified.sudo -E env PATH=$PATH INCUS_VERBOSE=0 INCUS_TMPFS=0 INCUS_BACKEND=truenas INCUS_TRUENAS_DATASET=puddle/se/incus-tests INCUS_TRUENAS_CONFIG=goldeye2 ./main-tn.sh $1I run the standalone tests using
./start-tests standalone, as theclustertests require net ns support fromtruenas_incus_ctlwhich is not implemented.main-tn.shis the same asmain.sh, except some tests which are problematic on my testing hosts are disabled.main-tn.shshould probably be deleted once the./main.sh standalonetests are verifiedWhen running the test
truenas_incus_ctlwill be launched in daemon mode. It can be useful to prelaunch the daemon to view its console as the test suite runs.for example:
sudo /home/<user>/go/bin/truenas_incus_ctl daemon /home/<user>/tncdaemon.sockIncus CI Integration
I would suggest that a VM with a "golden" image of GoldEye with the middleware defer patch is used as a target. The
truenas_incus_ctltool should be built from master and the standalone tests used. A preconfigured config.json for the tool could be used to provide the host/api-key to use for the tests. A container dataset should be created and removed after the test suite is run.Known Issues
snapshot renamecapability (currently in Nightlies), although there is a patch that can be easily installed in Fangtooth (25.04) https://github.com/truenas/truenas_incus_ctl#zfssnapshotrename-backportstandalonetestszfs setcommand required. If the API is ever changed, the tool will be updated to add support.