Skip to content

Commit b0cc13b

Browse files
Merge pull request #145 from tofu-rocketry/release-3.1.1
Release 3.1.1 to master
2 parents 1b44c22 + aa18a87 commit b0cc13b

7 files changed

+48
-34
lines changed

CHANGELOG

+3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
Changelog for ssm
22
=================
3+
* Wed Dec 16 2020 Adrian Coveney <[email protected]> - 3.1.1-1
4+
- Changed logging to reduce how verbose the logging of a 3rd-party module is.
5+
36
* Tue Dec 01 2020 Adrian Coveney <[email protected]> - 3.1.0-1
47
- Enabled retries for all AMS communication methods to avoid timeouts from
58
crashing SSM.

apel-ssm.spec

+4-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
%endif
55

66
Name: apel-ssm
7-
Version: 3.1.0
7+
Version: 3.1.1
88
%define releasenumber 1
99
Release: %{releasenumber}%{?dist}
1010
Summary: Secure stomp messenger
@@ -100,6 +100,9 @@ rm -rf $RPM_BUILD_ROOT
100100
%doc %_defaultdocdir/%{name}
101101

102102
%changelog
103+
* Wed Dec 16 2020 Adrian Coveney <[email protected]> - 3.1.1-1
104+
- Changed logging to reduce how verbose the logging of a 3rd-party module is.
105+
103106
* Tue Dec 01 2020 Adrian Coveney <[email protected]> - 3.1.0-1
104107
- Enabled retries for all AMS communication methods to avoid timeouts from
105108
crashing SSM.

migrating_to_ams.md

+20-18
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,30 @@
11
# Migrating from using EGI ActiveMQ Message Brokers to using EGI ARGO Messaging Service
22

3-
Migration requires upgrading SSM to at least version 2.4.0 and adding new values to your configuration.
3+
Migration requires upgrading APEL SSM to at least version 2.4.0, installing the ARGO AMS Library, and adding new values to your configuration.
4+
5+
The ARGO AMS Library is available in UMD as `python-argo-ams-library`. Versions above 0.5.0 are recommended.
46

57
## Sender
68

79
The sender configuration is usually found under `/etc/apel/sender.cfg`. Follow the steps below to migrate.
810

911
1. Comment out `bdii` and `network`.
10-
1. Uncomment `host` and set it to `msg-devel.argo.grnet.gr`.
12+
1. Uncomment `host` and set it to `msg.argo.grnet.gr`.
1113
1. Add the following as a new section at the top of your configuration:
12-
```
13-
[sender]
14-
# Either 'STOMP' for STOMP message brokers or 'AMS' for Argo Messaging Service
15-
protocol: AMS
16-
```
14+
```
15+
[sender]
16+
# Either 'STOMP' for STOMP message brokers or 'AMS' for Argo Messaging Service
17+
protocol: AMS
18+
```
1719
1. Add the following to the `[messaging]` section of your configuration:
18-
```
19-
# If using AMS this is the project that SSM will connect to. Ignored for STOMP.
20-
ams_project: accounting
21-
```
20+
```
21+
# If using AMS this is the project that SSM will connect to. Ignored for STOMP.
22+
ams_project: accounting
23+
```
2224
1. To send to the central APEL Accounting server, change `destination` to one of the following depending on your type of accounting:
23-
* `gLite-APEL` for Grid Accounting
24-
* `eu.egi.cloud.accounting` for Cloud Accounting
25-
* `eu.egi.storage.accounting` for Storage Accounting
25+
* `gLite-APEL` for Grid Accounting
26+
* `eu.egi.cloud.accounting` for Cloud Accounting
27+
* `eu.egi.storage.accounting` for Storage Accounting
2628

2729
The next time `ssmsend` runs it should be using the AMS. You can check this by looking in the logs for a successful run, which should look like this:
2830

@@ -42,9 +44,9 @@ The next time `ssmsend` runs it should be using the AMS. You can check this by l
4244

4345
## Receiver
4446

