-
Notifications
You must be signed in to change notification settings - Fork 91
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
CP-12200: Package datapath related dom0 files #261
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -58,9 +58,10 @@ SM_LIBS += B_util | |
SM_LIBS += wwid_conf | ||
SM_LIBS += trim_util | ||
|
||
UDEV_RULES = 39-multipath 40-multipath 55-xs-mpath-scsidev | ||
UDEV_RULES = 39-multipath 40-multipath 55-xs-mpath-scsidev 58-xapi | ||
MPATH_DAEMON = sm-multipath | ||
MPATH_CONF = multipath.conf | ||
CIFS_CONF = cifs.conf | ||
|
||
CRON_JOBS += ringwatch | ||
|
||
|
@@ -78,6 +79,7 @@ UDEV_SCRIPTS_DIR := /etc/udev/scripts/ | |
SYSTEMD_SERVICE_DIR := /usr/lib/systemd/system/ | ||
INIT_DIR := /etc/rc.d/init.d/ | ||
MPATH_CONF_DIR := /etc/multipath.xenserver/ | ||
CIFS_CONF_DIR := /etc/modprobe.d/ | ||
|
||
SM_STAGING := $(DESTDIR) | ||
SM_STAMP := $(MY_OBJ_DIR)/.staging_stamp | ||
|
@@ -127,6 +129,7 @@ install: precheck | |
mkdir -p $(SM_STAGING)$(INIT_DIR) | ||
mkdir -p $(SM_STAGING)$(SYSTEMD_SERVICE_DIR) | ||
mkdir -p $(SM_STAGING)$(MPATH_CONF_DIR) | ||
mkdir -p $(SM_STAGING)$(CIFS_CONF_DIR) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This dir already exist and it is managed by kmod |
||
mkdir -p $(SM_STAGING)$(DEBUG_DEST) | ||
mkdir -p $(SM_STAGING)$(BIN_DEST) | ||
mkdir -p $(SM_STAGING)$(MASTER_SCRIPT_DEST) | ||
|
@@ -135,16 +138,18 @@ install: precheck | |
for i in $(SM_PY_FILES); do \ | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is multipath specific not udev. Keep it there |
||
install -m 755 $$i $(SM_STAGING)$(SM_DEST); \ | ||
done | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ditto |
||
install -m 644 multipath/$(MPATH_CONF) \ | ||
install -m 644 udev/$(MPATH_CONF) \ | ||
$(SM_STAGING)/$(MPATH_CONF_DIR) | ||
install -m 755 multipath/$(MPATH_DAEMON) \ | ||
install -m 755 udev/$(MPATH_DAEMON) \ | ||
$(SM_STAGING)/$(INIT_DIR) | ||
install -m 644 etc/modprobe.d/$(CIFS_CONF) \ | ||
$(SM_STAGING)/$(CIFS_CONF_DIR) | ||
install -m 755 drivers/updatempppathd.init \ | ||
$(SM_STAGING)/$(INIT_DIR)/updatempppathd | ||
install -m 644 etc/make-dummy-sr.service \ | ||
$(SM_STAGING)/$(SYSTEMD_SERVICE_DIR) | ||
for i in $(UDEV_RULES); do \ | ||
install -m 644 multipath/$$i.rules \ | ||
install -m 644 udev/$$i.rules \ | ||
$(SM_STAGING)$(UDEV_RULES_DIR); done | ||
for i in $(SM_XML); do \ | ||
install -m 755 drivers/$$i.xml \ | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
install cifs /sbin/modprobe --ignore-install cifs $CMDLINE_OPTS && { echo 0x87 > /proc/fs/cifs/SecurityFlags ; } |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -43,6 +43,9 @@ sed -i 's/archive = .*/archive = 0/' /etc/lvm/master/lvm.conf || exit $? | |
sed -i 's/filter \= \[ \"a\/\.\*\/\" \]/filter = \[ \"r\|\/dev\/xvd\.\|\"\, \"r\|\/dev\/VG\_Xen\.\*\/\*\|\"\]/g' /etc/lvm/master/lvm.conf || exit $? | ||
cp /etc/lvm/master/lvm.conf /etc/lvm/lvm.conf || exit $? | ||
sed -i 's/metadata_read_only =.*/metadata_read_only = 1/' /etc/lvm/lvm.conf || exit $? | ||
sed -i 's/use_lvmetad = 1/use_lvmetad = 0/' /etc/lvm/lvm.conf | ||
sed -i 's/use_lvmetad = 1/use_lvmetad = 0/' /etc/lvm/master/lvm.conf | ||
ln -sf /dev/null /etc/udev/rules.d/69-dm-lvm-metad.rules | ||
# We try to be "update-alternatives" ready. | ||
# If a file exists and it is not a symlink we back it up | ||
if [ -e /etc/multipath.conf -a ! -h /etc/multipath.conf ]; then | ||
|
@@ -285,8 +288,10 @@ cp -f /etc/lvm/lvm.conf.orig /etc/lvm/lvm.conf || exit $? | |
%config /etc/udev/rules.d/40-multipath.rules | ||
%config /etc/udev/rules.d/55-xs-mpath-scsidev.rules | ||
%config /etc/udev/rules.d/62-multipath.rules | ||
%config /etc/udev/rules.d/58-xapi.rules | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. add another rules for 69-dm-lvm-metad.rules |
||
%config /etc/multipath.xenserver/multipath.conf | ||
|
||
%config /etc/modprobe.d/cifs.conf | ||
|
||
%changelog | ||
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
# Quickly skip stuff we don't care about at all: | ||
|
||
# Skip block devices - no networks in here | ||
SUBSYSTEM!="block", GOTO="end_xapi" | ||
|
||
# srX are not partitions, go check if it's a cdrom. handle remove specially. | ||
ACTION=="remove", KERNEL=="sr[0-9]", GOTO="usb_symlink" | ||
KERNEL=="sr[0-9]", GOTO="maybe_cdrom" | ||
|
||
# Skip partitions - whole disks only please | ||
KERNEL=="*[0-9]", GOTO="end_xapi" | ||
|
||
# Split on device type: ############################################################## | ||
LABEL="maybe_cdrom" | ||
|
||
# Is it a CDROM? | ||
PROGRAM=="/bin/grep '^drive name:.*\W%k\(\W\|$$\)' /proc/sys/dev/cdrom/info", GOTO="usb_cdrom_symlink" | ||
# Is it USB? | ||
SUBSYSTEMS=="usb", GOTO="usb_symlink" | ||
# If neither of those, ignore | ||
GOTO="end_xapi" | ||
|
||
# Handle all CDROM devices here: ##################################################### | ||
LABEL="usb_cdrom_symlink" | ||
|
||
# For CDs, create a symlink and start the corresponding cdrommon service | ||
# This is done on the "change" action as well as "add" because devices that exist from | ||
# boot are only triggered with the "change" action. | ||
ACTION=="add|change", SYMLINK+="xapi/cd/%k" | ||
ACTION=="add|change", TAG+="systemd", ENV{SYSTEMD_WANTS}+="cdrommon@$name.service" | ||
|
||
ACTION=="add", RUN+="/bin/sh -c '/opt/xensource/libexec/local-device-change %k 2>&1 >/dev/null&'" | ||
ACTION=="remove", RUN+="/bin/sh -c '/opt/xensource/libexec/local-device-change %k 2>&1 >/dev/null&'" | ||
|
||
GOTO="end_xapi" | ||
|
||
# Handle all non-CDROM USB devices here: ############################################# | ||
LABEL="usb_symlink" | ||
|
||
# Skip devices which fail the local sharing check (to filter out root/mounted devices) | ||
ACTION=="add", PROGRAM!="/opt/xensource/libexec/check-device-sharing %k", GOTO="end_xapi" | ||
|
||
ACTION=="add", SYMLINK+="xapi/block/%k" | ||
|
||
ACTION=="add", RUN+="/bin/sh -c '/opt/xensource/libexec/local-device-change %k 2>&1 >/dev/null&'" | ||
ACTION=="remove", RUN+="/bin/sh -c '/opt/xensource/libexec/local-device-change %k 2>&1 >/dev/null&'" | ||
|
||
GOTO="end_xapi" | ||
|
||
###################################################################################### | ||
|
||
LABEL="end_xapi" |
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.
Maybe MODPROBE_DIR?