Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

--copy-network should warn if targeting an iSCSI disk #1389

Open
jlebon opened this issue Jan 17, 2024 · 2 comments
Open

--copy-network should warn if targeting an iSCSI disk #1389

jlebon opened this issue Jan 17, 2024 · 2 comments

Comments

@jlebon
Copy link
Member

jlebon commented Jan 17, 2024

When installing to an iSCSI device, using --copy-network to define networking in the initramfs is explicitly unsupported: https://github.com/coreos/fedora-coreos-config/blob/206cc56fe0f0866f18f4c5c0fbd117dec77944ea/overlay.d/05core/usr/lib/dracut/modules.d/35coreos-ignition/coreos-diskful-generator#L114-L117

As the comment there explains, --copy-network relies on having access to the bootfs during early boot, which is not possible in iSCSI since you need networking in the first place to access the disk.

We should have coreos-installer detect and warn about this case.

It could still be valid though to use --copy-network with that caveat if you don't need it defined in the initramfs, but you still want to use it as a way to propagate to the real root. (Though... hmm, I think we need to adapt the code above so that instead of neutering it entirely, we still run it, but after we have access to the bootfs.)

@jbtrystram
Copy link

In the case where the iscsi target is mounted on the live system before running coreos-installer (this is how we test it), it appears as any other block device, so the only way to detect that is to look for specific kargs.
I'll try to do something but i fear this may be brittle. That is not a real issue if it's just a warning though

@jlebon
Copy link
Member Author

jlebon commented Mar 13, 2024

We have pretty good APIs around handling kargs so it shouldn't be too bad to look for any rd.iscsi.* kargs to trigger the warning.

It's also possible to tell if the block device is an iSCSI target using iscsiadm (or just looking at the same e.g. sysfs spot it looks for). But just keying off the kargs is probably enough.

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

No branches or pull requests

2 participants