Skip to content

Noteworthy code changes

Kevin Van Hijfte edited this page Dec 21, 2016 · 9 revisions

Below a list of noteworthy code changes that may or may not be interesting. They are written to be of use for QA to speed up adapting their tests to the latest codebase. However, as code frequently changes, every change noted below may or may not be relevant (anymore).


Changes as of 2016-12-21

When deploying a Backend, the default status will now be 'INSTALLING' i/o 'NEW' The following statuses are no longer known/valid:

  • UNKNOWN
  • STOPPED
  • NEW

The following statuses are now possible:

  • FAILURE
  • WARNING
  • RUNNING
  • INSTALLING

Also worth mentioning: The 'INSTALLING' color is now blue in the GUI i/o orange (identical to the vPools) and when claiming ASDs of multiple ALBA nodes, the color will change to orange (max delay of 30sec). To see the green 'running' circle again for the ALBA Backend run below code (or wait 1h):

from ovs.lib.alba import AlbaController
AlbaController.checkup_maintenance_agents()

Changes as of 2016-12-19

Multiple AlbaProxies per StorageDriver. By default 8, but can be changed by a new optional parameter parallelism in the add_vpool call. The new parameter is "next to" e.g. backend_info and vpool_name.

Changes as of 2016-12-15

https://github.com/openvstorage/framework/pull/1273

from ovs.lib.setup import SetupController

will no longer work

Now you can use:

from ovs.lib.nodetype import NodeTypeController 
from ovs.lib.noderemoval import NodeRemovalController 
from ovs.lib.nodeinstallation import NodeInstallationController 

NodeTypeController is responsible for promoting / demoting
NodeRemovalController is responsible for removing nodes
NodeInstallationController is responsible for installation of nodes

Changes as of 2016-12-09

Version runfiles have been introduced for ASDs (/opt/asd-manager/run/alba-asd-.version Maintenance (/opt/asd-manager/run/alba-maintenance_<backend_name>-.version Volumedriver (/opt/OpenvStorage/run/volumedriver_<vpool_name>.version DTL (/opt/OpenvStorage/run/dtl_<vpool_name>.version

Changing the version numbers in any of these files should result in an available update on the node hosting the file (When clicking 'Refresh' in the Updates page in the GUI)

Also updating the related package of the service, should result in the latest version being displayed in the run file eg: updating volumedriver-no-dedup-server should result in both the volumedriver and dtl runfiles to contain the installed version of the package (volumedriver_fs --version)

Changes as of 2016-12-08

We now store the service metadata in the config management (arakoon or etcd) Example of service metadata: {"SERVICE_NAME": "workers", "WORKER_QUEUE": "udTr7ovI7HLKbNXE,ovs_masters", "STARTUP_DEPENDENCY": ""}

We will use this metadata in the config management for later use in the update when certain service files need to be regenerated (but we don't use it yet)

A suggestion for a new test could be to verify that all services displayed by 'ovs monitor services' are listed in /ovs/framework/hosts/<host_id>/services (This should be on all nodes)

Similarly for the ASD services. Services displayed by 'asd-manager monitor services' should also be in /ovs/alba/asdnodes/<node_id>/services

The content of the service metadata should at least contain the same keys in the service templates. Eg: ovs-workers.service template contains <WORKER_QUEUE> and thus the entry in the config management should also contain this in order to regenerate this file properly

Now for the changes that might have impact for QA:

  • alba-asdmanager repo

source.asdmanager.BOOTSTRAP_FILE --> source.tools.toolbox.Toolbox.BOOTSTRAP_FILE ServiceManager.add_service has new param: delay_registration ServiceManager.remove_service has new param: delay_unregistration

  • framework-alba-plugin repo

AlbaController.get_abm_service_name now expects AlbaBackend i/o Backend AlbaController.get_nsm_service_name now expects AlbaBackend i/o Backend + the number of the NSM service

  • openvstorage repo

ArakoonInstaller.restart_cluster_remove has been removed and is now part of the shrink_cluster command ArakoonInstaller.shrink_cluster param remaining_node_ip renamed to remaining_node_ips and is now a list i/o a string

Thats it.

PS: Externally managed clusters should definitely be tested for several reasons. 1 of those reasons is the fact that when the external cluster for eg: ovsdb arakoon is called 'foo', we now call the service in our model: arakoon-foo, while this used to be hard-coded 'arakoon-ovsdb'

Changes as of 2016-12-05

ovs/lib/albacontroller.py --> ovs/lib/alba.py ovs/lib/albanodecontroller.py --> ovs/lib/albanode.py ovs/lib/scheduledtask.py --> ovs/lib/generic ovs/lib/albascheduledtask --> removed (verify_namespace moved to alba.py)

ALBA OSD object has a new Relation with Domain object (non-mandatory and currently only used in case the OSD is of type BACKEND)

Changes as of 2016-11-29

To be able to use this new update functionality, please update to the latest update code, so you can update making use of the latest and greatest update code ;)

Important changes mostly for QA: First of all: No more inconsistencies in naming between update or upgrade Everything is now 'update', eg: the file /etc/ready_for_upgrade is now /etc/ready_for_update

Other changes: ASDManagerClient.list_asd_services() is new ASDManagerClient.get_update_information() renamed to get_package_information and returns different format ASDManagerClient.restart_services() now restarts ASDservices + maintenance services ASDManagerClient.execute_update no longer returns a status ASDManagerClient now raises a NotFoundError when a 404 is returned

PackageManager.get_installed_candidate_version replaced by PackageManager.get_installed_versions and PackageManager.get_candidate_versions PackageManager.verify_update_required has been deleted

AlbaNode has now a property package_information StorageRouter has now a property package_information These properties get refreshed every hour and contain the installed and candidate version of all packages related to those components IF installed != candidate ScheduledTaskController.refresh_package_information()

All update logic now together in 1 file

  • For framework /opt/OpenvStorage/ovs/lib/update.py
  • For alba-plugin /opt/OpenvStorage/ovs/lib/albaupdate.py
  • For asdmanager /opt/asd-manager/source/controllers/update.py

ArakoonInstaller.deploy_cluster has been removed StorageRouterController.get_update_status has been removed StorageRouterController.update_framework has been removed StorageRouterController.update_volumedriver has been removed UpdateController.update_all has been introduced

Commandline: ovs update framework no longer possible ovs update volumedriver no longer possible ovs update framework,storagedriver,alba is now available (or any subset of these components)

Clone this wiki locally