asgard icon indicating copy to clipboard operation
asgard copied to clipboard

Asgard assumes too much about its deployment environment, ServerService exception

Open bmoyles opened this issue 9 years ago • 0 comments

Just rolled out 1.5 and configured it with both IAM and STS for cross-account management. Unfortunately, it seems as if Asgard assumes a bit too much about its world when in the cloud... Viewing the task list will trigger a call to ServerService asking for other Asgard instances that should be queried for their in-memory task lists. Normally not a problem, but when using STS, Asgard is not in the account it manages. The method listRemoteServerNamesInCloudCluster starts off

        Cluster cluster = awsAutoScalingService.getCluster(UserContext.auto(Region.withCode(regionName)), clusterName)
        List<GroupedInstance> instances = cluster.instances

Unfortunately, that's going to look in the MANAGED account for the asgard cluster, leaving cluster = null and the following call to cluster.instances tosses a NPE.

I see the ConfigService does expose config for getOtherServerNamePortCombos, but that assumes you have a fixed list of instances and don't use Asgard to manage Asgard :) I don't believe this is a factor if Eureka is in the mix, though (we aren't using Eureka).

bmoyles avatar Jul 10 '14 18:07 bmoyles