gpexapansion message "The address value for xxx_n does not correspond to a standard address." in Pivotal Greenplum
search cancel

gpexapansion message "The address value for xxx_n does not correspond to a standard address." in Pivotal Greenplum

book

Article ID: 296276

calendar_today

Updated On:

Products

VMware Tanzu Greenplum

Issue/Introduction

Sometimes when you expand hosts, you get a message similar to the one below:
gpexpand -f hosts_new_expand -D expand 
.... 
.... 
The current system appears to be non-standard. The address value for xxx_n does not correspond to a standard address. gpexpand may not be able to symmetrically distribute the new segments appropriately. It is recommended that you specify your own input file with appropriate values.
...


Environment

Product Version: 4.3

Resolution

In this case, the issue is caused by a non-standard address name of segment hosts. According to the code, the standard address format should have '-<n>' as the suffix, otherwise the  message will be thrown during gpexpansion.

Note: n refers to a number. 

You can see from the message that "xxx_n" is not a standard address name.

The solution is to change the address to the format "xxx-n", for example "sdw-1". This ensures the /etc/hosts, gp_segment_configuration and the expansion host file to be consistent.

Below is the code for reference:
This utility can handle some expansion scenarios by asking a few questions.
More complex expansions can be done by providing an input file with
the --input <file>.  Please see the docs for the format of this file. """
 
    standard, message = gparray.isStandardArray()
    if standard == False:
        help = help + """
 
       The current system appears to be non-standard.
       """
        help = help + message
        help = help + """
       gpexpand may not be able to symmetrically distribute the new segments appropriately.
       It is recommended that you specify your own input file with appropriate values."""
        if not ask_yesno(help, "Are you sure you want to continue with this gpexpand session?", 'N'):
            logger.info("User Aborted. Exiting...")
            sys.exit(0)
From the function gparray.isStandardArray(), you can see the below snippet explaining the standard format of address name. It returns false for non-standard format of address name.
# Make sure the address all have the same suffix "-<n>" (like -1, -2, -3...)
            firstSuffixList = []
            first           = True
            suffixList      = []
            for host in gpdbByHost:
                gpdbList = gpdbByHost[host]
                for gpdb in gpdbList:
                    if gpdb.isSegmentMaster() == True:
                        continue
                    address = gpdb.getSegmentAddress()
                    if address == host:
                        if len(suffixList) == 0:
                            continue
                        else:
                            raise Exception("The address value for %s is the same as the host name, but other addresses on the host are not." % address)
                    suffix  = address.split('-')[-1]
                    if suffix.isdigit() == False:
                        raise Exception("The address value for %s does not correspond to a standard address." % address)
                    suffixList.append(suffix)
                suffixList.sort()
                if first == True:
                    firstSuffixList = suffixList
                first = False
                if suffixList != firstSuffixList:
                    raise Exception("The address list for %s doesn't not have the same pattern as %s." % (str(suffixList), str(firstSuffixList)))
        except Exception, e:
            # Assume any exception implies a non-standard array
            return False, str(e)
        return True, ""