Bug 1512086
| Summary: | Document a way to modify vintage RHV-H udev settings, specifically iscsi-timeout | ||
|---|---|---|---|
| Product: | Red Hat Enterprise Virtualization Manager | Reporter: | Allie DeVolder <adevolder> |
| Component: | rhev-hypervisor-ng | Assignee: | Ryan Barry <rbarry> |
| Status: | CLOSED INSUFFICIENT_DATA | QA Contact: | dguo |
| Severity: | high | Docs Contact: | |
| Priority: | high | ||
| Version: | 4.2.0 | CC: | adevolder, cshao, dfediuck, dguo, huzhao, lsurette, mgoldboi, pstehlik, qiyuan, rbarry, sbonazzo, srevivo, weiwang, yaniwang, ycui, ykaul, yzhao |
| Target Milestone: | ovirt-3.6.z-async | Flags: | lsvaty:
testing_plan_complete-
|
| Target Release: | --- | ||
| Hardware: | All | ||
| OS: | Linux | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | If docs needed, set a value | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2018-02-13 10:46:52 UTC | Type: | Bug |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | Node | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
|
Description
Allie DeVolder
2017-11-10 19:43:56 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. 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. 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
reboot
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.
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. Any tests done with my last comment? QE Did a test with above comments, and can set qa-ack flag ``` [root@dell-per515-01 ~]# cat /sys/block/sde/device/timeout 30 # 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 30 # 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 60 # 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 60 BZ<2>Jira re-sync The needinfo request[s] on this closed bug have been removed as they have been unresolved for 500 days |