1.2.11 - the luminosity branch

v1.2.11 - January 17, 2019

Bug fixes release

  • Bug fixes are described below.

Changes from v1.2.10

  • Fix webapp time out - Graphs in search_features_profiles. Added a lightweight ionosphere_show_graphs function to ionosphere_backend to and changed from using ionosphere_metric_data to using this lightweight function which does not process matched graphs, only the images required by the show graaphs context. This stops webapp time outs (2746, 2602). In skyline/webapp/ionosphere_backend.py and skyline/webapp/webapp.py

  • skyline/webapp/webapp.py - Fix webapp 500 error on no metric. Set metric_found_in_other_redis before the OTHER_SKYLINE_REDIS_INSTANCES conditional check otherwise webapp return a 500 server error instead of a 404 if the metric does not exist (2792)

  • skyline/mirage/mirage_alerters.py - Removed superfluous spaces in slack alert string concatenations (2618)

  • Updated boundary.py with analyse_derivatives (2034, 2742)

  • Updated boundary_alerters.py with analyse_derivatives (2034, 2742), alert_slack (2618) and incorrect scale in some graphs (2498)

  • Updated settings with BOUNDARY_SLACK_OPTS for alert_slack (2742, 2618)

  • Updated utils/verify_alerts.py for Boundary and alert_slack (2742, 2618)

  • skyline/skyline_functions.py - Remove the metric from thenon_derivative_metrics Redis set. This set is normally managed by Analyzer and although the metric is added to the derivative_metrics set above, it only gets removed from the non_derivative_metrics set after the Analyzer Redis key analyzer.derivative_metrics_expiry expires, which can be up to 300 seconds when the derivative_metrics and non_derivative_metrics Redis sets are recreated (2796, 2488)

  • Updated skyline/analyzer/alerters.py with the initial basic description of the new slack thread messages functionally is terms of the webapp code changes and the changes required to the DB and Panorama/Redis to achieve the desired goal this is still TODO in terms of Panorama workload and DB changes. (2646)

  • Wrapped the determination of the slack_thread_ts in try except (2646)

  • Fix Cross-Site Scripting Security Vulnerability #85 - import flask.escape as flask_escape and wrap resp in webapp.py to fix #85 and added additional request argument validation (2816) in skyline/webapp/webapp.py

  • Validate request arguments that are used in SQL in skyline/webapp/ionosphere_backend.py to fix #86 (2818)

  • Updated version to v1.2.11 and general docs updates (2748)

  • Updated readme.md to be consistent with the documentation in terms of the available metrics sources (2748)

Update notes

  • You can only upgrade to v1.2.11 from v1.2.10-stable-luminosity

  • There is no change to the DB

  • There are some changes to settings.py related to Boundary slack alerting

How to update from v1.2.10

  • Download the new release tag or clone/update to get it to a temp location, ready to be deployed.

  • Diff your current running version skyline/settings.py with the new version of skyline/settings.py and create a new settings.py in the temp location appropriate for Skyline v1.2.11 and your set up, ready to be deployed.

  • Stop all the Skyline services and ensure any service controls such as monit, supervisor or systemd do not start them again, (change as appropriate for your set up) e.g.

NEW_SKYLINE_VERSION="v1.2.11"    # Your new Skyline version
OLD_SKYLINE_VERSION="v1.2.10-stable-luminosity"    # Your old Skyline version

CURRENT_SKYLINE_PATH="/opt/skyline/github/skyline"                 # Your Skyline path
NEW_SKYLINE_PATH="${CURRENT_SKYLINE_PATH}.${NEW_SKYLINE_VERSION}"  # Your new Skyline path

mkdir -p "${CURRENT_SKYLINE_PATH}.${NEW_SKYLINE_VERSION}"
cd "${CURRENT_SKYLINE_PATH}.${NEW_SKYLINE_VERSION}"
git clone https://github.com/earthgecko/skyline .
git checkout "$NEW_SKYLINE_VERSION"

# Stop all other Skyline services
SKYLINE_SERVICES="horizon
analyzer
mirage
crucible
boundary
ionosphere
luminosity
panorama
webapp"
for i in $SKYLINE_SERVICES
do
  /etc/init.d/$i stop
done
  • Move your current Skyline directory to a backup directory and move the new Skyline v1.2.11 with your new settings.py from the temp location to your working Skyline directory, (change your paths as appropriate) e.g.

mv /opt/skyline/github/skyline /opt/skyline/github/skyline.v1.2.10-luminosity-stable
mv "$NEW_SKYLINE_PATH" "$CURRENT_SKYLINE_PATH"
  • Start the all Skyline services (change as appropriate for your set up) e.g.

# Start all other Skyline services
SKYLINE_SERVICES="panorama
luminosity
horizon
analyzer
mirage
crucible
boundary
ionosphere
webapp"
for i in $SKYLINE_SERVICES
do
  /etc/init.d/$i start
done
  • Check the logs

# How are they running
tail -n 20 /var/log/skyline/*.log

# Any errors - each app
find /var/log/skyline -type f -name "*.log" | while read skyline_logfile
do
  echo "#####
# Checking for errors in $skyline_logfile"
  cat "$skyline_logfile" | grep -B2 -A10 -i "error ::\|traceback" | tail -n 60
  echo ""
  echo ""
done