Skip to main content

Exporter ISCSI service driver

Project description

iSCSI server driver

jumpstarter-driver-iscsi provides a lightweight iSCSI target implementation powered by the Linux RFC-tgt framework via the rtslib-fb Python bindings.

⚠️ The driver creates and manages an iSCSI target (server). To access the exported LUNs you still need a separate iSCSI initiator (client) on the machine running your test-code / DUT.


Installation

rtslib-fb relies on the in-kernel LIO target framework which is packaged differently by each distribution. You should be able to run sudo targetcli without errors before you start the Jumpstarter driver.

Fedora:

$ sudo dnf install targetcli python3-rtslib

Finally, install the driver itself from the Jumpstarter package index:

:substitutions:
$ pip3 install --extra-index-url {{index_url}} jumpstarter-driver-iscsi

Configuration

The driver is configured through the exporter YAML file. A minimal example exports the local file disk.img as a 5 GiB LUN:

export:
  iscsi:
    type: jumpstarter_driver_iscsi.driver.ISCSI
    config:
      root_dir: "/var/lib/iscsi"
      target_name: "demo"
      remove_created_on_close: false  # Keep disk images persistent (default)
      # When size_mb is 0 a pre-existing file size is used.

Config parameters

Parameter Description Type Required Default
root_dir Directory where image files will be stored str no /var/lib/iscsi
iqn_prefix IQN prefix to use when building the target IQN str no iqn.2024-06.dev.jumpstarter
target_name The target name appended to the IQN prefix str no target1
host IP address to bind the target to. Empty string will auto-detect str no auto
port TCP port the target listens on int no 3260
remove_created_on_close Automatically remove created files/directories when driver closes bool no false

File Management

The iSCSI server driver automatically tracks disk image files and directories created during the session. By default, remove_created_on_close is set to false to preserve disk images that are typically reused across test sessions. Set to true if you want temporary disk images to be cleaned up automatically.

API Reference

.. autoclass:: jumpstarter_driver_iscsi.client.ISCSIServerClient()
    :members: start, stop, get_host, get_port, get_target_iqn, add_lun, remove_lun, list_luns, upload_image

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

jumpstarter_driver_iscsi-0.7.2.tar.gz (10.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

jumpstarter_driver_iscsi-0.7.2-py3-none-any.whl (8.6 kB view details)

Uploaded Python 3

File details

Details for the file jumpstarter_driver_iscsi-0.7.2.tar.gz.

File metadata

File hashes

Hashes for jumpstarter_driver_iscsi-0.7.2.tar.gz
Algorithm Hash digest
SHA256 1286fd8334d17fd5c060db9b19399089147564adcdf9ce5c6eee84bfa4df19b7
MD5 aed8f6ecf3beb9b5a63d6cd999af72f0
BLAKE2b-256 880de3dd6630831b537555794f903eb82330d7a07ba136aef00da98c573620b0

See more details on using hashes here.

File details

Details for the file jumpstarter_driver_iscsi-0.7.2-py3-none-any.whl.

File metadata

File hashes

Hashes for jumpstarter_driver_iscsi-0.7.2-py3-none-any.whl
Algorithm Hash digest
SHA256 39c8adaa1f345827e5945cd786698f655bb1547ec24e5040730e4316afa2fe7c
MD5 210b9452cb4ada2741da54ca0b0982eb
BLAKE2b-256 31b09df503399860be058cdbff1de2006c16bd3da0d8421ea3d9bd1954414305

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page