* [developer] Error scsi_vhci @ 2024-11-19 17:46 Udo Grabowski (IMK) 2024-11-19 18:00 ` Udo Grabowski (IMK) 0 siblings, 1 reply; 6+ messages in thread From: Udo Grabowski (IMK) @ 2024-11-19 17:46 UTC (permalink / raw) To: illumos-developer [-- Attachment #1.1: Type: text/plain, Size: 929 bytes --] Hi, for a while now, stmsboot drops the error message below, but after reboot, it works fine. The message is actually caused by /lib/mpxio/stmsboot_util -D mpt_sas -N, which spits out '|iport' instead of 'iport', letting the search in /dev/dsk/* for it fail. The consequence is that former automatic discovery for vhci-capable disks fails and you have to revert to the failover list in /kernel/drv/scsi_vhci.conf again. stmsboot_util is a compiled executable. # stmsboot -e -D mpt_sas WARNING: This operation will require a reboot. Do you want to continue ? [y/n] (default: y) y egrep: RE error in |iport: invalid regular expression <=========== ... -- Dr.Udo Grabowski Inst.of Meteorology & Climate Research IMK-ASF-SAT https://www.imk-asf.kit.edu/english/sat.php KIT - Karlsruhe Institute of Technology https://www.kit.edu Postfach 3640,76021 Karlsruhe,Germany T:(+49)721 608-26026 F:-926026 [-- Attachment #1.2: S/MIME Cryptographic Signature --] [-- Type: application/pkcs7-signature, Size: 6041 bytes --] [-- Attachment #2: Type: text/plain, Size: 254 bytes --] ------------------------------------------ illumos: illumos-developer Permalink: https://illumos.topicbox.com/groups/developer/Tf791f87e1cf696f7-M6662219f179f9de513fd9fd8 Delivery options: https://illumos.topicbox.com/groups/developer/subscription ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [developer] Error scsi_vhci 2024-11-19 17:46 [developer] Error scsi_vhci Udo Grabowski (IMK) @ 2024-11-19 18:00 ` Udo Grabowski (IMK) 2024-11-19 18:07 ` Udo Grabowski (IMK) 0 siblings, 1 reply; 6+ messages in thread From: Udo Grabowski (IMK) @ 2024-11-19 18:00 UTC (permalink / raw) To: developer [-- Attachment #1.1: Type: text/plain, Size: 1372 bytes --] On 19-11-2024 18:46, Udo Grabowski (IMK) wrote: > Hi, > for a while now, stmsboot drops the error message below, but after > reboot, it works fine. The message is actually caused by > /lib/mpxio/stmsboot_util -D mpt_sas -N, which spits out '|iport' > instead of 'iport', letting the search in /dev/dsk/* for it fail. > The consequence is that former automatic discovery for vhci-capable > disks fails and you have to revert to the failover list in > /kernel/drv/scsi_vhci.conf again. stmsboot_util is a compiled > executable. > > # stmsboot -e -D mpt_sas > WARNING: This operation will require a reboot. > Do you want to continue ? [y/n] (default: y) y > egrep: RE error in |iport: invalid regular expression <=========== > ... Looks like an oversight for an edge case: -N 385 * same as the -n option, except that we only print the 386 * node-name (dev_info :: devi_node_name). Multiple instances 387 * through the libdevinfo snapshot are uniqified and separated 388 * by the "|" character for direct use by egrep(1). For only one item, there should be no "|" . -- Dr.Udo Grabowski Inst.of Meteorology & Climate Research IMK-ASF-SAT https://www.imk-asf.kit.edu/english/sat.php KIT - Karlsruhe Institute of Technology https://www.kit.edu Postfach 3640,76021 Karlsruhe,Germany T:(+49)721 608-26026 F:-926026 [-- Attachment #1.2: S/MIME Cryptographic Signature --] [-- Type: application/pkcs7-signature, Size: 6041 bytes --] [-- Attachment #2: Type: text/plain, Size: 254 bytes --] ------------------------------------------ illumos: illumos-developer Permalink: https://illumos.topicbox.com/groups/developer/Tf791f87e1cf696f7-M1f0b52c5d8f7615af0b1a135 Delivery options: https://illumos.topicbox.com/groups/developer/subscription ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [developer] Error scsi_vhci 2024-11-19 18:00 ` Udo Grabowski (IMK) @ 2024-11-19 18:07 ` Udo Grabowski (IMK) 2024-11-19 18:13 ` Udo Grabowski (IMK) 2024-11-20 17:20 ` Udo Grabowski (IMK) 0 siblings, 2 replies; 6+ messages in thread From: Udo Grabowski (IMK) @ 2024-11-19 18:07 UTC (permalink / raw) To: developer [-- Attachment #1.1: Type: text/plain, Size: 2052 bytes --] On 19-11-2024 19:00, Udo Grabowski (IMK) wrote: > On 19-11-2024 18:46, Udo Grabowski (IMK) wrote: >> Hi, >> for a while now, stmsboot drops the error message below, but after >> reboot, it works fine. The message is actually caused by >> /lib/mpxio/stmsboot_util -D mpt_sas -N, which spits out '|iport' >> instead of 'iport', letting the search in /dev/dsk/* for it fail. >> The consequence is that former automatic discovery for vhci-capable >> disks fails and you have to revert to the failover list in >> /kernel/drv/scsi_vhci.conf again. stmsboot_util is a compiled >> executable. >> >> # stmsboot -e -D mpt_sas >> WARNING: This operation will require a reboot. >> Do you want to continue ? [y/n] (default: y) y >> egrep: RE error in |iport: invalid regular expression <=========== >> ... > > > Looks like an oversight for an edge case: > > -N > 385 * same as the -n option, except that we only print the > 386 * node-name (dev_info :: devi_node_name). Multiple instances > 387 * through the libdevinfo snapshot are uniqified and separated > 388 * by the "|" character for direct use by egrep(1). > > For only one item, there should be no "|" . > This is the relevant section in usr/src/cmd/stmsboot/stmsboot_util.c 1144 if (cap_N_option) { 1145 char *nodename = di_node_name(curnode); 1146 /* nodename is never going to be null */ 1147 if (strstr(aliases, nodename) == NULL) 1148 /* haven't seen this nodename before */ 1149 (void) snprintf(aliases, 1150 MAXPATHLEN + 1, "%s|%s", 1151 ((aliases != NULL) ? aliases : ""), 1152 nodename); 1153 } else 1154 (void) printf("%s\n", path); -- Dr.Udo Grabowski Inst.of Meteorology & Climate Research IMK-ASF-SAT https://www.imk-asf.kit.edu/english/sat.php KIT - Karlsruhe Institute of Technology https://www.kit.edu Postfach 3640,76021 Karlsruhe,Germany T:(+49)721 608-26026 F:-926026 [-- Attachment #1.2: S/MIME Cryptographic Signature --] [-- Type: application/pkcs7-signature, Size: 6041 bytes --] [-- Attachment #2: Type: text/plain, Size: 254 bytes --] ------------------------------------------ illumos: illumos-developer Permalink: https://illumos.topicbox.com/groups/developer/Tf791f87e1cf696f7-Mf8d714e27df6b8b5dda8cd5a Delivery options: https://illumos.topicbox.com/groups/developer/subscription ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [developer] Error scsi_vhci 2024-11-19 18:07 ` Udo Grabowski (IMK) @ 2024-11-19 18:13 ` Udo Grabowski (IMK) 2024-11-19 18:18 ` Udo Grabowski (IMK) 2024-11-20 17:20 ` Udo Grabowski (IMK) 1 sibling, 1 reply; 6+ messages in thread From: Udo Grabowski (IMK) @ 2024-11-19 18:13 UTC (permalink / raw) To: developer [-- Attachment #1.1: Type: text/plain, Size: 2637 bytes --] On 19-11-2024 19:07, Udo Grabowski (IMK) wrote: > > > On 19-11-2024 19:00, Udo Grabowski (IMK) wrote: >> On 19-11-2024 18:46, Udo Grabowski (IMK) wrote: >>> Hi, >>> for a while now, stmsboot drops the error message below, but after >>> reboot, it works fine. The message is actually caused by >>> /lib/mpxio/stmsboot_util -D mpt_sas -N, which spits out '|iport' >>> instead of 'iport', letting the search in /dev/dsk/* for it fail. >>> The consequence is that former automatic discovery for vhci-capable >>> disks fails and you have to revert to the failover list in >>> /kernel/drv/scsi_vhci.conf again. stmsboot_util is a compiled >>> executable. >>> >>> # stmsboot -e -D mpt_sas >>> WARNING: This operation will require a reboot. >>> Do you want to continue ? [y/n] (default: y) y >>> egrep: RE error in |iport: invalid regular expression <=========== >>> ... >> >> >> Looks like an oversight for an edge case: >> >> -N >> 385 * same as the -n option, except that we only print the >> 386 * node-name (dev_info :: devi_node_name). Multiple instances >> 387 * through the libdevinfo snapshot are uniqified and >> separated >> 388 * by the "|" character for direct use by egrep(1). >> >> For only one item, there should be no "|" . >> > > This is the relevant section in usr/src/cmd/stmsboot/stmsboot_util.c > > 1144 if (cap_N_option) { > 1145 char *nodename = di_node_name(curnode); > 1146 /* nodename is never going to be null */ > 1147 if (strstr(aliases, nodename) == NULL) > 1148 /* haven't seen this nodename before */ > 1149 (void) snprintf(aliases, > 1150 MAXPATHLEN + 1, "%s|%s", > 1151 ((aliases != NULL) ? aliases : ""), > 1152 nodename); > 1153 } else > 1154 (void) printf("%s\n", path); Setting the aliases part to " " instead of "" would fix it, but I don't know if that is correct for all situations. -- Dr.Udo Grabowski Inst.of Meteorology & Climate Research IMK-ASF-SAT https://www.imk-asf.kit.edu/english/sat.php KIT - Karlsruhe Institute of Technology https://www.kit.edu Postfach 3640,76021 Karlsruhe,Germany T:(+49)721 608-26026 F:-926026 [-- Attachment #1.2: S/MIME Cryptographic Signature --] [-- Type: application/pkcs7-signature, Size: 6041 bytes --] [-- Attachment #2: Type: text/plain, Size: 254 bytes --] ------------------------------------------ illumos: illumos-developer Permalink: https://illumos.topicbox.com/groups/developer/Tf791f87e1cf696f7-M59345815d6cbef431dee5c54 Delivery options: https://illumos.topicbox.com/groups/developer/subscription ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [developer] Error scsi_vhci 2024-11-19 18:13 ` Udo Grabowski (IMK) @ 2024-11-19 18:18 ` Udo Grabowski (IMK) 0 siblings, 0 replies; 6+ messages in thread From: Udo Grabowski (IMK) @ 2024-11-19 18:18 UTC (permalink / raw) To: developer [-- Attachment #1.1: Type: text/plain, Size: 2773 bytes --] On 19-11-2024 19:13, Udo Grabowski (IMK) wrote: > On 19-11-2024 19:07, Udo Grabowski (IMK) wrote: >> >> >> On 19-11-2024 19:00, Udo Grabowski (IMK) wrote: >>> On 19-11-2024 18:46, Udo Grabowski (IMK) wrote: >>>> Hi, >>>> for a while now, stmsboot drops the error message below, but after >>>> reboot, it works fine. The message is actually caused by >>>> /lib/mpxio/stmsboot_util -D mpt_sas -N, which spits out '|iport' >>>> instead of 'iport', letting the search in /dev/dsk/* for it fail. >>>> The consequence is that former automatic discovery for vhci-capable >>>> disks fails and you have to revert to the failover list in >>>> /kernel/drv/scsi_vhci.conf again. stmsboot_util is a compiled >>>> executable. >>>> >>>> # stmsboot -e -D mpt_sas >>>> WARNING: This operation will require a reboot. >>>> Do you want to continue ? [y/n] (default: y) y >>>> egrep: RE error in |iport: invalid regular expression <=========== >>>> ... >>> >>> >>> Looks like an oversight for an edge case: >>> >>> -N >>> 385 * same as the -n option, except that we only print the >>> 386 * node-name (dev_info :: devi_node_name). Multiple >>> instances >>> 387 * through the libdevinfo snapshot are uniqified and >>> separated >>> 388 * by the "|" character for direct use by egrep(1). >>> >>> For only one item, there should be no "|" . >>> >> >> This is the relevant section in usr/src/cmd/stmsboot/stmsboot_util.c >> >> 1144 if (cap_N_option) { >> 1145 char *nodename = di_node_name(curnode); >> 1146 /* nodename is never going to be null */ >> 1147 if (strstr(aliases, nodename) == NULL) >> 1148 /* haven't seen this nodename before */ >> 1149 (void) snprintf(aliases, >> 1150 MAXPATHLEN + 1, "%s|%s", >> 1151 ((aliases != NULL) ? aliases : ""), >> 1152 nodename); >> 1153 } else >> 1154 (void) printf("%s\n", path); > > Setting the aliases part to " " instead of "" would fix it, but I > don't know if that is correct for all situations. No, there may exist blanks. -- Dr.Udo Grabowski Inst.of Meteorology & Climate Research IMK-ASF-SAT https://www.imk-asf.kit.edu/english/sat.php KIT - Karlsruhe Institute of Technology https://www.kit.edu Postfach 3640,76021 Karlsruhe,Germany T:(+49)721 608-26026 F:-926026 [-- Attachment #1.2: S/MIME Cryptographic Signature --] [-- Type: application/pkcs7-signature, Size: 6041 bytes --] [-- Attachment #2: Type: text/plain, Size: 254 bytes --] ------------------------------------------ illumos: illumos-developer Permalink: https://illumos.topicbox.com/groups/developer/Tf791f87e1cf696f7-Mc76de8992b98ba413fb086d6 Delivery options: https://illumos.topicbox.com/groups/developer/subscription ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [developer] Error scsi_vhci 2024-11-19 18:07 ` Udo Grabowski (IMK) 2024-11-19 18:13 ` Udo Grabowski (IMK) @ 2024-11-20 17:20 ` Udo Grabowski (IMK) 1 sibling, 0 replies; 6+ messages in thread From: Udo Grabowski (IMK) @ 2024-11-20 17:20 UTC (permalink / raw) To: developer [-- Attachment #1.1: Type: text/plain, Size: 2744 bytes --] On 19/11/2024 19:07, Udo Grabowski (IMK) wrote: > > > On 19-11-2024 19:00, Udo Grabowski (IMK) wrote: >> On 19-11-2024 18:46, Udo Grabowski (IMK) wrote: >>> Hi, >>> for a while now, stmsboot drops the error message below, but after >>> reboot, it works fine. The message is actually caused by >>> /lib/mpxio/stmsboot_util -D mpt_sas -N, which spits out '|iport' >>> instead of 'iport', letting the search in /dev/dsk/* for it fail. >>> The consequence is that former automatic discovery for vhci-capable >>> disks fails and you have to revert to the failover list in >>> /kernel/drv/scsi_vhci.conf again. stmsboot_util is a compiled >>> executable. >>> >>> # stmsboot -e -D mpt_sas >>> WARNING: This operation will require a reboot. >>> Do you want to continue ? [y/n] (default: y) y >>> egrep: RE error in |iport: invalid regular expression <=========== >>> ... >> >> >> Looks like an oversight for an edge case: >> >> -N >> 385 * same as the -n option, except that we only print the >> 386 * node-name (dev_info :: devi_node_name). Multiple instances >> 387 * through the libdevinfo snapshot are uniqified and >> separated >> 388 * by the "|" character for direct use by egrep(1). >> >> For only one item, there should be no "|" . >> > > This is the relevant section in usr/src/cmd/stmsboot/stmsboot_util.c > > 1144 if (cap_N_option) { > 1145 char *nodename = di_node_name(curnode); > 1146 /* nodename is never going to be null */ > 1147 if (strstr(aliases, nodename) == NULL) > 1148 /* haven't seen this nodename before */ > 1149 (void) snprintf(aliases, > 1150 MAXPATHLEN + 1, "%s|%s", > 1151 ((aliases != NULL) ? aliases : ""), > 1152 nodename); > 1153 } else > 1154 (void) printf("%s\n", path); > The code seems a bit wrong, since aliases cannot be NULL (it returns early before). calloc fills with 0-bytes, so the simplest fix, avoiding strncat or such, would be: if (strstr(aliases, nodename) == NULL) (void) snprintf(aliases, MAXPATHLEN+1, "%s%s%s", ((*aliases == 0) ? "" : aliases), ((*aliases == 0) ? "" : "|"), nodename); And aliases and nodename (need free?) are not free()d after ... [-- Attachment #1.2: S/MIME Cryptographic Signature --] [-- Type: application/pkcs7-signature, Size: 5804 bytes --] [-- Attachment #2: Type: text/plain, Size: 254 bytes --] ------------------------------------------ illumos: illumos-developer Permalink: https://illumos.topicbox.com/groups/developer/Tf791f87e1cf696f7-Mb142d7df15d46c46afc7efe0 Delivery options: https://illumos.topicbox.com/groups/developer/subscription ^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2024-11-20 17:22 UTC | newest] Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2024-11-19 17:46 [developer] Error scsi_vhci Udo Grabowski (IMK) 2024-11-19 18:00 ` Udo Grabowski (IMK) 2024-11-19 18:07 ` Udo Grabowski (IMK) 2024-11-19 18:13 ` Udo Grabowski (IMK) 2024-11-19 18:18 ` Udo Grabowski (IMK) 2024-11-20 17:20 ` Udo Grabowski (IMK)
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).