Uploaded image for project: 'Lustre'
  1. Lustre
  2. LU-20657

short_hostname() truncates IPv4 addresses, misfiling yaml entities

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Medium Medium
    • Lustre 2.18.0
    • None
    • None
    • 3
    • 9223372036854775807

      short_hostname() strips everything from the first period, which is
      right for an FQDN and destructive for an IPv4 address:

      short_hostname()

      { echo $(sed "s/\..*//" <<< $1) }

      short_hostname 10.135.230.14 -> 10

      yml_entities() in yaml.sh appends every facet entity to
      $logdir/node.$(short_hostname $host).yml. When the facets are named by
      IP - which is what h2name_or_ip requires for ${facet}failover_HOST, since
      given a hostname it expands `hostname -I` to every ethernet address and
      emits non-LNet NIDs - every role from every server lands in one file:

      node.10.yml:
      node_type: MGS node_name: 10
      node_type: MDS 1 node_name: 10
      node_type: MDS 2 node_name: 10
      node_type: OST 1..4 node_name: 10

      That file has no Build:/Node: header, because the header is written by
      yml_node() into node.<host>.yml under the untruncated name. So the run
      produces a bare YAML sequence that a results store rejects, and the real
      per-node files carry no entities at all - no roles for any server.

      Entries are also duplicated: facet_passive_host is truncated to the same
      "10", so each role is written twice.

      Fix: leave an IPv4 address alone. An address has no domain to strip.

      Reproducible on any configuration whose ${facet}_HOST values are IP
      addresses rather than names.

            rread Robert Read
            rread Robert Read
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: