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

(EC2 Instance Tag values are set incorrectly - impacts fencing operation #903

Open
stephenmogg opened this issue Nov 11, 2022 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@stephenmogg
Copy link
Contributor

Used cloud platform
AWS

Used SLES4SAP version
SLESforSAP15SP4

Used client machine OS
OpenSUSE

Expected behaviour vs observed behaviour
Instance tags values (the ones used by EC2 Fence agent), are set incorrectly during deployment.
e.g tag value is set to 'terraformworkspace-hostname' - when it should be set to the short hostname of the instance.
Therefore - when a fencing operation is run, (manually or otherwise), the instance to fence can not be found.

How to reproduce
Deploy a 2 node HANA cluster (no bastion, no SBD, no netweaver, no drbd)
Attempt to fence a node.

  1. Move to any of the cloud providers folder
  2. Create the terraform.tfvars file based on terraform.tfvars.example
  3. Run the next terraform commands:
terraform init
terraform plan
terraform apply -auto-approve

The usage of the provisioning_log_level = "info" option in the terraform.tfvars file is interesting to get more information during the terraform commands execution. So it is suggested to run the deployment with this option to see what happens before opening any ticket.

Used terraform.tfvars
aws_region = "us-east-1"
aws_credentials = "/.aws/credentials"
reg_code = "INTERNAL-USE-ONLY-xxxxxxxxxxxx"
reg_email = "xxxxxxxxxxxxxxxxxx"
os_image = "suse-sles-sap-15-sp4-byos"
os_owner = "amazon"
public_key = "
/.ssh/id_rsa.pub"
private_key = "~/.ssh/id_rsa"
cluster_ssh_pub = "salt://sshkeys/cluster.id_rsa.pub"
cluster_ssh_key = "salt://sshkeys/cluster.id_rsa"
ha_sap_deployment_repo = "https://download.opensuse.org/repositories/network:ha-clustering:sap-deployments:v9/"
provisioning_log_level = "info"
pre_deployment = true
bastion_enabled = false
hana_name = "vmhana"
hana_instancetype = "r5.xlarge"
hana_count = "2"
hana_os_image = "suse-sles-sap-15-sp4-byos"
hana_os_owner = "amazon"
hana_ha_enabled = true
hana_inst_master = "s3://launchwizard-mysapmedia/s4hana1809/HANA/"
hana_archive_file = "51053381_part1.exe"
hana_cluster_vip = "192.168.1.10"
hana_sid = "PRD"
hana_instance_number = "00"
hana_master_password = "YourPass1234"
monitoring_enabled = false
netweaver_enabled = false
netweaver_master_password = "SuSE1234"

Logs
Upload the deployment logs to make the root cause finding easier. The logs might have sensitive secrets exposed. Remove them before uploading anything here. Otherwise, contact @arbulu89 to send the logs privately.

These is the list of the required logs (each of the deployed machines will have all of them):

  • /var/log/salt-os-setup.log
  • /var/log/salt-predeployment.log
  • /var/log/salt-deployment.log
  • /var/log/salt-result.log

Additional logs might be required to deepen the analysis on HANA or NETWEAVER installation. They will be asked specifically in case of need.

@stephenmogg stephenmogg added the bug Something isn't working label Nov 11, 2022
@diegoakechi diegoakechi assigned mr-stringer and unassigned arbulu89 Nov 11, 2022
@brianp-uk
Copy link

In case it is helpful... I also had a very brief look at this issue.
It seemed to be the case that if you use the default workspace in Terraform, then the instance tags are set and work as expected, but if they are set differently, by using a different Terraform workspace, they are not set correctly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
4 participants