45-
1. Follow the steps 1 to 4 as per the [Sender documentation](#Sender) but editing your receiver configuration instead, usually found under `/etc/apel/receiver.cfg`, naming the sction `[receiver]` rather than `[sender]`.
47+
1. Follow the steps 1 to 4 as per the [Sender documentation](#Sender) but editing your receiver configuration instead, usually found under `/etc/apel/receiver.cfg`, naming the section `[receiver]` rather than `[sender]`.
4648
1. Change `destination` to be the subscription you are using to pull messages down.
4749
1. Add your token to the `[messaging]` section of your configuration:
48-
```
49-
token: your_token_here
50-
```
50+
```
51+
token: your_token_here
52+
```

scripts/ssm-build-deb.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616

1717
set -eu
1818

19-
TAG=3.1.0-1
19+
TAG=3.1.1-1
2020

2121
SOURCE_DIR=~/debbuild/source
2222
BUILD_DIR=~/debbuild/build

scripts/ssm-build-rpm.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
rpmdev-setuptree
1111

1212
RPMDIR=/home/rpmb/rpmbuild
13-
VERSION=3.1.0-1
13+
VERSION=3.1.1-1
1414
SSMDIR=apel-ssm-$VERSION
1515

1616
# Remove old sources and RPMS

ssm/__init__.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
import logging
2020
import sys
2121

22-
__version__ = (3, 1, 0)
22+
__version__ = (3, 1, 1)
2323

2424
LOG_BREAK = '========================================'
2525

ssm/ssm2.py

+18-12
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
import os
3333
import socket
3434
import time
35-
import logging
35+
from logging import getLogger, INFO, WARNING, DEBUG
3636

3737
try:
3838
from argo_ams_library import ArgoMessagingService, AmsMessage
@@ -42,7 +42,7 @@
4242
AmsMessage = None
4343

4444
# Set up logging
45-
log = logging.getLogger(__name__)
45+
log = getLogger(__name__)
4646

4747

4848
class Ssm2Exception(Exception):
@@ -168,18 +168,24 @@ def __init__(self, hosts_and_ports, qpath, cert, key, dest=None, listen=None,
168168
raise Ssm2Exception('Failed to verify server certificate %s against CA path %s.'
169169
% (self._enc_cert, self._capath))
170170

171-
# If the overall SSM log level is info, we want to only
171+
self._set_external_logging_levels()
172+
173+
def _set_external_logging_levels(self):
174+
"""Tweak the logging of dependencies to better match SSM verbosity."""
175+
# If the overall SSM log level is INFO, we want to only
172176
# see entries from stomp.py and connectionpool at WARNING and above.
173-
if logging.getLogger("ssm.ssm2").getEffectiveLevel() == logging.INFO:
174-
logging.getLogger("stomp.py").setLevel(logging.WARNING)
175-
logging.getLogger("requests.packages.urllib3.connectionpool"
176-
).setLevel(logging.WARNING)
177-
# If the overall SSM log level is debug, we want to only
177+
if getLogger("ssm.ssm2").getEffectiveLevel() == INFO:
178+
getLogger("stomp.py").setLevel(WARNING)
179+
getLogger("requests.packages.urllib3.connectionpool"
180+
).setLevel(WARNING)
181+
getLogger("urllib3.connectionpool").setLevel(WARNING)
182+
# If the overall SSM log level is DEBUG, we want to only
178183
# see entries from stomp.py and connectionpool at INFO above.
179-
elif logging.getLogger("ssm.ssm2").getEffectiveLevel() == logging.DEBUG:
180-
logging.getLogger("stomp.py").setLevel(logging.INFO)
181-
logging.getLogger("requests.packages.urllib3.connectionpool"
182-
).setLevel(logging.INFO)
184+
elif getLogger("ssm.ssm2").getEffectiveLevel() == DEBUG:
185+
getLogger("stomp.py").setLevel(INFO)
186+
getLogger("requests.packages.urllib3.connectionpool"
187+
).setLevel(INFO)
188+
getLogger("urllib3.connectionpool").setLevel(INFO)
183189

184190
def set_dns(self, dn_list):
185191
"""Set the list of DNs which are allowed to sign incoming messages."""

0 commit comments

Comments
 (0)