Ulrich Windl <[email protected]> writes: >>>> Kristoffer Grönlund <[email protected]> schrieb am 12.11.2014 um 22:52 in > Nachricht <[email protected]>: > [...] >>> self.supported_cib_re = "^pacemaker-([12][.][0123]|next)$" > > I'm no Python programmer, but this looks as if the version pattern is reduced > to a Boolean value. While the pattern looks OK, and it will match all the > desired versions (I guess), it may (especially when extended that way) also > match versions that may not be desired (does "2.3next" exist already?).
Hi Ulrich, Thank you for your input! I agree that using this regex to check for supported schemas is a bad idea and is unlikely to work as is. However, I am of the opinion that it is probably a bad idea to completely refuse to work if an unrecognized schema is used. It used to be that the schema version changed rarely, but with the new approach taken by pacemaker, it seems better to change the approach in crmsh as well. I intend to modify this to add a list of known schemas to the configuration file, and to warn if an unrecognized schema is used but allow the user to add to the list if they know what they are doing. Adding the pacemaker-next schema to the list of recognized schemas seems to me to defeat the whole purpose of checking in the first place, since the schema represented by that name changes depending on the version. Cheers, > > Regards, > Ulrich > > _______________________________________________ > Linux-HA mailing list > [email protected] > http://lists.linux-ha.org/mailman/listinfo/linux-ha > See also: http://linux-ha.org/ReportingProblems -- // Kristoffer Grönlund // [email protected] _______________________________________________ Linux-HA mailing list [email protected] http://lists.linux-ha.org/mailman/listinfo/linux-ha See also: http://linux-ha.org/ReportingProblems
