Skip to content

2.0.0

Latest

Choose a tag to compare

@MMetelko MMetelko released this 12 Aug 15:42
· 1 commit to master since this release
7d749d3

UBUNTU 22.04 & DEBIAN 12 SYSTEMS UPDATE ONLY

No further updates will be made to Ubuntu 20.04 packages

New Features

  • System platform updates
    • Capnproto library from_bytes must be wrapped in a context manager (with <function> as <var>:) due to an API change with version update
      • This is a breaking change for applications that use Capnp Proto messaging, see note below on how to adjust your code
    • Move python version to 3.10
      • Set apparmor python version using script and systemd service based on system python version
    • Netifaces library version update
  • Changes for Debian Bookworm systems
    • Added --break-system-packages to pip installs
    • Added softlink to /dev/root for quota service

Improvements

  • Update tmux api calls due to library version update
  • riaps_fab redesigned to use Fabric2.X and break into CLI-based and API
    • Improve command helpstrings and error messages
    • Output execution information only on error (except for sys.arch)
      • Note: you can use -v to get verbose feedback on any command
    • Reference RIAPSHOME for loading hosts
    • Provide role hints on invalid role
    • CLI hostlists now usurp role checks
    • sys.get -n flag renames local file, prints results nicely
    • sys.put checks for file before sending
    • sys.put/sys.get outputs are more readable
    • Simplify riaps.reset
    • Add flag to pass hostfile path
    • ctrlgui: Update fabric usage to rfab
    • deplo.status exit-code acceptance
      • systemctl-status will exit 3 if a service is inactive, but rfab treats non-zero exits as "Failed". Adding this test accepts exit (3) as a success
    • Adding Task class
    • Add logging files
    • Change riaps_deplo launch backgrounding to disowning
    • Consolidate result types to enable more hints
    • RFabGroupResult class always hints for socket.gaierror

Fixes

  • Remove StandardOutput=syslog from riaps-deplo.service
  • Localhost not first interface, leading to invalid connection on locals
  • Opendht crash on 600 sec t/o due to not cleaning listener
  • Change needed to Jenkins deployment due to function deprecation
  • Workaround to spdlog problem -- spdlog (python) must be imported first to avoid signal handler issues
  • Set RIAPS* envvars for SSH sessions in /etc/environment using Debian preinst for remote nodes
    • Commands executed over SSH such as ssh <host> <cmd> or those via Fabric occur in non-login non-interactive shells, which don't hit any of our .bash* or .profile* config files. This config sets RIAPSHOME and RIAPSAPPS for SSH sessions matching the riaps user.
  • Remove setuptools_scm from the pip install requirements
    • This caused an error related to git meta data, but did not affect the installation of the package.
  • Found extra removal of conf files for riaps-pycom
  • Better formatting for log message
  • Prohibit MulticastDNS for systemd-resolved
    • We use Avahi for .local domain resolution, but the default systemd-resolved configuration also runs mDNS, which conflicts. This file and option disables mDNS.
  • Fixes to 100% utilization in deplo (due to zmqdevice\)
  • Better logging for dc
  • DC w/ redis works for rapid group membership changes
  • Added deplo/relay code
  • Fixes for rapid group membership changes
    • Note: opendht's cancelListen does not work (from Python)

Capnproto library “from_bytes” API change Notes:

Updates to pycapnp library now requires from_bytes() functions to be wrapped in a context manager. Below is an example of changes needed to applications using this function. This example is from the app.IMCP code from SYSTEM_OPERATOR_MQTT.py (line 55):

v1.1.23 code:

def on_state_sub(self):
    msg_bytes = self.state_sub.recv()
    msg = imcp_capnp.StateMsg.from_bytes(msg_bytes)
    if debugMode:
        self.logger.info(f"{helper.Yellow}"
                        f"Operator\n"
                        f"on_state_sub:{msg.sender} \n"
                        f"recv state sub msgcounter: {msg.msgcounter} \n"
                        f"state: {msg.currentState} \n"
                        f" breaker: {msg.breaker} and action: {msg.action} \n"
                        f" group: {msg.group}  and reconfigcontrol {msg.reconfigcontrol}\n"
                        f"{helper.RESET}")

    self.node_states[msg.sender] = msg.currentState

Modification for v2.0.0:

def on_state_sub(self):
    msg_bytes = self.state_sub.recv()
    with imcp_capnp.StateMsg.from_bytes(msg_bytes) as msg:
        if debugMode:
            self.logger.info(f"{helper.Yellow}"
                             f"Operator\n"
                             f"on_state_sub:{msg.sender} \n"
                             f"recv state sub msgcounter: {msg.msgcounter} \n"
                             f"state: {msg.currentState} \n"
                             f" breaker: {msg.breaker} and action: {msg.action} \n"
                             f" group: {msg.group}  and reconfigcontrol {msg.reconfigcontrol}\n"
                             f"{helper.RESET}")

        self.node_states[msg.sender] = msg.currentState

Apps, interfaces and example code with capnproto from_bytes call:

  • Currently used application:
    • app.IMCP
  • Older code base that might be reused:
    • app.MgManage
    • app.MgManage_SingleMg
    • app.OpalRT-Microgrid-Monitor-Demo
    • app.RensycnFullFeeder1Banshee
    • interface.PyDSS
    • interface.gridlabd
    • BansheeFSM
    • example.varcontrol