diff --git a/hacluster.html b/hacluster.html index a5d228c3f0cd..d150e8e2297c 100644 --- a/hacluster.html +++ b/hacluster.html @@ -58,6 +58,9 @@
  • check_iscsi_failure
  • @@ -346,6 +349,44 @@

    cluster_status_matches_regex

    +

    crm_maintenance_status

    + +
    crm_maintenance_status();
    + +

    Check maintenance mode status. Returns true (maintenance active) or false (maintenance inactive). Croaks if unknown status is received.

    + +

    crm_wait_for_maintenance

    + +
    crm_wait_for_maintenance(target_state=>$target_state, [loop_sleep=>$loop_sleep, timeout=>$timeout]);
    + +

    Wait for maintenance to be turned on or off. Croaks on timeout.

    + + + +

    crm_check_resource_location

    + +
    crm_check_resource_location(resource=>$resource, [wait_for_target=>$wait_for_target, timeout=>$timeout]);
    + +

    Checks current resource location, returns physical hostname of the node. Can be used to wait for desired state Eg: after failover. Croaks upon timeout.

    + + + diff --git a/sles4sap.html b/sles4sap.html index 4d395d70af35..e59f7a8ef0ab 100644 --- a/sles4sap.html +++ b/sles4sap.html @@ -47,6 +47,19 @@
  • upload_hana_install_log
  • upload_nw_install_log
  • startup_type
  • +
  • prepare_swpm
  • +
  • prepare_sapinst_profile
  • +
  • prepare_sap_instances_data
  • +
  • get_nw_instance_name
  • +
  • is_instance_type_supported
  • +
  • share_hosts_entry
  • +
  • add_hosts_file_entries
  • +
  • get_sidadm
  • +
  • sap_show_status_info
  • +
  • sapcontrol
  • +
  • sapcontrol_process_check
  • +
  • get_remote_instance_number
  • +
  • get_instance_profile_path
  • lib/sles4sap.pm

    @@ -277,6 +290,126 @@

    startup_type

    Record whether the SAP workload was started via sapinit or systemd units.

    +

    prepare_swpm

    + +
    $self->prepare_swpm(sapcar_bin_path=>$sapcar_bin_path,
    +   sar_archives_dir=>$sar_archives_dir,
    +   swpm_sar_filename=>$swpm_sar_filename,
    +   target_path=>$target_path);
    + +

    sapcar_bin_path Filename with full path to SAPCAR binary sar_archives_dir Directory which contains all required SAR archives (SWPM, SAP kernel, Patches, etc...) swpm_sar_filename SWPM SAR archive filename target_path Target path for archives to be unpacked into

    + +

    Unpacks and prepares swpm package from specified source dir into target directory using SAPCAR tool. After extraction it checks for 'sapinst' executable being present in target path. Croaks if executable is missing.

    + +

    prepare_sapinst_profile

    + +
    $self->prepare_sapinst_profile(
    +   profile_target_file=>$profile_target_file,
    +   profile_template_file=>$profile_template_file,
    +   sar_location_directory=>$sar_location_directory);
    + +

    Copies sapinst profile template from NFS to target dir and fills in required variables.

    + +

    profile_target_file Full filename and path for sapinst install profile to be created profile_template_file Template file location from which will the profile be sceated sar_location_directory Location of SAR files - this is filled into template

    + +

    prepare_sap_instances_data

    + +
    $self->prepare_sap_instances_data();
    + +

    Prepares data for installation of all SAP components using openqa parameter "SAP_INSTANCES". parameter example: SAP_INSTANCES = "ASCS,ERS,PAS,AAS". HDB = Hana database export - netweaver component, not database ASCS = Central services ERS = Enqueue replication PAS = Primary application server AAS = Additional application server

    + +

    get_nw_instance_name

    + +
    $self->get_nw_instance_name(instance_type=>$instance_type, instance_id=>$instance_id);
    + +

    Returns standard sap instance directory name constructed from instance id and instance type.

    + +

    instance_type Instance type (ASCS, ERS, PAS, AAS) instance_id Instance ID - two digit number

    + +

    is_instance_type_supported

    + +
    $self->is_instance_type_supported($instance_type);
    + +

    Checks if instance type is supported. Returns $instance_type with sucess, croaks with missing argument or unsupported value detected.

    + +

    instance_type Instance type (ASCS, ERS, PAS, AAS)

    + +

    share_hosts_entry

    + +
    $self->share_hosts_entry(virtual_hostname=>$virtual_hostname,
    +   virtual_ip=>$virtual_ip,
    +   shared_directory_root=>shared_directory_root);
    +
    +Creates file with virtual IP and hostname entry for /etc/hosts file on mounted shared device (Default: /sapmnt).
    +This is to help creating /etc/hosts file which would include entries for all nodes.
    +File name: <INSTANCE_TYPE>
    +File content: <virtual IP> <virtual_hostname>
    + +

    virtual_hostname Virtual hostname (alias) which is tied to instance and will be moved with HA IP addr resource virtual_ip Virtual IP addr tied to an instance and HA resource shared_directory_root Shared directory available for all instances. Separate directory 'hosts' will be created

    + +

    add_hosts_file_entries

    + +
    $self->add_hosts_file_entries();
    + +

    Reads files in 'HOSTS_SHARED_DIRECTORY' and adds entries into /etc/hosts file.

    + +

    get_sidadm

    + +
    $self->get_sidadm([must_exist=>$must_exist]);
    + +

    Returns sidadm username created from SAP sid - parameter INSTANCE_SID. check_if_exists - if set to true, test will fail if user does not exist. tests inconsistency between OpenQA parameter and real username

    + +

    must_exist Checks if sidadm exists, croaks on failure. Default 'false'

    + +

    sap_show_status_info

    + +
    $self->sap_show_status_info(cluster=>1, netweaver=>1);
    + +

    Prints output for standard set of commands to show info about system in various stages of the test for troubleshooting. It is possible to activate or deactivate various output sections by named args:

    + +

    cluster - Shows cluster related outputs netweaver - Shows netweaver related outputs

    + +

    sapcontrol

    + +
    $self->sapcontrol(instance_id=>$instance_id,
    +   webmethod=>$webmethod,
    +   [additional_args=>$additional_args,
    +   remote_execution=>$remote_execution]);
    + +

    Executes sapcontrol webmethod for instance specified in arguments and returns exit code received from command. Allows remote execution of webmethods between instances, however not all webmethods are possible to execute in that manner.

    + +

    Sapcontrol return codes: RC 0 = webmethod call was successfull RC 1 = webmethod call failed RC 2 = last webmethod call in progress (processes are starting/stopping) RC 3 = all processes GREEN RC 4 = all processes GREY (stopped)

    + +

    instance_id 2 digit instance number webmethod webmethod name to be executed (Ex: Stop, GetProcessList, ...) additional_args additional arguments to be appended at the end of command return_output returns output instead of RC remote_hostname hostname of the target instance for remote execution. Local execution does not need this. sidadm_password Password for sidadm user. Only required for remote execution.

    + +

    sapcontrol_process_check

    + +
    $self->sapcontrol_process_check(expected_state=>expected_state,
    +   [instance_id=>$instance_id,
    +   loop_sleep=>$loop_sleep,
    +   timeout=>$timeout,
    +   wait_for_state=>$wait_for_state]);
    + +

    Runs "sapcontrol -nr <INST_NO> -function GetProcessList" via SIDadm and compares RC against expected state. Croaks if state is not correct. RC 0 = webmethod call was successfull RC 1 = webmethod call failed (This includes NIECONN_REFUSED status) RC 2 = last webmethod call in progress (processes are starting/stopping) RC 3 = all processes GREEN RC 4 = all processes GREY (stopped)

    + +

    expected_state State that is expected (failed, started, stopped) instance_id Instance number - two digit number loop_sleep sleep time between checks - only used if 'wait_for_state' is true timeout timeout for waiting for target state, after which function croaks wait_for_state If set to true, function will wait for expected state until success or timeout

    + +

    get_remote_instance_number

    + +
    $self->get_instance_number(instance_type=>$instance_type);
    + +

    Finds instance number from remote instance using sapcontrol "GetSystemInstanceList" webmethod. Local system instance number is required to execute sapcontrol though.

    + +

    instance_type Instance type (ASCS, ERS) - this can be expanded to other instances

    + +

    get_instance_profile_path

    + +
    $self->get_instance_profile_path(instance_type=>$instance_type, instance_id=$instance_id);
    + +

    Returns full instance profile path for specified instance type

    + +

    instance_type Instance type (ASCS, ERS, PAS, AAS) instance_id Instance number - two digit number

    +