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

Enable aws native fencing #224

Merged
merged 1 commit into from
May 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 16 additions & 1 deletion ansible/playbooks/tasks/cluster-bootstrap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -317,14 +317,29 @@
- op_default_timeout != '600'
- is_primary

- name: Configure AWS EC2 STONITH
ansible.builtin.command: >
crm configure primitive rsc_aws_stonith stonith:external/ec2
op start interval=0 timeout=180
op stop interval=0 timeout=180
op monitor interval=120 timeout=60
meta target-role=Started
params tag={{ aws_stonith_tag}} pcmk_delay_max=15
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
params tag={{ aws_stonith_tag}} pcmk_delay_max=15
params tag={{ aws_stonith_tag }} pcmk_delay_max=15

when:
- is_primary
- cloud_platform_is_aws
- not (use_sbd | bool)
register: stonith_config_result
failed_when: "'ERROR' in stonith_config_result.stderr"

- name: Configure cluster IP [aws]
ansible.builtin.command:
cmd: >-
crm configure primitive
rsc_ip_HDB_{{ sap_hana_install_sid }}{{ sap_hana_install_instance_number }}
ocf:suse:aws-vpc-move-ip params
ip={{ aws_cluster_ip }}
routing_table={{ aws_route_table }}
routing_table={{ aws_route_table_id }}
interface=eth0
profile=default
op start interval=0 timeout=180
Expand Down
3 changes: 2 additions & 1 deletion terraform/aws/inventory.tmpl
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
all:
vars:
use_sbd: ${use_sbd}
aws_route_table: ${routetable_id}
aws_route_table_id: ${routetable_id}
aws_cluster_ip: ${virtual_ip}
aws_stonith_tag: ${stonith_tag}
aws_region: ${region}
Copy link
Collaborator

Choose a reason for hiding this comment

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

I propose to leave out region for the moment

children:
hana:
hosts:
Expand Down
3 changes: 2 additions & 1 deletion terraform/aws/outputs.tf
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,8 @@ resource "local_file" "ansible_inventory" {
use_sbd = local.use_sbd,
routetable_id = aws_route_table.route-table.id,
virtual_ip = local.hana_cluster_vip,
stonith_tag = module.hana_node.stonith_tag
stonith_tag = module.hana_node.stonith_tag,
region = var.aws_region
Copy link
Collaborator

Choose a reason for hiding this comment

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

I propose to leave out region for the moment

})
filename = "inventory.yaml"
}
Expand Down
Loading