0

When deploying Spinnaker to EKS via hal deploy apply, Spinnaker Clouddriver pod goes to CrashLoopBackOff with the following error,

Factory method 'awsProvider' threw exception; nested exception is java.lang.NullPointerException: Cannot get property 'name' on null object

My Halyard config is like follows,

currentDeployment: default
deploymentConfigurations:
- name: default
  version: 1.17.6
  providers:
    appengine:
      enabled: false
      accounts: []
    aws:
      enabled: true
      accounts:
      - name: my-account
        requiredGroupMembership: []
        providerVersion: V1
        permissions: {}
        accountId: '010101010101' # my account id here
        regions: []
        assumeRole: Spinnaker-Clouddriver-Role
        lifecycleHooks: []
      primaryAccount: my-account
      bakeryDefaults:
        baseImages: []
      defaultKeyPairTemplate: '{{name}}-keypair'
      defaultRegions:
      - name: us-east-1
      defaults:
        iamRole: BaseIAMRole

My Spinnaker-Clouddriver-Role IAM role has full permissions at the moment. How can I get this resolved?


This is the full log https://gist.github.com/agentmilindu/cfbebffe46b93458df8158f9355e4041

Milindu Sanoj Kumarage
  • 2,714
  • 2
  • 31
  • 54

1 Answers1

2

This is more or less a guess, since you didn't include one iota of version information about your spinnaker setup, but...

According to at com.netflix.spinnaker.clouddriver.aws.provider.agent.ReservationReportCachingAgent$_determineVpcOnlyAccounts_closure2.doCall(ReservationReportCachingAgent.groovy:117) ~[clouddriver-aws.jar:na] in your gist, which corresponds to getAmazonEC2(credentials, credentials.regions[0].name) in version 6.5.2

it appears they do not tolerate having an empty regions: [] like you do; thus:

aws:
  enabled: true
  accounts:
  - name: my-account
    # ... snip ...
    # vvv-- update this list
    regions:
    - name: us-east-1
mdaniel
  • 31,240
  • 5
  • 55
  • 58
  • I stopped touching Spinnaker years ago because of this exact garbage -- they throw `NullPointerExceptions` willy nilly, which are the world's worst form of laziness. If someone can't be bothered to **check** that array is not empty before blindly dereferencing it, then I don't want them anywhere near my production – mdaniel Feb 24 '20 at 05:46
  • Wow! Worked like a charm! Totally agree with your comment on laziness. – Milindu Sanoj Kumarage Feb 25 '20 at 04:13