Uploaded image for project: 'RHEL'
  1. RHEL
  2. RHEL-97072

Length of cluster name is not validated

Linking RHIVOS CVEs to...Migration: Automation ...SWIFT: POC ConversionSync from "Extern...XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Normal Normal
    • None
    • rhel-10.1
    • pcs
    • None
    • No
    • Moderate
    • rhel-ha
    • 2
    • False
    • False
    • Hide

      None

      Show
      None
    • None
    • None
    • None
    • None
    • Unspecified
    • Unspecified
    • Unspecified
    • None

      What were you trying to do that didn't work?

      Set a long cluster name (either with 'pcs cluster setup' or 'pcs cluster rename'), force needs to be used, however the error message suggests that the name can be safely override if GFS2 is not used - which is this case.

      This is because corosync can't parse line, that is too long.

      Please provide the package NVR for which the bug is seen:

      found in pcs-0.12.0-5.el10

      How reproducible is this bug?:

      always

      Steps to reproduce

          [root@hvirt-049 ~]# LONG_NAME=$(tr -dc A-Za-z0-9 < /dev/urandom | head -c 493)
          [root@hvirt-049 ~]# pcs cluster setup $LONG_NAME hvirt-049 hvirt-247 --force
          No addresses specified for host 'hvirt-049', using 'hvirt-049'
          No addresses specified for host 'hvirt-247', using 'hvirt-247'
          Warning: Chosen cluster name 'pK5wTKova6SdIhkiVOBeWcTMsG5kv4QVFORUybqNUToIIU39GqYj4SlAC9lfX8c592tb7LcPOuZL2oScyhIyZfvDi20gwcgaI3wACZxI8l83kIS7cGgQ1MfqhqUrl8gIhDFwBYGtCiw3ALLAT8z4xlmloNYafwJyRsic84cG04OJfgxeD1StwBXwVODLmnhyVK3eIFav5edqzg2xBWsAG39ZyvQwEoaSTx7EwMy2Aj8gHS2wg3G4WWmt7dtIirN268JMgJqOPjNdQ5phGLBaYSjAQmqWKgTlraHZudd8oYrers0oLM2Uo125nCv06hrS2zzPUlQ8Qyke80SxJjNFUKbexzbq8uPYKV5Xpsf0CpJxYsQE0aPicNJ8JNL5btwuP0tklRL999Fg1uOg1f5JzmFgsliRPrXFeTj1i2obTszCy8YmUrNO5oFaj8UANFuFHjpIfXWEMDG1sddrueEjBThC2T57DyEZotJ51Kkh6fQRXPUi1tak' will prevent mounting GFS2 volumes in the cluster, use at most 32 of a-z A-Z 0-9 _- characters; you may safely override this if you do not intend to use GFS2
          Destroying cluster on hosts: 'hvirt-049', 'hvirt-247'...
          hvirt-247: Successfully destroyed cluster
          hvirt-049: Successfully destroyed cluster
          Requesting remove 'pcsd settings' from 'hvirt-049', 'hvirt-247'
          hvirt-049: successful removal of the file 'pcsd settings'
          hvirt-247: successful removal of the file 'pcsd settings'
          Sending 'corosync authkey', 'pacemaker authkey' to 'hvirt-049', 'hvirt-247'
          hvirt-049: successful distribution of the file 'corosync authkey'
          hvirt-049: successful distribution of the file 'pacemaker authkey'
          hvirt-247: successful distribution of the file 'corosync authkey'
          hvirt-247: successful distribution of the file 'pacemaker authkey'
          Sending 'corosync.conf' to 'hvirt-049', 'hvirt-247'
          hvirt-049: successful distribution of the file 'corosync.conf'
          hvirt-247: successful distribution of the file 'corosync.conf'
          Cluster has been successfully set up.
      
          [root@hvirt-049 ~]# pcs cluster start --all --wait
          hvirt-049: Error connecting to hvirt-049 - (HTTP error: 400)
          hvirt-247: Error connecting to hvirt-247 - (HTTP error: 400)
          Error: unable to start all nodes
          hvirt-049: Error connecting to hvirt-049 - (HTTP error: 400)
          hvirt-247: Error connecting to hvirt-247 - (HTTP error: 400)
      
          [root@hvirt-049 ~]# systemctl status corosync
          {...}
          Jun 16 11:06:51 hvirt-049.fast.eng.rdu2.dc.redhat.com corosync[678680]: parser error: /etc/corosync/corosync.conf:3: Line too long
      

      Expected results

      Validation of maximal length of the cluster name, that corosync can parse, is in place. This number seems to be 493 characters (together with the spaces and "cluster_name" text in the config, it is 512 characters for the line).

      Actual results

      Validation is not in place, cluster can't be started.

              tojeline@redhat.com Tomas Jelinek
              mmazoure Michal Mazourek
              Tomas Jelinek Tomas Jelinek
              Cluster QE Cluster QE
              Votes:
              0 Vote for this issue
              Watchers:
              7 Start watching this issue

                Created:
                Updated: