@bnerickson said:
Thanks for the reminder, for some reason it was not seen before (all applogies).
I'm unsure where to report this,
Here or in related open projects directly (assuming you know where to look at) but let me guide you.
but syslog reports the following warning when a VM starts:
(UDEV-WORKER) cpu0: Process '/bin/sh -c '[ -e /dev/xen/xenbus ] && [ -e /sys/devices/system/cpu/cpu0/online ] && echo 1 > /sys/devices/system/cpu/cpu0/online'' failed with exit code 1.
Good catch, it's a bad habit to use AND (&&) in conditionals.
Hardcore programmers prefer to use OR (||) in scripts, this practice prevents failed exit and make debugging easier (with set -xe).
(...)
> ACTION=="add", SUBSYSTEM=="cpu", RUN+="/bin/sh -c 'if [ -e /dev/xen/xenbus ] && [ -e /sys$devpath/online ]; then echo 1 > /sys$devpath/online; fi'"
That would work, What about this "simpler" form ?
[ ! -e /dev/xen/xenbus ] || [ ! -e /sys$devpath/online ] || echo 1 > /sys$devpath/online
Could be harder to read, but I get used to.
If you want you can contribute the fix directly to upstream since the file is public at:
https://github.com/xenserver/xe-guest-utilities/blob/master/mk/xen-vcpu-hotplug.rules
About the exec bit, here is the line that should be changed:
https://github.com/xcp-ng-rpms/xcp-ng-pv-tools/commit/3d134fbd0f3ac9e2f3cfa914e38b33529635d458#r183816712
@bnerickson, If you need any mentoring for OSS contributions, I would be more than a happy to help.
Since it's a lowest priority you can take all the time you need, and If too busy, no problem we can do it for you and then backport the change to XCP-ng.
1
stormi committed to xcp-ng-rpms/xcp-ng-pv-tools
Build the tools from the sources
- Build 32 bit and 64 bit xe-guest-utilities
- Build TGZ, RPM and DEB packages for xe-guest-utilities
- Put the result into the ISO and the ISO into the xcp-ng-pv-tools RPM
(as before).
It's a bit hacky, but as the binaries are statically linked, this
peculiar build process should work.