f5devcentral / f5-cloud-failover-extension

F5 Cloud Failover Extension (Archived)
Apache License 2.0
5 stars 1 forks source link

Some problems when using in AWS China #14

Closed guqingyuan closed 4 years ago

guqingyuan commented 4 years ago

Here are two problems in AWS China. In my case, when the failover occurs, I just want to switch Elastic IP to another device. So my declaration is

{
    "class": "Cloud_Failover",
    "environment": "aws",
    "externalStorage": {
        "scopingTags": {
            "f5_cloud_failover_label": "testdeploy"
        }
    },
    "failoverAddresses": {
        "scopingTags": {
            "f5_cloud_failover_label": "testdeploy"
        }
    },
    "controls": {
        "class": "Controls",
        "logLevel": "info"
    }
}

First problem: there is some error log

When I try to click force to standby in bigip GUI, I can see error log in /var/log/restnoded/restnoded.log on new active device.

Sun, 16 Feb 2020 11:45:57 GMT - finest: socket 185 opened
Sun, 16 Feb 2020 11:46:07 GMT - info: [f5-cloud-failover] Performing failover - execute
Sun, 16 Feb 2020 11:46:07 GMT - info: [f5-cloud-failover] Performing Failover - recovery
Sun, 16 Feb 2020 11:46:07 GMT - warning: [f5-cloud-failover] Recovering previous task:  {"addresses":null,"routes":null}
Sun, 16 Feb 2020 11:46:07 GMT - info: [f5-cloud-failover] Performing Failover - update
Sun, 16 Feb 2020 11:46:07 GMT - severe: [f5-cloud-failover] failover.execute() error: The filter 'null' is invalid InvalidParameterValue: The filter 'null' is invalid
    at Request.extractError (/var/config/rest/iapps/f5-cloud-failover/node_modules/aws-sdk/lib/services/ec2.js:50:35)
    at Request.callListeners (/var/config/rest/iapps/f5-cloud-failover/node_modules/aws-sdk/lib/sequential_executor.js:106:20)
    at Request.emit (/var/config/rest/iapps/f5-cloud-failover/node_modules/aws-sdk/lib/sequential_executor.js:78:10)
    at Request.emit (/var/config/rest/iapps/f5-cloud-failover/node_modules/aws-sdk/lib/request.js:683:14)
    at Request.transition (/var/config/rest/iapps/f5-cloud-failover/node_modules/aws-sdk/lib/request.js:22:10)
    at AcceptorStateMachine.runTo (/var/config/rest/iapps/f5-cloud-failover/node_modules/aws-sdk/lib/state_machine.js:14:12)
    at /var/config/rest/iapps/f5-cloud-failover/node_modules/aws-sdk/lib/state_machine.js:26:10
    at Request.<anonymous> (/var/config/rest/iapps/f5-cloud-failover/node_modules/aws-sdk/lib/request.js:38:9)
    at Request.<anonymous> (/var/config/rest/iapps/f5-cloud-failover/node_modules/aws-sdk/lib/request.js:685:12)
    at Request.callListeners (/var/config/rest/iapps/f5-cloud-failover/node_modules/aws-sdk/lib/sequential_executor.js:116:18)
    at Request.emit (/var/config/rest/iapps/f5-cloud-failover/node_modules/aws-sdk/lib/sequential_executor.js:78:10)
    at Request.emit (/var/config/rest/iapps/f5-cloud-failover/node_modules/aws-sdk/lib/request.js:683:14)
    at Request.transition (/var/config/rest/iapps/f5-cloud-failover/node_modules/aws-sdk/lib/request.js:22:10)
    at AcceptorStateMachine.runTo (/var/config/rest/iapps/f5-cloud-failover/node_modules/aws-sdk/lib/state_machine.js:14:12)
    at /var/config/rest/iapps/f5-cloud-failover/node_modules/aws-sdk/lib/state_machine.js:26:10
    at Request.<anonymous> (/var/config/rest/iapps/f5-cloud-failover/node_modules/aws-sdk/lib/request.js:38:9)
    at Request.<anonymous> (/var/config/rest/iapps/f5-cloud-failover/node_modules/aws-sdk/lib/request.js:685:12)
    at Request.callListeners (/var/config/rest/iapps/f5-cloud-failover/node_modules/aws-sdk/lib/sequential_executor.js:116:18)
    at callNextListener (/var/config/rest/iapps/f5-cloud-failover/node_modules/aws-sdk/lib/sequential_executor.js:96:12)
    at IncomingMessage.onEnd (/var/config/rest/iapps/f5-cloud-failover/node_modules/aws-sdk/lib/event_listeners.js:307:13)
    at emitNone (events.js:111:20)
    at IncomingMessage.emit (events.js:208:7)
Sun, 16 Feb 2020 11:46:09 GMT - info: [f5-cloud-failover] Association of Elastic IP addresses successful
Sun, 16 Feb 2020 11:46:09 GMT - info: [f5-cloud-failover] Addresses reassociated successfully
Sun, 16 Feb 2020 11:46:12 GMT - finest: socket 185 closed

And in my S3 bucket, here is a file named f5cloudfailoverstate.json.

<Error>
<Code>UnauthorizedAccess</Code>
<Message>You are not authorized to perform this operation</Message>
<RequestId>A7E92938BD4B20C5</RequestId>
<HostId>
BZiIvpBWaYsTwU8+dLiHNAR0wRQYYZ9LB0wh57qrhj8O5ciPQnBXJ5omhGrrZfRywIxEVlkaDYU=
</HostId>
</Error>

But in AWS console, I can see Elastic IP is already bound to another Private IP. Does this error have an effect?

Second problem: It takes too much time to switch elastic ip

I click force to standby in bigip GUI, and after about two minutes, I can see the ealstic ip bound to another Private IP. I think it took too long. Is this normal?

shyawnkarim commented 4 years ago

Try adding the route stanza with a fake route, even though you don't have a route, and see if you get the same error. This might be related to an issue where the Cloud Failover Extension gets confused with missing stanzas.

This is a known issue, internal issue AUTOSDK-158, and will be fixed in the next release.

alaari-f5 commented 4 years ago

Closing this issue

As of release CFE 1.2 we moved this CFE repo under F5Networks. Your issue was recreated there. To follow-up on this issue visit:

https://github.com/F5Networks/f5-cloud-failover-extension/issues/12