Hide Forgot
Description of problem: Tripleo breakpoints RegExp are not properly documented in our documentation [1]. Some samples could be provided or an info box could be added in order to point the user in the python regular expressions formats. [1] https://access.redhat.com/documentation/en/red-hat-openstack-platform/8/single/upgrading-red-hat-openstack-platform/#sect-Updating_the_Overcloud Version-Release number of selected component (if applicable): How reproducible: Always Steps to Reproduce: 1. Try to use shell regular expressions and it fails 2. 3. Actual results: Fails Expected results: Succeeds Additional info:
Hi David, Thanks for reporting this. This is an excellent idea. My assumption was the standard regexp patterns apply but it seems this isn't the case. Did you have any suggestions for valid regexps?
Enter 'Regexp' or 'Quit': overcloud-comp-0* Enter hosts file: Enter 'Regexp' or 'Quit': overcloud-comp-0[1-9] Enter hosts file: overcloud-comp-01 overcloud-comp-02 overcloud-comp-03 overcloud-comp-04 Enter 'Regexp' or 'Quit': This script uses the same regexp as the deployment and you could test this prior to update to make sure you match your hostnames: ----8<---- #!/usr/bin/env python # encoding=utf-8 (pep 0263) import re while True: regexp = input("Enter 'Regexp' or 'Quit': ") if regexp == "Quit": break file = input("Enter hosts file: ") if (len(file) < 1): file = 'hosts.txt' fh = open(file) try: for line in fh: line = line.rstrip() pattern = "\A{0}\Z".format(regexp) if re.match(pattern, line): print(line) except re.error as err: print("'%s' is invalid regular expression: %s", regexp.encode('string-escape'), err) ----8<----
(In reply to Dan Macpherson from comment #1) > Hi David, > > Thanks for reporting this. This is an excellent idea. > > My assumption was the standard regexp patterns apply but it seems this isn't > the case. Did you have any suggestions for valid regexps? Hi Dan, Thank you for asking but that won't actually be needed. It seems that there was a communication gap between us and the customer: he clarifies in a recent update that the confusing part for him was not the format of the regex but the type itself, i.e. that it is 'python regex' that is expected (vs shell regex, globbing, perl syntax, etc). He is also suggesting those two links as a potential candidate for receiving a small brush-up/note about it: https://access.redhat.com/documentation/en/red-hat-openstack-platform/8/single/upgrading-red-hat-openstack-platform/#sect-Updating_the_Overcloud https://access.redhat.com/documentation/en/red-hat-openstack-platform/8/single/command-line-interface-reference/#openstackclient_subcommand_overcloud_update_stack Please feel free to edit as you find most suitable one or both of the aforementioned documents. Ping back if anything. :} Regards, Irina
Ah, awesome. I'll add that the regexp patterns need to be python-based.
Great! Thanks, Dan. :)
Have include a note that the regexs are to be Python-based: https://access.redhat.com/documentation/en/red-hat-openstack-platform/8/single/upgrading-red-hat-openstack-platform/#sect-Updating_the_Overcloud Have also included this same note on OSP9 and OSP10 docs. Irina, anything further required for this BZ?
Hey Dan, I think it's good. Let me ask the customer who raised the question if there's anything else that he finds confusing. --Irina
Hi Dan, Nothing to add from the customer. We're good to go. Many thanks! --Irina
Excellent. Closing this BZ.