Project

General

Profile

Actions

Feature #3532

closed

pass parameters to partition table provisioning snippet to allow per device names to be set

Added by Joshua Hoblitt over 10 years ago. Updated over 5 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Category:
Host creation
Target version:
-
Difficulty:
Triaged:
No
Fixed in Releases:
Found in Releases:

Description

Due to fairly Linux's unstable scsi block device naming (especially for buses like FC and SAS devices that have inconsistent probing times) it would be highly usefully to be able to set a per host property of what uuid/device-path/etc. to provision the OS onto. Ie, use `pci-0000:00:1f.1-scsi-0:0:1:0` instead of `sda`. In some cases, it would be nessicary to pass multiple device names for sw raid-1 setup/etc. The must flexible way to impliment this might be to allow a text dialog that is prepended onto the partition table snippet that is select.

Actions #1

Updated by Joshua Hoblitt over 10 years ago

Before someone calls me on it, the `by-path` name is probably unstable too. Using a UUID is probably the safest way to go but reguardless some sort of mechanism for passing in data is needed to avoid having to create a unique partition table for every single node.

See https://fedoraproject.org/wiki/Anaconda/Kickstart#Special_Notes_for_Referring_to_Disks

Actions #2

Updated by Dominic Cleal over 10 years ago

  • Category set to Host creation
  • Status changed from New to Feedback

Partition templates are ERB templates just like provisioning templates, which means you're able to access host parameters and other data. I'd suggest adding an "install-uuid" parameter to your hosts when creating them, then in your template do:

<%= @host.params['install-uuid'] %>

Other template tricks are listed here: http://projects.theforeman.org/projects/foreman/wiki/TemplateWriting. Of course, you should be able to use foreman_custom_parameters to create the initial parameter too.

Actions #3

Updated by Benjamin Papillon about 10 years ago

Hello,

Does the answer Dominic provided solve your issue? Can you give us some feedback regarding this issue?

Regards,

Actions #4

Updated by Joshua Hoblitt about 10 years ago

  • Status changed from Feedback to Closed

Yes, sorry for the long delay. That will work for my use case.

Actions #5

Updated by mr ch over 5 years ago

Great guide helped me a lot, but use by-path, by-id leads to:

Error:
Disk "disk/by-id/XXXXXXXXXXXXXXXXXXXXXX" given in ignoredisk command does not exist.

Description:
only path is working because "ignoredisk --device" can only handle that, no id (ata-..., scsi-..., dm...)

https://docs.oracle.com/cd/E37670_01/E84716/html/ol_ki_96rn_installer_kickstart_multipath.html

there are many other threds about this problem where a lot is said but they lead to nothing

Solution:
Use drive letter/name (sda, sdb ...) that is even more unreliable or by-path, as long you dont mess around with sas/raid-controller bios (or be forced to do so, due to a disk fail, its 50/50, when using same slot) path should stay the same

Actions

Also available in: Atom PDF