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

Adding ipv6 support #1655

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open

Conversation

vladsamoylik
Copy link

Hi! I am add ipv6 support to aws-vpc-move-ip shell script. Please see if I did everything correctly, please accept the commit.

@knet-ci-bot
Copy link

Can one of the admins verify this patch?

@@ -240,11 +238,21 @@ ec2ip_monitor() {
for rtb in $(echo $OCF_RESKEY_routing_table | sed -e 's/,/ /g'); do
ocf_log info "monitor: check routing table (API call) - $rtb"
if [ -z "${OCF_RESKEY_routing_table_role}" ]; then
cmd="$OCF_RESKEY_awscli --profile $OCF_RESKEY_profile $region_opt --output text ec2 describe-route-tables --route-table-ids $rtb --query RouteTables[*].Routes[?DestinationCidrBlock=='$OCF_RESKEY_ip/32'].$OCF_RESKEY_lookup_type"
if [[ "$OCF_RESKEY_ip" == *[:]* ]];
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You should use case to avoid these bashables.

Example:

case "$OCF_RESKEY_clientspec" in
*:*:*)

And also bump the indentation back a tab for this section.

ocf_log debug "executing command: $cmd"
ROUTE_TO_INSTANCE="$($cmd)"
else
cmd="$OCF_RESKEY_awscli $region_opt --output text ec2 describe-route-tables --route-table-ids $rtb --query RouteTables[*].Routes[?DestinationCidrBlock=='$OCF_RESKEY_ip/32'].$OCF_RESKEY_lookup_type"
if [[ "$OCF_RESKEY_ip" == *[:]* ]];
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This section should also have one less tab to fit match the rest of the code.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants