Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package resource-agents for openSUSE:Factory checked in at 2024-09-25 21:51:20 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/resource-agents (Old) and /work/SRC/openSUSE:Factory/.resource-agents.new.29891 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "resource-agents" Wed Sep 25 21:51:20 2024 rev:133 rq:1203050 version:4.15.1+git27.f2932e21 Changes: -------- --- /work/SRC/openSUSE:Factory/resource-agents/resource-agents.changes 2024-08-08 10:57:22.609100344 +0200 +++ /work/SRC/openSUSE:Factory/.resource-agents.new.29891/resource-agents.changes 2024-09-25 21:51:24.383574807 +0200 @@ -1,0 +2,22 @@ +Tue Sep 24 19:03:38 UTC 2024 - vark...@suse.com + +- Update to version 4.15.1+git27.f2932e21: + * IPaddr2: add proto-parameter to be able to match a specific route + * Filesystem: stop/get_pids to be signaled + * Filesystem: on stop, try umount directly, before scanning for users + * docker-compose: use "docker compose" when not using older docker-compose command + * podman: Improve handling of "stopping" container removal in remove_container() (#1973) + * Filesystem: only use $umount_force after sending kill_signals + * apache/http-mon.sh: doc curl as preferred client + * apache/http-mon.sh: change curl opts to match wget + * powervs-subnet: Enable access via private endpoint for IBM IAM + * Filesystem: dont sleep during stop-action when there are no processes to kill + * IPsrcaddr: specify dev for default route, as e.g. fe80:: routes can be present on multiple interfaces + * powervs-subnet: Add optional argument route_table (#1966) + * findif.sh: ignore unreachable, blackhole, and prohibit routes + * powervs-subnet: Modify gathering of Apikey, calculation of timeout. + * azure-lb: fix spelling of adresses to addresses + * IPaddr2: Fix bringing up device +- Drop pacakge monitoring-plugins-metadata (jsc#PED-5577) (jsc#PED-8232) + +------------------------------------------------------------------- Old: ---- resource-agents-4.15.1+git0.a6ccb93a.tar.xz New: ---- resource-agents-4.15.1+git27.f2932e21.tar.xz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ resource-agents.spec ++++++ --- /var/tmp/diff_new_pack.ypk4cU/_old 2024-09-25 21:51:25.227609964 +0200 +++ /var/tmp/diff_new_pack.ypk4cU/_new 2024-09-25 21:51:25.231610130 +0200 @@ -17,7 +17,7 @@ Name: resource-agents -Version: 4.15.1+git0.a6ccb93a +Version: 4.15.1+git27.f2932e21 Release: 0 Summary: HA Reusable Cluster Resource Scripts License: GPL-2.0-only AND LGPL-2.1-or-later AND GPL-3.0-or-later ++++++ _servicedata ++++++ --- /var/tmp/diff_new_pack.ypk4cU/_old 2024-09-25 21:51:25.283612296 +0200 +++ /var/tmp/diff_new_pack.ypk4cU/_new 2024-09-25 21:51:25.287612462 +0200 @@ -1,7 +1,7 @@ <servicedata> <service name="tar_scm"> <param name="url">https://github.com/ClusterLabs/resource-agents.git</param> -<param name="changesrevision">a6ccb93a9f0c9a86dec2c3f6c823c8c6a8da711f</param> +<param name="changesrevision">f2932e218b912761c4374fd592dbaa6225abe6ae</param> </service> </servicedata> (No newline at EOF) ++++++ resource-agents-4.15.1+git0.a6ccb93a.tar.xz -> resource-agents-4.15.1+git27.f2932e21.tar.xz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/resource-agents-4.15.1+git0.a6ccb93a/heartbeat/Filesystem new/resource-agents-4.15.1+git27.f2932e21/heartbeat/Filesystem --- old/resource-agents-4.15.1+git0.a6ccb93a/heartbeat/Filesystem 2024-07-26 09:10:01.000000000 +0200 +++ new/resource-agents-4.15.1+git27.f2932e21/heartbeat/Filesystem 2024-09-23 11:05:18.000000000 +0200 @@ -669,9 +669,26 @@ $FUSER -Mm $dir 2>/dev/null fi elif [ "$FORCE_UNMOUNT" = "safe" ]; then - procs=$(find /proc/[0-9]*/ -type l -lname "${dir}/*" -or -lname "${dir}" 2>/dev/null | awk -F/ '{print $3}') - mmap_procs=$(grep " ${dir}/" /proc/[0-9]*/maps | awk -F/ '{print $3}') - printf "${procs}\n${mmap_procs}" | sort | uniq + # Yes, in theory, ${dir} could contain "intersting" characters + # and would need to be quoted for glob (find) and regex (grep). + # Don't do that, then. + + # Avoid /proc/[0-9]*, it may cause "Argument list too long". + # There are several ways to filter for /proc/<pid> + # -mindepth 1 -not -path "/proc/[0-9]*" -prune -o ... + # -path "/proc/[!0-9]*" -prune -o ... + # -path "/proc/[0-9]*" -a ... + # the latter seemd to be significantly faster for this one in my naive test. + procs=$(exec 2>/dev/null; + find /proc -path "/proc/[0-9]*" -type l \( -lname "${dir}/*" -o -lname "${dir}" \) -print | + awk -F/ '{print $3}' | uniq) + + # This finds both /proc/<pid>/maps and /proc/<pid>/task/<tid>/maps; + # if you don't want the latter, add -maxdepth. + mmap_procs=$(exec 2>/dev/null; + find /proc -path "/proc/[0-9]*/maps" -print | + xargs -r grep -l " ${dir}/" | awk -F/ '{print $3}' | uniq) + printf "${procs}\n${mmap_procs}" | sort -u fi } @@ -685,16 +702,17 @@ pids=$(get_pids "$dir") if [ -z "$pids" ]; then ocf_log info "No processes on $dir were signalled. force_unmount is set to '$FORCE_UNMOUNT'" - return + return 1 fi for pid in $pids; do ocf_log info "sending signal $sig to: $(ps -f $pid | tail -1)" kill -s $sig $pid done + return 0 } try_umount() { - local SUB="$1" - $UMOUNT $umount_force "$SUB" + local force_arg="$1" SUB="$2" + $UMOUNT $force_arg "$SUB" list_mounts | grep "${TAB}${SUB}${TAB}" >/dev/null 2>&1 || { ocf_log info "unmounted $SUB successfully" return $OCF_SUCCESS @@ -717,27 +735,33 @@ return $ret } fs_stop_loop() { - local SUB="$1" signals="$2" sig + local force_arg="$1" SUB="$2" signals="$3" sig send_signal while true; do + send_signal=false for sig in $signals; do - signal_processes "$SUB" $sig + signal_processes "$SUB" $sig && send_signal=true done - sleep $OCF_RESKEY_signal_delay - try_umount "$SUB" && return $OCF_SUCCESS + $send_signal && sleep $OCF_RESKEY_signal_delay + try_umount "$force_arg" "$SUB" && return $OCF_SUCCESS done } fs_stop() { local SUB="$1" timeout=$2 grace_time ret grace_time=$((timeout/2)) + # Just walking /proc may take "a long time", even if we don't find any users of this FS. + # If dependencies are properly configured, umount should just work. + # Only if that fails, try to find and kill processes that still use it. + try_umount "" "$SUB" && return $OCF_SUCCESS + # try gracefully terminating processes for up to half of the configured timeout - fs_stop_loop "$SUB" "$OCF_RESKEY_term_signals" & + fs_stop_loop "" "$SUB" "$OCF_RESKEY_term_signals" & timeout_child $! $grace_time ret=$? [ $ret -eq $OCF_SUCCESS ] && return $ret # try killing them for the rest of the timeout - fs_stop_loop "$SUB" "$OCF_RESKEY_kill_signals" & + fs_stop_loop "$umount_force" "$SUB" "$OCF_RESKEY_kill_signals" & timeout_child $! $grace_time ret=$? [ $ret -eq $OCF_SUCCESS ] && return $ret diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/resource-agents-4.15.1+git0.a6ccb93a/heartbeat/IPaddr2 new/resource-agents-4.15.1+git27.f2932e21/heartbeat/IPaddr2 --- old/resource-agents-4.15.1+git0.a6ccb93a/heartbeat/IPaddr2 2024-07-26 09:10:01.000000000 +0200 +++ new/resource-agents-4.15.1+git27.f2932e21/heartbeat/IPaddr2 2024-09-23 11:05:18.000000000 +0200 @@ -72,8 +72,8 @@ OCF_RESKEY_ip_default="" OCF_RESKEY_cidr_netmask_default="" OCF_RESKEY_broadcast_default="" +OCF_RESKEY_proto_default="" OCF_RESKEY_iflabel_default="" -OCF_RESKEY_cidr_netmask_default="" OCF_RESKEY_lvs_support_default=false OCF_RESKEY_lvs_ipv6_addrlabel_default=true OCF_RESKEY_lvs_ipv6_addrlabel_value_default=99 @@ -96,6 +96,7 @@ : ${OCF_RESKEY_ip=${OCF_RESKEY_ip_default}} : ${OCF_RESKEY_cidr_netmask=${OCF_RESKEY_cidr_netmask_default}} : ${OCF_RESKEY_broadcast=${OCF_RESKEY_broadcast_default}} +: ${OCF_RESKEY_proto=${OCF_RESKEY_proto_default}} : ${OCF_RESKEY_iflabel=${OCF_RESKEY_iflabel_default}} : ${OCF_RESKEY_lvs_support=${OCF_RESKEY_lvs_support_default}} : ${OCF_RESKEY_lvs_ipv6_addrlabel=${OCF_RESKEY_lvs_ipv6_addrlabel_default}} @@ -118,6 +119,8 @@ ####################################################################### +[ -z "$OCF_RESKEY_proto" ] && proto="" || proto="proto $OCF_RESKEY_proto" + SENDARP=$HA_BIN/send_arp SENDUA=$HA_BIN/send_ua FINDIF=findif @@ -224,6 +227,14 @@ <content type="string" default="${OCF_RESKEY_broadcast_default}"/> </parameter> +<parameter name="proto"> +<longdesc lang="en"> +Proto to match when finding network. E.g. "kernel". +</longdesc> +<shortdesc lang="en">Proto</shortdesc> +<content type="string" default="${OCF_RESKEY_proto_default}" /> +</parameter> + <parameter name="iflabel"> <longdesc lang="en"> You can specify an additional label for your IP address here. @@ -712,7 +723,7 @@ ocf_run $cmd || return $OCF_ERR_GENERIC msg="Bringing device $iface up" - cmd="$IP2UTIL link set $iface up" + cmd="$IP2UTIL link set dev $iface up" ocf_log info "$msg" ocf_run $cmd || return $OCF_ERR_GENERIC diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/resource-agents-4.15.1+git0.a6ccb93a/heartbeat/IPsrcaddr new/resource-agents-4.15.1+git27.f2932e21/heartbeat/IPsrcaddr --- old/resource-agents-4.15.1+git0.a6ccb93a/heartbeat/IPsrcaddr 2024-07-26 09:10:01.000000000 +0200 +++ new/resource-agents-4.15.1+git27.f2932e21/heartbeat/IPsrcaddr 2024-09-23 11:05:18.000000000 +0200 @@ -278,8 +278,8 @@ errorexit "command 'ip route replace $TABLE $NETWORK dev $INTERFACE $PROTO src $1 $METRIC $PREF' failed" if [ "$OCF_RESKEY_destination" = "0.0.0.0/0" ] || [ "$OCF_RESKEY_destination" = "::/0" ]; then - $CMDCHANGE $ROUTE_WO_SRC $PROTO src $1 || \ - errorexit "command '$CMDCHANGE $ROUTE_WO_SRC $PROTO src $1' failed" + $CMDCHANGE $ROUTE_WO_SRC dev $INTERFACE $PROTO src $1 || \ + errorexit "command '$CMDCHANGE $ROUTE_WO_SRC dev $INTERFACE $PROTO src $1' failed" fi rc=$? fi @@ -322,8 +322,8 @@ errorexit "command 'ip route replace $TABLE $NETWORK dev $INTERFACE $OPTS $METRIC $PREF' failed" if [ "$OCF_RESKEY_destination" = "0.0.0.0/0" ] || [ "$OCF_RESKEY_destination" = "::/0" ]; then - $CMDCHANGE $ROUTE_WO_SRC proto static || \ - errorexit "command '$CMDCHANGE $ROUTE_WO_SRC proto static' failed" + $CMDCHANGE $ROUTE_WO_SRC dev $INTERFACE proto static || \ + errorexit "command '$CMDCHANGE $ROUTE_WO_SRC dev $INTERFACE proto static' failed" fi return $? diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/resource-agents-4.15.1+git0.a6ccb93a/heartbeat/azure-lb new/resource-agents-4.15.1+git27.f2932e21/heartbeat/azure-lb --- old/resource-agents-4.15.1+git0.a6ccb93a/heartbeat/azure-lb 2024-07-26 09:10:01.000000000 +0200 +++ new/resource-agents-4.15.1+git27.f2932e21/heartbeat/azure-lb 2024-09-23 11:05:18.000000000 +0200 @@ -86,9 +86,9 @@ If net.ipv6.bindv6only = 1 => Listen only on IPv4 addresses ipv4only: Listen only on IPv4 addresses. ipv6enable: Enable TCP6 support. - nc: Listen only on IPv6 adresses independent of net.ipv6.bindv6only + nc: Listen only on IPv6 addresses independent of net.ipv6.bindv6only socat: If net.ipv6.bindv6only = 0 => Listen on both IPv4 and IP6 addresses. - If net.ipv6.bindv6only = 1 => Listen only on IPv6 adresses. + If net.ipv6.bindv6only = 1 => Listen only on IPv6 addresses. </longdesc> <shortdesc lang="en">Usage of IPv4 and IPv6 addresses.</shortdesc> <content type="string" default="${OCF_RESKEY_listen_default}"/> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/resource-agents-4.15.1+git0.a6ccb93a/heartbeat/docker-compose new/resource-agents-4.15.1+git27.f2932e21/heartbeat/docker-compose --- old/resource-agents-4.15.1+git0.a6ccb93a/heartbeat/docker-compose 2024-07-26 09:10:01.000000000 +0200 +++ new/resource-agents-4.15.1+git27.f2932e21/heartbeat/docker-compose 2024-09-23 11:05:18.000000000 +0200 @@ -113,9 +113,15 @@ if [ -r "$OCF_RESKEY_binpath" -a -x "$OCF_RESKEY_binpath" ]; then COMMAND="$OCF_RESKEY_binpath" else + OCF_RESKEY_binpath="$OCF_RESKEY_binpath_default" COMMAND="$OCF_RESKEY_binpath_default" fi +if ! $COMMAND -v 2>&1 | grep -q "^docker-compose version 1\."; then + OCF_RESKEY_binpath="${OCF_RESKEY_binpath%%-compose}" + COMMAND="$OCF_RESKEY_binpath compose" +fi + DIR="$OCF_RESKEY_dirpath" PRE="$(echo ${DIR##*/} | tr A-Z a-z | sed 's/[^a-z0-9]//g')" YML="$OCF_RESKEY_ymlfile" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/resource-agents-4.15.1+git0.a6ccb93a/heartbeat/findif.sh new/resource-agents-4.15.1+git27.f2932e21/heartbeat/findif.sh --- old/resource-agents-4.15.1+git0.a6ccb93a/heartbeat/findif.sh 2024-07-26 09:10:01.000000000 +0200 +++ new/resource-agents-4.15.1+git27.f2932e21/heartbeat/findif.sh 2024-09-23 11:05:18.000000000 +0200 @@ -218,9 +218,9 @@ fi if [ -n "$nic" ] ; then # NIC supports more than two. - routematch=$(ip -o -f $family route list match $match $proto $scope | grep "dev $nic " | sed -e 's,^\([0-9.]\+\) ,\1/32 ,;s,^\([0-9a-f:]\+\) ,\1/128 ,' | sort -t/ -k2,2nr) + routematch=$(ip -o -f $family route list match $match $proto $scope | grep -v "^\(unreachable\|prohibit\|blackhole\)" | grep "dev $nic " | sed -e 's,^\([0-9.]\+\) ,\1/32 ,;s,^\([0-9a-f:]\+\) ,\1/128 ,' | sort -t/ -k2,2nr) else - routematch=$(ip -o -f $family route list match $match $proto $scope | sed -e 's,^\([0-9.]\+\) ,\1/32 ,;s,^\([0-9a-f:]\+\) ,\1/128 ,' | sort -t/ -k2,2nr) + routematch=$(ip -o -f $family route list match $match $proto $scope | grep -v "^\(unreachable\|prohibit\|blackhole\)" | sed -e 's,^\([0-9.]\+\) ,\1/32 ,;s,^\([0-9a-f:]\+\) ,\1/128 ,' | sort -t/ -k2,2nr) fi if [ "$family" = "inet6" ]; then routematch=$(echo "$routematch" | grep -v "^default") diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/resource-agents-4.15.1+git0.a6ccb93a/heartbeat/http-mon.sh new/resource-agents-4.15.1+git27.f2932e21/heartbeat/http-mon.sh --- old/resource-agents-4.15.1+git0.a6ccb93a/heartbeat/http-mon.sh 2024-07-26 09:10:01.000000000 +0200 +++ new/resource-agents-4.15.1+git27.f2932e21/heartbeat/http-mon.sh 2024-09-23 11:05:18.000000000 +0200 @@ -22,7 +22,7 @@ curl_ipv6_opts="-g" fi WGETOPTS="-O- -q --no-proxy --bind-address=$bind_address" -CURLOPTS="-o - -Ss -L --interface lo $curl_ipv6_opts" +CURLOPTS="-o - -Ss -L --noproxy '*' --interface $bind_address $curl_ipv6_opts" request_url_header() { which curl >/dev/null 2>&1 @@ -76,7 +76,7 @@ # find a good http client # findhttpclient() { - # prefer wget (for historical reasons) + # prefer curl (see b2ca07d) if [ "x$CLIENT" != x ] && which "$CLIENT" >/dev/null 2>&1; then echo "$CLIENT" elif which curl >/dev/null 2>&1; then diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/resource-agents-4.15.1+git0.a6ccb93a/heartbeat/podman new/resource-agents-4.15.1+git27.f2932e21/heartbeat/podman --- old/resource-agents-4.15.1+git0.a6ccb93a/heartbeat/podman 2024-07-26 09:10:01.000000000 +0200 +++ new/resource-agents-4.15.1+git27.f2932e21/heartbeat/podman 2024-09-23 11:05:18.000000000 +0200 @@ -254,6 +254,13 @@ ocf_run podman rm -v $CONTAINER rc=$? if [ $rc -ne 0 ]; then + if [ $rc -eq 2 ]; then + if podman inspect --format '{{.State.Status}}' $CONTAINER | grep -wq "stopping"; then + ocf_log err "Inactive container ${CONTAINER} is stuck in 'stopping' state. Force-remove it." + ocf_run podman rm -f $CONTAINER + rc=$? + fi + fi # due to a podman bug (rhbz#1841485), sometimes a stopped # container can still be associated with Exec sessions, in # which case the "podman rm" has to be forced @@ -517,8 +524,8 @@ # but the associated container exit code is -1. If that's the case, # assume there's no failure and continue with the rm as usual. if [ $rc -eq 125 ] && \ - podman inspect --format '{{.State.Status}}:{{.State.ExitCode}}' $CONTAINER | grep -wq "stopped:-1"; then - ocf_log warn "Container ${CONTAINER} had an unexpected stop outcome. Trying to remove it anyway." + podman inspect --format '{{.State.Status}}:{{.State.ExitCode}}' $CONTAINER | grep -Eq '^(exited|stopped):-1$'; then + ocf_log err "Container ${CONTAINER} had an unexpected stop outcome. Trying to remove it anyway." else ocf_exit_reason "Failed to stop container, ${CONTAINER}, based on image, ${OCF_RESKEY_image}." return $OCF_ERR_GENERIC diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/resource-agents-4.15.1+git0.a6ccb93a/heartbeat/powervs-subnet.in new/resource-agents-4.15.1+git27.f2932e21/heartbeat/powervs-subnet.in --- old/resource-agents-4.15.1+git0.a6ccb93a/heartbeat/powervs-subnet.in 2024-07-26 09:10:01.000000000 +0200 +++ new/resource-agents-4.15.1+git27.f2932e21/heartbeat/powervs-subnet.in 2024-09-23 11:05:18.000000000 +0200 @@ -24,6 +24,7 @@ import ipaddress import json +import math import os import re import socket @@ -62,7 +63,7 @@ CONN_PREFIX = "VIP_" DEV_PREFIX = "env" ROUTING_PRIO = 50 - ROUTING_TABLE = 500 + ROUTING_TABLE = ocf.get_parameter("route_table", 500) _WAIT_FOR_NIC_SLEEP = 3 def __init__(self): @@ -175,8 +176,7 @@ ocf.logger.debug(f"wait_for_nic: args: mac: {mac}, timeout: {timeout} s") mac_address = mac.upper() - retries = (timeout // cls._WAIT_FOR_NIC_SLEEP) - 1 - + retries = math.ceil((timeout * 0.95) / cls._WAIT_FOR_NIC_SLEEP) - 1 for attempt in range(1, retries + 1): try: ocf.logger.debug( @@ -265,6 +265,7 @@ """Provides methods to manage Power Virtual Server resources through its REST API.""" _URL_IAM_GLOBAL = "https://iam.cloud.ibm.com/identity/token" + _URL_IAM_PRIVATE = "https://private.iam.cloud.ibm.com/identity/token" _URL_API_PUBLIC = "https://{}.power-iaas.cloud.ibm.com" _URL_API_PRIVATE = "https://private.{}.power-iaas.cloud.ibm.com" _URL_API_BASE = "/pcloud/v1/cloud-instances/{}" @@ -363,8 +364,11 @@ try: keys = json.loads(f.read()) # data seems to be in json format - # return the value of the item with the key 'apikey' - api_key = keys.get("apikey", keys) + # return the value of the item with the key 'Apikey' + # backward compatibility: In the past, the key name was 'apikey' + api_key = keys.get("Apikey", "") + if not api_key: + api_key = keys.get("apikey", "") except ValueError: # data is text, return as is api_key = f.read().strip() @@ -379,7 +383,7 @@ def _set_token(self): """Use the stored API key to obtain an IBM Cloud IAM access token.""" - url = self._URL_IAM_GLOBAL + url = self._URL_IAM headers = { "content-type": "application/x-www-form-urlencoded", @@ -668,6 +672,9 @@ self._URL_API_PRIVATE if api_type == "private" else self._URL_API_PUBLIC ) self._url = url_api_fmt.format(self._res_options["region"]) + self._URL_IAM = ( + self._URL_IAM_PRIVATE if api_type == "private" else self._URL_IAM_GLOBAL + ) self._base = self._URL_API_BASE.format(self._cloud_instance_id) self._session = None @@ -801,7 +808,7 @@ nic, ip_address, mac, gateway = ws.subnet_add() ocf.logger.debug( - f"start_action: add nmcli connection: nic: {nic}, ip: {ip_address}, mac: {mac}, gateway: {gateway}, jumbo: {ws.jumbo}" + f"start_action: add nmcli connection: nic: {nic}, ip: {ip_address}, mac: {mac}, gateway: {gateway}, jumbo: {ws.jumbo}, table {nmcli.ROUTING_TABLE}" ) conn_name = f"{nmcli.CONN_PREFIX}{nic}" @@ -928,7 +935,7 @@ res_options = locals() - # The class instantation validates the resource agent options and that the instance exists + # The class instantiation validates the resource agent options and that the instance exists try: # Check instance in local workspace _ = PowerCloudAPI(**res_options, use_remote_workspace=False) @@ -962,15 +969,14 @@ Install with @server group to ensure that NetworkManager settings are correct. Verify that the NetworkManager-config-server package is installed. - 2. IBM Cloud API Key: + 2. A two-node cluster that is distributed across two different Power Virtual Server workspaces in two data centers in a region. + + 3. IBM Cloud API Key: Create a service API key that is privileged for both Power Virtual Server workspaces. Save the service API key in a file and copy the file to both cluster nodes. Use same filename and directory location on both cluster nodes. Reference the path to the key file in the resource definition. - 3. The hostname of the virtual server instances must be same as the name - of the virtual server instances in the Power Virtual Server workspaces. - For comprehensive documentation on implementing high availability for SAP applications on IBM Power Virtual Server, visit https://cloud.ibm.com/docs/sap?topic=sap-ha-overview. """) @@ -979,7 +985,7 @@ "powervs-subnet", shortdesc="Manages moving a Power Virtual Server subnet", longdesc=agent_description, - version=1.01, + version=1.04, ) agent.add_parameter( @@ -1080,6 +1086,16 @@ default="false", ) + agent.add_parameter( + "route_table", + shortdesc="route table ID", + longdesc="ID of the route table for the interface. Default is 500.", + content_type="string", + required=False, + default="500", + ) + + agent.add_action("start", timeout=900, handler=start_action) agent.add_action("stop", timeout=450, handler=stop_action) agent.add_action(