Closed pmcevoy closed 4 years ago
You are correct, the documentation is a bit confusing and an internal documentation ticket has been created to correct this.
In AWS the FGT's receive permissions to make AWS EC2 API calls via the IAM Instance role created by CloudFormation and assigned to both instances.
You do not need to configure an SDN connector for FGCP failover to work in AWS. For AWS FGTs, this is purely for dynamic address objects for use within normal firewall policies, not for HA failover.
Another point to keep in mind is that the actual DNS resolution and AWS EC2 API calls are made out of the HAmgmt interface (ie port4\eni3), on the instance that is now becoming master. So it is important that the FGTs have the ability to reach the configured DNS servers and public AWS EC2 API endpoints through this interface.
You can test if the FGTs are able to get credentials via the IAM role and reach the AWS EC2 API with the following CLI commands:
Enable debug output for the awsd process diag debug enable diag debug application awsd -1
Test network and api access diag test application awsd 3 diag test application awsd 4
Disable debut output diag debug reset diag debug disable
Here is example output from a PAYG slave\FGT2 that is currently a slave. Reference the output about the IAM role ################### Fgt2 # get sys status | grep "^Version|^Current HA mode" Version: FortiGate-VM64-AWSONDEMAND v6.2.2,build1010,191008 (GA) Current HA mode: a-p, backup Fgt2 # diag deb enable
Fgt2 # diag deb app awsd -1 Debug messages will be on for 30 minutes.
Fgt2 # diag test app awsd
Ok - that's interesting about the sdn-connector not being needed for HA. I've got one setup anyway - but was only able to get it to go "green" when the management EIPs were moved off eni0/port1 to eni3/port4.
I ran the commands that you suggested and reading the output, I seem to be good:
Fgt0 # diag test application awsd 3
--
awsd get instance id i-0cc96xxxxxxxxxxxxxxxx
awsd get iam role DingEC2Fortigate
awsd get region eu-west-1
awsd get vpc id vpc-090xxxxxxxxxxxx
Success
In summary, I was able to get multi AZ HA running by converting these step-by-step instructions into a Terraform config. I used some information from the CloudFormation template to help author the TF config (happy to share if you like)
I noted that Step 7, the management EIP is assigned to eni0/port1 - primary IP.
I let the instances come fully alive. Once they are up and running, I run a second TF config to re-associate the management EIPs with the Management ENI (eni3/port4) (namely move the association from eni0 to eni3).
I confirm that I was able to run a successful failover using 6.2.2 build 1010
I'm confused - the FortiOS Cookbook indicates that the Fabric Connector must be setup before HA can work. However the UserData config file that is applied to the instance does not have a
sdn-connector
section. How is this supposed to work? I can see that the IAM role is applied to the instance but the active node (the only one I can get to start) does not have a Aws fabric connector configured.