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 2021-07-04 22:10:34
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/resource-agents (Old)
and /work/SRC/openSUSE:Factory/.resource-agents.new.2625 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "resource-agents"
Sun Jul 4 22:10:34 2021 rev:108 rq:903585 version:4.8.0+git38.c6c53268
Changes:
--------
--- /work/SRC/openSUSE:Factory/resource-agents/resource-agents.changes
2021-05-12 19:32:04.403075667 +0200
+++
/work/SRC/openSUSE:Factory/.resource-agents.new.2625/resource-agents.changes
2021-07-04 22:10:38.241278031 +0200
@@ -1,0 +2,11 @@
+Thu Jun 24 20:36:29 UTC 2021 - [email protected]
+
+- Update to version 4.8.0+git38.c6c53268:
+ * podman: workaround race during container creation
+ * VirtualDomain: Added code to set the host_memory value for Utilization
(#1649)
+ * gcp-vpc-move-vip: add serviceaccount JSON file support
+ * gcp-vpc-move-route: add serviceaccount JSON file support
+ * LVM-activate: fix drop-in check to avoid re-creating drop-in file when it
already exists
+ * Low: dummy: Add missing action to dummy_usage function
+
+-------------------------------------------------------------------
Old:
----
resource-agents-4.8.0+git28.5c54175d.tar.xz
New:
----
resource-agents-4.8.0+git38.c6c53268.tar.xz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ resource-agents.spec ++++++
--- /var/tmp/diff_new_pack.Fel7mS/_old 2021-07-04 22:10:38.777273885 +0200
+++ /var/tmp/diff_new_pack.Fel7mS/_new 2021-07-04 22:10:38.781273854 +0200
@@ -17,7 +17,7 @@
Name: resource-agents
-Version: 4.8.0+git28.5c54175d
+Version: 4.8.0+git38.c6c53268
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.Fel7mS/_old 2021-07-04 22:10:38.829273483 +0200
+++ /var/tmp/diff_new_pack.Fel7mS/_new 2021-07-04 22:10:38.829273483 +0200
@@ -1,6 +1,6 @@
<servicedata>
<service name="tar_scm">
<param name="url">git://github.com/ClusterLabs/resource-agents.git</param>
-<param name="changesrevision">5c54175d39a81344535977a475b015f6ec6b123a</param>
+<param name="changesrevision">c6c5326809fa6e8503c60600ea20194215c0f469</param>
</service>
</servicedata>
\ No newline at end of file
++++++ resource-agents-4.8.0+git28.5c54175d.tar.xz ->
resource-agents-4.8.0+git38.c6c53268.tar.xz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/resource-agents-4.8.0+git28.5c54175d/heartbeat/Dummy
new/resource-agents-4.8.0+git38.c6c53268/heartbeat/Dummy
--- old/resource-agents-4.8.0+git28.5c54175d/heartbeat/Dummy 2021-04-30
16:27:24.000000000 +0200
+++ new/resource-agents-4.8.0+git38.c6c53268/heartbeat/Dummy 2021-06-17
14:00:46.000000000 +0200
@@ -102,7 +102,7 @@
dummy_usage() {
cat <<END
-usage: $0 {start|stop|monitor|migrate_to|migrate_from|validate-all|meta-data}
+usage: $0
{start|stop|monitor|reload|migrate_to|migrate_from|validate-all|meta-data}
Expects to have a fully populated OCF RA-compliant environment set.
END
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/resource-agents-4.8.0+git28.5c54175d/heartbeat/LVM-activate
new/resource-agents-4.8.0+git38.c6c53268/heartbeat/LVM-activate
--- old/resource-agents-4.8.0+git28.5c54175d/heartbeat/LVM-activate
2021-04-30 16:27:24.000000000 +0200
+++ new/resource-agents-4.8.0+git38.c6c53268/heartbeat/LVM-activate
2021-06-17 14:00:46.000000000 +0200
@@ -820,17 +820,14 @@
if systemd_is_running ; then
# Create drop-in to deactivate VG before stopping
# storage services during shutdown/reboot.
- after=$(systemctl show resource-agents-deps.target.d \
- --property=After | cut -d'=' -f2)
+ systemctl show resource-agents-deps.target \
+ --property=After | cut -d'=' -f2 | \
+ grep -qE "(^|\s)blk-availability.service(\s|$)"
- case "$after" in
- *" blk-availability.service "*)
- ;;
- *)
- systemd_drop_in "99-LVM-activate" "After" \
+ if [ "$?" -ne 0 ]; then
+ systemd_drop_in "99-LVM-activate" "After" \
"blk-availability.service"
- ;;
- esac
+ fi
# If blk-availability isn't started, the "After="
# directive has no effect.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/resource-agents-4.8.0+git28.5c54175d/heartbeat/VirtualDomain
new/resource-agents-4.8.0+git38.c6c53268/heartbeat/VirtualDomain
--- old/resource-agents-4.8.0+git28.5c54175d/heartbeat/VirtualDomain
2021-04-30 16:27:24.000000000 +0200
+++ new/resource-agents-4.8.0+git38.c6c53268/heartbeat/VirtualDomain
2021-06-17 14:00:46.000000000 +0200
@@ -25,6 +25,7 @@
OCF_RESKEY_force_stop_default=0
OCF_RESKEY_monitor_scripts_default=""
OCF_RESKEY_autoset_utilization_cpu_default="true"
+OCF_RESKEY_autoset_utilization_host_memory_default="true"
OCF_RESKEY_autoset_utilization_hv_memory_default="true"
OCF_RESKEY_migrateport_default=$(( 49152 + $(ocf_maybe_random) % 64 ))
OCF_RESKEY_CRM_meta_timeout_default=90000
@@ -45,6 +46,7 @@
: ${OCF_RESKEY_force_stop=${OCF_RESKEY_force_stop_default}}
: ${OCF_RESKEY_monitor_scripts=${OCF_RESKEY_monitor_scripts_default}}
:
${OCF_RESKEY_autoset_utilization_cpu=${OCF_RESKEY_autoset_utilization_cpu_default}}
+:
${OCF_RESKEY_autoset_utilization_host_memory=${OCF_RESKEY_autoset_utilization_host_memory_default}}
:
${OCF_RESKEY_autoset_utilization_hv_memory=${OCF_RESKEY_autoset_utilization_hv_memory_default}}
: ${OCF_RESKEY_migrateport=${OCF_RESKEY_migrateport_default}}
: ${OCF_RESKEY_CRM_meta_timeout=${OCF_RESKEY_CRM_meta_timeout_default}}
@@ -226,6 +228,15 @@
<content type="boolean"
default="${OCF_RESKEY_autoset_utilization_cpu_default}" />
</parameter>
+<parameter name="autoset_utilization_host_memory" unique="0" required="0">
+<longdesc lang="en">
+If set true, the agent will detect the number of *Max memory* from virsh, and
put it
+into the host_memory utilization of the resource when the monitor is executed.
+</longdesc>
+<shortdesc lang="en">Enable auto-setting the host_memory utilization of the
resource</shortdesc>
+<content type="boolean"
default="${OCF_RESKEY_autoset_utilization_host_memory_default}" />
+</parameter>
+
<parameter name="autoset_utilization_hv_memory" unique="0" required="0">
<longdesc lang="en">
If set true, the agent will detect the number of *Max memory* from virsh, and
put it
@@ -259,7 +270,7 @@
<parameter name="save_config_on_stop" unique="0" required="0">
<longdesc lang="en">
-Changes to a running VM's config are normally lost on stop.
+Changes to a running VM's config are normally lost on stop.
This parameter instructs the RA to save the configuration back to the xml file
provided in the "config" parameter.
</longdesc>
<shortdesc lang="en">Save running VM's config back to its config
file</shortdesc>
@@ -385,6 +396,10 @@
dom_cpu=$(LANG=C virsh $VIRSH_OPTIONS dominfo ${DOMAIN_NAME}
2>/dev/null | awk '/CPU\(s\)/{print $2}')
test -n "$dom_cpu" && set_util_attr cpu $dom_cpu
fi
+ if ocf_is_true "$OCF_RESKEY_autoset_utilization_host_memory"; then
+ dom_mem=$(LANG=C virsh $VIRSH_OPTIONS dominfo ${DOMAIN_NAME}
2>/dev/null | awk '/Max memory/{printf("%d", $3/1024)}')
+ test -n "$dom_mem" && set_util_attr host_memory "$dom_mem"
+ fi
if ocf_is_true "$OCF_RESKEY_autoset_utilization_hv_memory"; then
dom_mem=$(LANG=C virsh $VIRSH_OPTIONS dominfo ${DOMAIN_NAME}
2>/dev/null | awk '/Max memory/{printf("%d", $3/1024)}')
test -n "$dom_mem" && set_util_attr hv_memory "$dom_mem"
@@ -461,7 +476,7 @@
if [ $? -eq 0 ]; then
rc=$OCF_SUCCESS
fi
- else
+ else
ocf_log $loglevel "Unable to determine emulator
for $DOMAIN_NAME"
fi
;;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/resource-agents-4.8.0+git28.5c54175d/heartbeat/gcp-vpc-move-route.in
new/resource-agents-4.8.0+git38.c6c53268/heartbeat/gcp-vpc-move-route.in
--- old/resource-agents-4.8.0+git28.5c54175d/heartbeat/gcp-vpc-move-route.in
2021-04-30 16:27:24.000000000 +0200
+++ new/resource-agents-4.8.0+git38.c6c53268/heartbeat/gcp-vpc-move-route.in
2021-06-17 14:00:46.000000000 +0200
@@ -47,6 +47,10 @@
try:
import googleapiclient.discovery
import pyroute2
+ try:
+ from google.oauth2.service_account import Credentials as
ServiceAccountCredentials
+ except ImportError:
+ from oauth2client.service_account import ServiceAccountCredentials
except ImportError:
pass
@@ -132,6 +136,12 @@
<content type="string" default="ra-%s" />
</parameter>
+<parameter name="serviceaccount">
+<longdesc lang="en">Path to Service account JSON file</longdesc>
+<shortdesc lang="en">Service account JSONfile</shortdesc>
+<content type="string" default="" />
+</parameter>
+
<parameter name="stackdriver_logging" unique="0" required="0">
<longdesc lang="en">If enabled (set to true), IP failover logs will be posted
to stackdriver logging</longdesc>
<shortdesc lang="en">Stackdriver-logging support</shortdesc>
@@ -212,7 +222,25 @@
sys.exit(OCF_ERR_PERM)
try:
- ctx.conn = googleapiclient.discovery.build('compute', 'v1',
cache_discovery=False)
+ serviceaccount = os.environ.get("OCF_RESKEY_serviceaccount")
+ if not serviceaccount:
+ try:
+ from googleapiclient import _auth
+ credentials = _auth.default_credentials();
+ except:
+ credentials = GoogleCredentials.get_application_default()
+ logging.debug("using application default credentials")
+ else:
+ scope = ['https://www.googleapis.com/auth/cloud-platform']
+ logging.debug("using credentials from service account")
+ try:
+ credentials =
ServiceAccountCredentials.from_service_account_file(filename=serviceaccount,
scopes=scope)
+ except AttributeError:
+ credentials =
ServiceAccountCredentials.from_json_keyfile_name(serviceaccount, scope)
+ except Exception as e:
+ logging.error(str(e))
+ sys.exit(OCF_ERR_GENERIC)
+ ctx.conn = googleapiclient.discovery.build('compute', 'v1',
credentials=credentials, cache_discovery=False)
except Exception as e:
logger.error('Couldn\'t connect with google api: ' + str(e))
sys.exit(OCF_ERR_CONFIGURED)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/resource-agents-4.8.0+git28.5c54175d/heartbeat/gcp-vpc-move-vip.in
new/resource-agents-4.8.0+git38.c6c53268/heartbeat/gcp-vpc-move-vip.in
--- old/resource-agents-4.8.0+git28.5c54175d/heartbeat/gcp-vpc-move-vip.in
2021-04-30 16:27:24.000000000 +0200
+++ new/resource-agents-4.8.0+git38.c6c53268/heartbeat/gcp-vpc-move-vip.in
2021-06-17 14:00:46.000000000 +0200
@@ -30,6 +30,10 @@
try:
import googleapiclient.discovery
+ try:
+ from google.oauth2.service_account import Credentials as
ServiceAccountCredentials
+ except ImportError:
+ from oauth2client.service_account import ServiceAccountCredentials
except ImportError:
pass
@@ -87,6 +91,11 @@
<shortdesc lang="en">Project ID</shortdesc>
<content type="string" default="default" />
</parameter>
+ <parameter name="serviceaccount">
+ <longdesc lang="en">Path to Service account JSON file</longdesc>
+ <shortdesc lang="en">Service account JSONfile</shortdesc>
+ <content type="string" default="" />
+ </parameter>
<parameter name="stackdriver_logging" unique="0" required="0">
<longdesc lang="en">If enabled (set to true), IP failover logs will be
posted to stackdriver logging</longdesc>
<shortdesc lang="en">Stackdriver-logging support</shortdesc>
@@ -136,7 +145,26 @@
def create_api_connection():
for i in range(MAX_RETRIES):
try:
+ serviceaccount = os.environ.get("OCF_RESKEY_serviceaccount")
+ if not serviceaccount:
+ try:
+ from googleapiclient import _auth
+ credentials = _auth.default_credentials();
+ except:
+ credentials = GoogleCredentials.get_application_default()
+ logging.debug("using application default credentials")
+ else:
+ scope = ['https://www.googleapis.com/auth/cloud-platform']
+ logging.debug("using credentials from service account")
+ try:
+ credentials =
ServiceAccountCredentials.from_service_account_file(filename=serviceaccount,
scopes=scope)
+ except AttributeError:
+ credentials =
ServiceAccountCredentials.from_json_keyfile_name(serviceaccount, scope)
+ except Exception as e:
+ logging.error(str(e))
+ sys.exit(OCF_ERR_GENERIC)
return googleapiclient.discovery.build('compute', 'v1',
+ credentials=credentials,
cache_discovery=False)
except Exception as e:
logger.error('Couldn\'t connect with google api: ' + str(e))
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/resource-agents-4.8.0+git28.5c54175d/heartbeat/podman
new/resource-agents-4.8.0+git38.c6c53268/heartbeat/podman
--- old/resource-agents-4.8.0+git28.5c54175d/heartbeat/podman 2021-04-30
16:27:24.000000000 +0200
+++ new/resource-agents-4.8.0+git38.c6c53268/heartbeat/podman 2021-06-17
14:00:46.000000000 +0200
@@ -358,8 +358,18 @@
local rc
ocf_log info "running container $CONTAINER for the first time"
- ocf_run podman run $opts $image $cmd
+ out=$(podman run $opts $image $cmd 2>&1)
rc=$?
+
+ if [ -n "$out" ]; then
+ out="$(echo "$out" | tr -s ' \t\r\n' ' ')"
+ if [ $rc -eq 0 ]; then
+ ocf_log info "$out"
+ else
+ ocf_log err "$out"
+ fi
+ fi
+
if [ $rc -eq 125 ]; then
# If an internal podman error occurred, it might be because
# the internal storage layer still references an old container
@@ -370,6 +380,24 @@
ocf_run podman rm --storage $CONTAINER
ocf_run podman run $opts $image $cmd
rc=$?
+ elif [ $rc -eq 127 ]; then
+ # rhbz#1972209: podman 3.0.x seems to be hit by a race
+ # where the cgroup is not yet set up properly when the OCI
+ # runtime configures the container. If that happens, recreate
+ # the container as long as we get the same error code or
+ # until start timeout preempts us.
+ while [ $rc -eq 127 ] && (echo "$out" | grep -q "cgroup.*scope
not found") ; do
+ ocf_log warn "Internal podman error while assigning
cgroup. Retrying."
+ # Arbitrary sleep to prevent consuming all CPU while
looping
+ sleep 1
+ podman rm -f "$CONTAINER"
+ out=$(podman run $opts $image $cmd 2>&1)
+ rc=$?
+ done
+ # Log the created container ID if it succeeded
+ if [ $rc -eq 0 ]; then
+ ocf_log info "$out"
+ fi
fi
return $rc
@@ -422,7 +450,7 @@
fi
if [ $rc -ne 0 ]; then
- ocf_exit_reason "podman failed to launch container"
+ ocf_exit_reason "podman failed to launch container (rc: $rc)"
return $OCF_ERR_GENERIC
fi
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/resource-agents-4.8.0+git28.5c54175d/tools/ocft/VirtualDomain
new/resource-agents-4.8.0+git38.c6c53268/tools/ocft/VirtualDomain
--- old/resource-agents-4.8.0+git28.5c54175d/tools/ocft/VirtualDomain
2021-04-30 16:27:24.000000000 +0200
+++ new/resource-agents-4.8.0+git38.c6c53268/tools/ocft/VirtualDomain
2021-06-17 14:00:46.000000000 +0200
@@ -1,5 +1,5 @@
# VirtualDomain
-# by [email protected] on
+# by [email protected] on
# Tue Jul 8 12:48:03 CEST 2014
CONFIG
@@ -16,6 +16,7 @@
Env OCF_RESKEY_config=$OCFT_config
CASE-BLOCK unset_utilization
+ Env OCF_RESKEY_autoset_utilization_host_memory=false
Env OCF_RESKEY_autoset_utilization_hv_memory=false
Env OCF_RESKEY_autoset_utilization_cpu=false