-
Notifications
You must be signed in to change notification settings - Fork 74
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
External disk support #778
External disk support #778
Conversation
d7af576
to
e238f83
Compare
e238f83
to
7c7edc0
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM in general, just a couple of comments on comments ;-) and one question about the blacklist.
(Also I do wonder if we shouldn't just enable multipathd in the installer... But in that case we'd probably still need to add logic to hide multipath children so they couldn't be selected by mistake :-/ ... What you've got here is probably more straightforward and/or less risky).
@@ -0,0 +1,8 @@ | |||
blacklist { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we need a default devnode
line here that blacklists everything? I was just looking at the manpage for multipath.conf, and it says:
The default blacklist consists of the regular expression "!^(sd[a-z]|dasd[a-z]|nvme[0-9])". This causes all device types other than scsi, dasd, and nvme to be excluded from multipath handling by default."
My reading is that with multipathd enabled all scsi, dasd and nvme devices are still up for grabs. Is this correct, or am I confused?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
from my experiments we are blacklisting everything apart from the negated expression in blacklist which whitelists the devices.
for example on my kvm setup the following config.yaml is used
os:
externalStorageConfig:
enabled: true
multiPathConfig:
- vendor: "QEMU"
product: "QEMU HARDDISK"
This gets converted into multipath config
blacklist {
device {
vendor "!QEMU"
product "!QEMU HARDDISK"
}
}
end result is multipath is enabled on the qemu scsi disks
0QEMU_QEMU_HARDDISK_disk1 dm-0 QEMU,QEMU HARDDISK
size=250G features='0' hwhandler='0' wp=rw
|-+- policy='service-time 0' prio=1 status=active
| `- 0:0:0:1 sda 8:0 active ready running
`-+- policy='service-time 0' prio=1 status=enabled
`- 0:0:0:2 sdb 8:16 active ready running
Longhorn disks in use by VM's are ignored by mutlipath since they do not match the expression
*-disk
description: SCSI Disk
product: VIRTUAL-DISK
vendor: IET
physical id: 0.0.1
bus info: scsi@7:0.0.1
logical name: /dev/sdc
version: 0001
serial: beaf11
size: 10GiB (10GB)
capabilities: gpt-1.00 partitioned partitioned:gpt
configuration: ansiversion=5 guid=57debec6-c414-4d56-a0a1-788da7c89c52 logicalsectorsize=512 sectorsize=512
This pull request is now in conflict. Could you fix it @ibrokethecloud? 🙏 |
ca35a25
to
4e4432d
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
just a nit, others LGTM!
BTW, could we squash some commits if they are similar?
package/harvester-os/files/etc/dracut.conf.d/50-cos-initrd.conf
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ibrokethecloud please help squash commits and we can merge this. Thanks!
4e4432d
to
84bf8de
Compare
…kernel arguments fix typo in grub2-editenv fixing issues for multipath config and kernel arguments enable multipath in initrd tidy up and vendor go mod deps add logic to filter interfaces in use for iscsi session additional logic to dedup disks and only show one device for multipath'd disks tweak disk filter logic and make multipathd conditional tweak comments on disk deduplication logic fix comment in harv-install describing usage of HARVESTER_ADDITIONAL_KERNEL_ARGUMENTS rebase upstream changes remove dracut config files needed to enable multipathd. This is now handled in harvester/os2 directly
84bf8de
to
596eff0
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks!
@Mergifyio backport v1.4 |
✅ Backports have been created
|
Problem:
Currently harvester can only be installed on local disks due to lack of multipath support and ability to configure additional kernel arguments as part of the installation process
Solution:
The PR attempts to address this by allowing user to perform the following via harvester config
Related Issue:
harvester/harvester#5150
Test plan:
To test the following config.yaml, will enable and configure multipath even for a single local disk in a kvm environment
post install, when the VM boots, the disks used will be corresponding multipathd mapper devices
without the additional config, there should be no impact to how harvester behaves post install