Comments (5)
1. is the `nvmf-connect-nbft.service` supposed to react on any "link up" or "interface configured (DHCP)" events?
No. This is what we should ultimately implement. "network online" is obviously much too coarse. I am unsure what the requirements would be though. There are no uevents for this type of event. So I guess we'd need some daemon listing for netlink events (?) and taking appropriate action.
iSCSI hasn't been able to come up with a solution to this problem in 20 years.
2. is this supposed to be a one-time-off service only as a secondary connect measure after switchroot?
Yes.
3. I see no interface name matching, reacting to events on any network interface?
No.
Does this work this way with
wicked
on your side? I'm trying to find a network management software-universal solution first.
Wicked includes a unit called wicked.service
which is ordered before network-online.service
. It's a oneshot
service that runs wicked --systemd ifup all
. This will try to bring up all interfaces that are configured as "mandatory". The details (like timeouts waiting for the interfaces) are configured in wicked's own config file. When this command finishes (and thus the unit is considered started), most interfaces will likely be up (although there's no guarantee).
I suppose that this is the difference wrt NM, where network-online.target
is reached if just a single interface is up.
from nvme-cli.
Great, thanks for your answers, it's a good starting point now that we know where do we stand.
Noting some hints to follow-up on based on the recent Timberland SIG call:
- create a systemd unit for each interface that could be used as a dependency?
- handle DHCP lease renewal with a different IP address (--> i.e. do we want to tear down the kernel connection to prevent excessive recovery attempts?)
- look how iSCSI multipathing is handled across distros
from nvme-cli.
All my experiments to find an elegant systemd-only upstream-ready solution led to nowhere. Even if I manage to come up with a systemd unit for a particular network interface and watch for link changes (very nasty solution, don't ask), the interface would not have the necessary addresses set up (at least in RHEL9 w/ NetworkManager) and any calls to nvme-cli would fail anyway.
Thus I resorted for a custom NM hook that I plan to keep downstream for the time being.
Let's close this until somebody comes with a good solution.
from nvme-cli.
Thanks. I'd be grateful if you could publish your downstream solution, perhaps in the timberland repos somewhere?
from nvme-cli.
It's just this simple hook placed in /etc/NetworkManager/dispatcher.d/nvmf-connect-nbft.sh
:
#!/bin/bash
if [[ "$1" == nbft* ]] && [[ "$2" == "up" ]]; then
systemctl start nvmf-connect-nbft.service
fi
This is still undergoing testing. There are some side effects, besides the nvmf-connect-nbft.service
spawned once during boot, it's spawned again for each nbft
interface on system startup. While this service is intended to be run multiple times, it brings minor delays in the boot process.
from nvme-cli.
Related Issues (20)
- [bug report]blktests nvme/029 failed from v2.7 on s390x HOT 5
- RFE: Perform actual discovery in discover_from_nbft() HOT 6
- nvme wdc cap-diag /dev/nvme0 - Decode HOT 3
- Fabrics connect for large number of connections too slow with v2.8 HOT 72
- Commands fail on nvme-cli 2.x when nvme_core module isn't loaded, regression from nvme-cli 1.x HOT 2
- nvme format fails HOT 6
- Wrong capacity for drive under usage with nvme-cli 2.8. HOT 8
- rpmb_program_auth_key does not request the result of key programming HOT 2
- can nvme discover a target which listen on a AF_IB(gid) address? HOT 1
- Samsung SSD 980 1TB: can't download firmware HOT 41
- nvme-cli 2.8 unable to use plugin function HOT 2
- nvme get-property/set-property shows Invalid Command Opcode (0x6001) HOT 1
- 2.9: build fails HOT 5
- -- EDIT: mistakenly opened issue, please delete
- No output logs in fw-download HOT 7
- Network dropped connection on reset HOT 5
- `nvme connect` with TLS enabled is unstable HOT 2
- cannot create new ns after removing old one HOT 4
- Provide option to remove a TLS retained key from the kernel keyring
- nvme 2.8 id-ctrl produces invalid JSON output HOT 3
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 nvme-cli.