Define the hostname with a configuration setting on Windows

XMLWordPrintable

    • Type: Suggestion
    • Resolution: Unresolved
    • None
    • Component/s: Elastic Bamboo
    • None
    • 0
    • 1

      Problem Definition

      When creating an AMI image to be used with the elastic agent, Windows automatically creates an HNS Internal NIC to be used on virtual machines/containers.
      Bamboo Agent was structured to use Java’s getCanonicalHostname() from the Java native library InetAddress class, to fill the "hostName" information is sent it back to the Bamboo Server. The hostName returns what the Operating System tells Java. If another NIC is the primary, it will use that hostname as that value.

         private String getHostname() {
              String hostName;
              try {
                  hostName = InetAddress.getLocalHost().getCanonicalHostName();
              } catch (UnknownHostException e) {
                  log.warn("Cannot determine local host name; using \"localhost\".", e);
                  hostName = "localhost";
              }
              return hostName;
          }

      Suggested Solution

      Have an option in Bamboo where we can choose with IP address /NIC to connect to.

      Why this is important

      Workaround

      Would be changing the priority order of the network adapters on Windows.

            Assignee:
            Unassigned
            Reporter:
            Giovanna Fragoso
            Votes:
            3 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated: