Comments (5)
I opted to implement the Session and Connection classes as Snapshots. So the information is parsed on creation and never parsed again for this object. This seemed like the natural way, since session information is volatile. Additionally, it wouldn't make sense to only to update certain attributes of the session, since you have to parse info
whole anyways.
The session property of NodeACL is recreated on every access.
Also note, that Session and Connection don't inherite from CFSNode
, because they are no cfs nodes.
from rtslib-fb.
For reference:
info
with no open session:
No active iSCSI Session for Initiator Endpoint: iqn.2005-03.org.open-iscsi:xxx
With an open session (1 local connection):
InitiatorName: iqn.2005-03.org.open-iscsi:xxx
InitiatorAlias: test-host
LIO Session ID: 2 ISID: 0x00 02 3d 11 00 00 TSIH: 2 SessionType: Normal
Session State: TARG_SESS_STATE_LOGGED_IN
---------------------[iSCSI Session Values]-----------------------
CmdSN/WR : CmdSN/WC : ExpCmdSN : MaxCmdSN : ITT : TTT
0x00000010 0x00000010 0x000000d6 0x000000e5 0x2e000000 0x00001e8d
----------------------[iSCSI Connections]-------------------------
CID: 0 Connection State: TARG_CONN_STATE_LOGGED_IN
Address 127.0.0.1 TCP StatSN: 0xee10583f
from rtslib-fb.
Okay, that should do it. Please review.
If you don't see any problems with this solution, I will merge (--no-ff) it to master.
We could possibly implement FabricModule/Target/TPG to having a list (or generator with yield) of open sessions each. That is basically the same as with has_session, but doesn't stop when just one is found and throws no information away.
This highly depends on how we would display status information. If we don't need it, it might also be "clutter" in the API.
Technically also has_sessions is not a must-have and can be implemented in targetcli. After all you could list all kinds of things on all kinds of levels and also check for these on different levels. We have to implement this in targetlci then.
So if you say has_sessions doesn't belong in rtslib, I can also just merge 5e88ec2 (classes and .session in NodeACL) for now.
from rtslib-fb.
I updated my targetstatus prototype as a usage example of the new rtslib session API.
from rtslib-fb.
See #12 for the corresponding pull request.
from rtslib-fb.
Related Issues (20)
- wwn versus VPD unit serial number
- Could not create Target in configFS
- Avoid failing the service when running in a container
- 2.1.72 not on PyPI HOT 1
- possible race condition when writing configuration file
- v2.1.73 is not on PyPI
- python-kmod is archived,do we have the plan to drop it? HOT 1
- Regression in 2.1.74 release causing read-only SCSI Block device attachments to fail HOT 2
- usb_gadget doesn't show up in targetcli list
- when I call API: /api/disk to create a disk in arm environment, it often suspends in function: UserBackedStorageObject(StorageObject)::_enable() HOT 3
- Creating multiple backstores at the same time without specifying the index parameter may raise exception. HOT 3
- Failed : disk create/update failed on xxx. LUN allocation failure HOT 7
- Unable to concurrently delete block storage objects
- "targetctl clear" fails with Linux 5.18-rc6 HOT 1
- `python3 setup.py install` fails if `__version__` has `.g<hash>` at end
- `make release` fails when HEAD is detached head
- NameError: name 'RBDStorageObject' is not defined
- rtslib_fb.utils.RTSLibError: Could not create _Backstore in configFS HOT 1
- NotADirectoryError: [Errno 20] Not a directory: '/sys/kernel/config/target/iscsi/cpus_allowed_list' HOT 7
- Trying to create SCSI passthrough backstore using tape device fails when the tape drive is empty
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from rtslib-fb.