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

accountID update in providerID column of machine

    XMLWordPrintable

Details

    • Bug
    • Resolution: Not a Bug
    • Normal
    • None
    • 4.11
    • None
    • Low
    • No
    • False
    • Hide

      None

      Show
      None

    Description

      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:

       

      Attachments

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved: