Uploaded image for project: 'OpenShift Bugs'
  1. OpenShift Bugs
  2. OCPBUGS-13025

accountID update in providerID column of machine

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Not a Bug
    • Icon: Normal Normal
    • None
    • 4.11
    • None
    • Quality / Stability / Reliability
    • False
    • Hide

      None

      Show
      None
    • None
    • Low
    • No
    • None
    • None
    • None
    • None
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      Description of problem:

      From: https://github.com/openshift/machine-api-provider-aws/issues/66
      
      We are running infra and worker machinesets in multiple AWS accounts, in a single cluster, and we'd like to see the PROVIDERID, from the machine api, include the AWS account ID. Something like: aws://012345678910/us-west-1a/i-abc123This would be helpful discerning machine account placement when exectuing oc -n openshift-machine-api get machines -o wide.@kimba74 suggested updating the machine reconciler function setProviderID with the following snippet:
      
      accountID := "" if instance.NetworkInterfaces[0] != nil {          // Referencing instance.NetworkInterfaces[0] since all network interfaces have the same OwnerId     accountID = aws.StringValue(instance.NetworkInterfaces[0].OwnerId) } providerID := fmt.Sprintf("aws://%s/%s/%s", accountID, availabilityZone, aws.StringValue(instance.InstanceId))

       

       

      Version-Release number of selected component (if applicable):

       

      How reproducible:

       

      Steps to Reproduce:

      1.
      2.
      3.
      

      Actual results:

       

      Expected results:

       

      Additional info:

       

              joelspeed Joel Speed
              khair@redhat.com Kelly Hair (Inactive)
              None
              None
              Zhaohua Sun Zhaohua Sun
              None
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: