-
Notifications
You must be signed in to change notification settings - Fork 18
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
Tolerance of pre-existing software-RAID #38
Open
ydirson
wants to merge
11
commits into
xenserver:master
Choose a base branch
from
xcp-ng:for-xs/tolerate-existing-raid
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 9 commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
fc45c60
New diskutil.getHumanDiskLabel to centralize formatting of disk name …
ydirson 97052fc
tui: show the disk on which an existing installation or backup is found
ydirson f43e47e
Provide a Makefile for installation
ydirson f95e3d7
diskutil: make md device name more human-readable
ydirson 03b3bb1
udev: force ANACONDA flag to prevent RAID assembling
ydirson 8e7a74a
main sequence: scan for existing products as late as possible
ydirson d35bc84
get_installation_type: make the screen unconditional
ydirson 7e06b77
RAID: when a MD superblock is found on a disk, offer user to assemble…
ydirson 140fec5
later-squash! RAID: when a MD superblock is found on a disk, offer us…
ydirson cab52a9
products discovery: don't propose to restore a backup to a disk not f…
ydirson 406503f
answerfile: add support for assembling pre-existing RAID
ydirson File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,97 @@ | ||
# destinations | ||
DESTDIR = | ||
INSTALLER_DIR = /opt/xensource/installer | ||
EFI_DIR = /EFI/xenserver | ||
|
||
# root of a tree with sm.rpm unpacked | ||
SM_ROOTDIR = | ||
|
||
INSTALL = install | ||
|
||
install: | ||
$(INSTALL) -d $(DESTDIR)/usr/bin | ||
$(INSTALL) -m755 support.sh $(DESTDIR)/usr/bin | ||
$(INSTALL) -d $(DESTDIR)$(INSTALLER_DIR)/tui/installer/ | ||
$(INSTALL) -m755 \ | ||
init \ | ||
$(DESTDIR)$(INSTALLER_DIR)/ | ||
$(INSTALL) -m644 \ | ||
keymaps \ | ||
timezones \ | ||
answerfile.py \ | ||
backend.py \ | ||
common_criteria_firewall_rules \ | ||
constants.py \ | ||
cpiofile.py \ | ||
disktools.py \ | ||
diskutil.py \ | ||
driver.py \ | ||
fcoeutil.py \ | ||
generalui.py \ | ||
hardware.py \ | ||
init_constants.py \ | ||
install.py \ | ||
netinterface.py \ | ||
netutil.py \ | ||
product.py \ | ||
report.py \ | ||
repository.py \ | ||
restore.py \ | ||
scripts.py \ | ||
snackutil.py \ | ||
uicontroller.py \ | ||
upgrade.py \ | ||
util.py \ | ||
xelogging.py \ | ||
$(DESTDIR)$(INSTALLER_DIR)/ | ||
$(INSTALL) -m644 \ | ||
tui/__init__.py \ | ||
tui/init.py \ | ||
tui/fcoe.py \ | ||
tui/network.py \ | ||
tui/progress.py \ | ||
tui/repo.py \ | ||
$(DESTDIR)$(INSTALLER_DIR)/tui/ | ||
$(INSTALL) -m644 \ | ||
tui/installer/__init__.py \ | ||
tui/installer/screens.py \ | ||
$(DESTDIR)$(INSTALLER_DIR)/tui/installer/ | ||
|
||
# Startup files | ||
$(INSTALL) -d \ | ||
$(DESTDIR)/etc/init.d \ | ||
$(DESTDIR)/etc/modprobe.d \ | ||
$(DESTDIR)/etc/modules-load.d \ | ||
$(DESTDIR)/etc/depmod.d \ | ||
$(DESTDIR)/etc/dracut.conf.d \ | ||
$(DESTDIR)/etc/udev/rules.d \ | ||
$(DESTDIR)/etc/systemd/system/systemd-udevd.d | ||
|
||
$(INSTALL) -m755 startup/interface-rename-sideway startup/early-blacklist $(DESTDIR)/etc/init.d/ | ||
$(INSTALL) -m644 startup/functions $(DESTDIR)/etc/init.d/installer-functions | ||
$(INSTALL) -m644 startup/early-blacklist.conf startup/bnx2x.conf $(DESTDIR)/etc/modprobe.d/ | ||
$(INSTALL) -m644 startup/blacklist $(DESTDIR)/etc/modprobe.d/installer-blacklist.conf | ||
$(INSTALL) -m644 startup/modprobe.mlx4 $(DESTDIR)/etc/modprobe.d/mlx4.conf | ||
$(INSTALL) -m644 startup/iscsi-modules $(DESTDIR)/etc/modules-load.d/iscsi.conf | ||
$(INSTALL) -m644 startup/depmod.conf $(DESTDIR)/etc/depmod.d/ | ||
$(INSTALL) -m755 startup/preinit startup/S05ramdisk startup/S06mount $(DESTDIR)/$(INSTALLER_DIR)/ | ||
$(INSTALL) -m644 startup/01-installer.rules $(DESTDIR)/etc/udev/rules.d/ | ||
$(INSTALL) -m644 startup/systemd-udevd_depmod.conf $(DESTDIR)/etc/systemd/system/systemd-udevd.d/installer.conf | ||
|
||
# Generate a multipath configuration from sm's copy, removing | ||
# the blacklist and blacklist_exception sections. | ||
sed 's/\(^[[:space:]]*find_multipaths[[:space:]]*\)yes/\1no/' \ | ||
< $(SM_ROOTDIR)/etc/multipath.xenserver/multipath.conf \ | ||
> $(DESTDIR)/etc/multipath.conf.disabled | ||
|
||
# bootloader files | ||
$(INSTALL) -D -m644 bootloader/grub.cfg $(DESTDIR)$(EFI_DIR)/grub.cfg | ||
$(INSTALL) -D -m644 bootloader/grub.cfg $(DESTDIR)$(EFI_DIR)/grub-usb.cfg | ||
|
||
sed -i '/^set timeout=[0-9]\+$/asearch --file --set /install.img' \ | ||
$(DESTDIR)$(EFI_DIR)/grub-usb.cfg | ||
|
||
$(INSTALL) -D -m644 bootloader/isolinux.cfg $(DESTDIR)/boot/isolinux/isolinux.cfg | ||
|
||
printf "echo Skipping initrd creation in the installer\nexit 0\n" \ | ||
> $(DESTDIR)/etc/dracut.conf.d/installer.conf |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
Features flags | ||
============== | ||
|
||
Some host-installer features are not enabled by default, and | ||
downstream installers can activate them by creating a file in | ||
/etc/xensource/features/ in their installer filesystem. | ||
|
||
Currently available feature flags are: | ||
|
||
raid-assemble | ||
|
||
Detect Linux software-RAID (a.k.a "md") superblocks in disks, adds | ||
a choice for the user to activate software RAID volumes, and do | ||
not offer the user the ability to upgrade or restore a system on a | ||
software-RAID device. | ||
|
||
This only impacts the UI, the <assemble-raid/> answerfile | ||
construct does not need this feature flag. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
# disable 65-md-incremental.rules by telling an installer is running | ||
ENV{ANACONDA}="1" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
The feature flag to enable from presenting the "assemble RAID" option also disables the safety measure of filtering out upgrade/restore entries that the user should not select, as they indeed live on a RAID volume. It is I think a bad idea to allow the user to do this, but then hiding those options without letting the user assemble RAID volumes looks like a bad idea too. I would rather just let the behavior added by this PR be the default, and just not add this feature flag.
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.
As XenServer doesn't support installing on software RAID at all, it is better to keep the feature flag to hide the "assemble RAID" option. The button would be too confusing for users in a XenServer context.