Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for multiple VPC routing tables in routing_tables parameter #1273

Merged
merged 3 commits into from Jan 2, 2019

Conversation

@gguifelixamz
Copy link
Contributor

commented Dec 4, 2018

Hello,

This pull request is to add support for multiple AWS VPC routing tables within a single aws-vpc-move-ip cluster resource as requested by some customers.

Design options were discussed with different people and the options considered were:

a) A single aws-vpc-move-ip resource with a multiple routing tables in routing_tables parameter
b) Multiple aws-vpc-move-ip resources but including a "dummy" flag to the ones that were only supposed to manipulate routing tables and not local IPs - basically an aws-vpc-move-ip resource for managing routing tables only

We decided to go with option "A", as it keeps the cluster configuration and topology the way it is today and only modifies a single configuration parameter. For example:

primitive res_AWS_IP ocf:suse:aws-vpc-move-ip \
        params address=192.168.1.9 routing_table="rtb-XXXXXXXXXXXXXXXXXX,rtb-YYYYYYYYYYYYYYY" interface=eth0 profile=AWS_CLI_profile \
        op start interval=0 timeout=180 \
        op stop interval=0 timeout=180 \
        op monitor interval=60 timeout=60 \
        meta target-role=Started

Lines 236-238 from this request were changed to match coding standards already in place for ec2ip_monitor() and ec2ip_drop()

Example testing from command line is shown below.

To start:

OCF_RESKEY_address=192.168.1.9 OCF_RESKEY_routing_table=rtb-XXXXXXXXXXXXXXXXXX,rtb-YYYYYYYYYYYYYYY OCF_RESKEY_profile=AWS_CLI_profile OCF_RESKEY_interface=eth0 OCF_RESKEY_monapi=true OCF_ROOT=/usr/lib/ocf /usr/lib/ocf/resource.d/suse/aws-vpc-move-ip start

To monitor:

OCF_RESKEY_address=192.168.1.9 OCF_RESKEY_routing_table=rtb-XXXXXXXXXXXXXXXXXX,rtb-YYYYYYYYYYYYYYYOCF_RESKEY_profile=AWS_CLI_profile OCF_RESKEY_interface=eth0 OCF_RESKEY_monapi=true OCF_ROOT=/usr/lib/ocf /usr/lib/ocf/resource.d/suse/aws-vpc-move-ip monitor

To stop:

OCF_RESKEY_address=192.168.1.9 OCF_RESKEY_routing_table=rtb-XXXXXXXXXXXXXXXXXX,rtb-YYYYYYYYYYYYYYY OCF_RESKEY_profile=AWS_CLI_profile OCF_RESKEY_interface=eth0 OCF_RESKEY_monapi=true OCF_ROOT=/usr/lib/ocf /usr/lib/ocf/resource.d/suse/aws-vpc-move-ip stop
@knet-ci-bot

This comment has been minimized.

Copy link

commented Dec 4, 2018

Can one of the admins verify this patch?

heartbeat/aws-vpc-move-ip Outdated Show resolved Hide resolved
heartbeat/aws-vpc-move-ip Outdated Show resolved Hide resolved
@oalbrigt

This comment has been minimized.

Copy link
Contributor

commented Dec 4, 2018

ok to test

@oalbrigt

This comment has been minimized.

Copy link
Contributor

commented Dec 4, 2018

Can you add a note about the support of comma-separated routing_tables in the parameter's section of the metadata as well?

aws-vpc-move-ip: multiple VPC routing tables in routing_tables parame…
…ter - included comment in metadata section
@gguifelixamz

This comment has been minimized.

Copy link
Contributor Author

commented Dec 4, 2018

Can you add a note about the support of comma-separated routing_tables in the parameter's section of the metadata as well?

Just made a new commit including it in the metadata section

@oalbrigt

This comment has been minimized.

Copy link
Contributor

commented Dec 7, 2018

Thanks. LGTM.

@oalbrigt oalbrigt merged commit 3eecacc into ClusterLabs:master Jan 2, 2019

2 checks passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
default Build finished.
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.