Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 1512086 - Document a way to modify vintage RHV-H udev settings, specifically iscsi-timeout [NEEDINFO]
Summary: Document a way to modify vintage RHV-H udev settings, specifically iscsi-timeout
Alias: None
Product: Red Hat Enterprise Virtualization Manager
Classification: Red Hat
Component: rhev-hypervisor-ng
Version: 4.2.0
Hardware: All
OS: Linux
Target Milestone: ovirt-3.6.z-async
: ---
Assignee: Ryan Barry
QA Contact: dguo
Depends On:
TreeView+ depends on / blocked
Reported: 2017-11-10 19:43 UTC by Allan Voss
Modified: 2018-02-13 10:46 UTC (History)
18 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Last Closed: 2018-02-13 10:46:52 UTC
oVirt Team: Node
Target Upstream Version:
rbarry: needinfo? (avoss)

Attachments (Terms of Use)

Description Allan Voss 2017-11-10 19:43:56 UTC
currently, it's not possible to modify the iscsi timeout value on a RHV-H.

This fails:
ACTION=="add", SUBSYSTEM=="scsi", RUN+="/bin/sh -c '/bin/echo 60 > /sys$DEVPATH/device/timeout'"

Modifications to iscsid.conf as per also fails to change the iscsi timeout value.

In both scenarios, the file persists properly, but the change is never applied. 

We need a way to make this change on a RHV-H as per storage device recommendations. Regardless of method, we still get 

# cat /sys/block/sdim/device/timeout

Comment 1 Ryan Barry 2017-11-14 11:35:17 UTC
Are you sure this is not simply a missing / ? A

CTION=="add", SUBSYSTEM=="scsi", RUN+="/bin/sh -c '/bin/echo 60 > /sys$DEVPATH/device/timeout'"

Should have "/sys/$DEVPATH", not "/sys$DEVPATH"

In testing, I can't reproduce this.

But the mechanism for doing this is identical to RHEL. If this does not work, we'll reassign to platform.

Comment 6 dguo 2017-11-22 08:49:04 UTC
Since QE tested and failed to set the timeout value on both RHEL7.4 and rhvh-4.1.7 according to the two methods in description, which seems not specific to rhvh. Thus can not set qa-ack currently and waiting for more info.

Comment 10 Ryan Barry 2017-12-19 21:13:49 UTC
Well, you've jogged my memory about some other mechanisms. Sorry, it's been a long time since I've touched vintage RHVH, and I don't actually think we've ever had this kind of request before.

First off, you're right -- I think systemd builds the dependency tree before /config is mounted (and we don't trigger a daemon-reload there), which causes the same problem with both units and generators.

We do, however, support custom hooks. And these *can* be used to get around this

persist /usr/libexec/ovirt-node/hooks/on-boot
vi /usr/libexec/ovirt-node/hooks/on-boot/99-udev
>>> udevadm trigger

Make sure it worked.

Technically, the hooks are run before ovirt-post (part of vintage RHVH), but we only call 'udevadm settle' at a couple of places here, and never touch udev otherwise, so there shouldn't be any conflicts or dependencies later down the line.

If you want to make absolutely sure that it starts, 'systemctl daemon-reload' inside the hooks _may_ rebuild the dependency tree during the middle of boot, but I'm not sure if systemd is reentrant in this way.

Comment 12 Ryan Barry 2017-12-19 22:16:34 UTC
I verified that this works with a trivial shell script.

I would imagine it will work with udev, but if it does not, cron is our last resort, which isn't very nice.

Comment 14 Ryan Barry 2018-01-09 10:22:08 UTC
Any tests done with my last comment?

Comment 15 dguo 2018-02-05 05:47:03 UTC
QE Did a test with above comments, and can set qa-ack flag

[root@dell-per515-01 ~]# cat /sys/block/sde/device/timeout

# Set the rule
[root@dell-per515-01 ~]# vi /etc/udev/rules.d/60-compellent.rules
[root@dell-per515-01 ~]# cat /etc/udev/rules.d/60-compellent.rules
RUN+="/bin/sh -c 'echo 60 > /sys/$$DEVPATH/timeout'"
[root@dell-per515-01 ~]# cat /sys/block/sde/device/timeout

# Trigger it and the timeout was set to 60 seconds
[root@dell-per515-01 ~]# udevadm trigger
[root@dell-per515-01 ~]# cat /sys/block/sde/device/timeout

# Make the shell script and persist it
[root@dell-per515-01 ~]# persist /usr/libexec/ovirt-node/hooks/on-boot
Already persisted: /usr/libexec/ovirt-node/hooks/on-boot
[root@dell-per515-01 ~]# vi /usr/libexec/ovirt-node/hooks/on-boot/99-udev
[root@dell-per515-01 ~]# cat /usr/libexec/ovirt-node/hooks/on-boot/99-udev
udevadm trigger
[root@dell-per515-01 ~]# chmod +x /usr/libexec/ovirt-node/hooks/on-boot/99-udev

Then reboot the rhevh, it works as expected.
[root@dell-per515-01 ~]# cat /sys/block/sde/device/timeout

Note You need to log in before you can comment on or make changes to this bug.