Bug 1803104 - Capture total CAM app workload migrations by migration state
Summary: Capture total CAM app workload migrations by migration state
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Migration Tooling
Version: 4.4
Hardware: Unspecified
OS: Unspecified
unspecified
low
Target Milestone: ---
: 4.4.0
Assignee: Derek Whatley
QA Contact: Xin jiang
URL:
Whiteboard:
Depends On:
Blocks: 1803106
TreeView+ depends on / blocked
 
Reported: 2020-02-14 13:56 UTC by Sergiusz Urbaniak
Modified: 2020-05-28 11:10 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-05-28 11:09:55 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github openshift telemeter pull 298 0 None closed Bug 1803104: Capture total CAM app workload migrations by migration state. 2020-07-27 19:14:16 UTC
Red Hat Product Errata RHEA-2020:2326 0 None None None 2020-05-28 11:10:37 UTC

Description Sergiusz Urbaniak 2020-02-14 13:56:52 UTC
Add metric gathering for cam_app_workload_migration_total.

Comment 1 Sergiusz Urbaniak 2020-02-14 13:58:17 UTC
- Metric was originally added to mig-controller in fusor/mig-controller#379, got feedback from Clayton
- Metric name was adjusted after consulting with @lilic and @smarterclayton in fusor/mig-controller#385
- Metric was added to mig-operator in fusor/mig-operator#193
- Metric is intended to help us understand at a high level how customers are using app workload migration tooling (CAM) to move apps and PV data between OpenShift clusters, especially when moving from OpenShift 3->4.

Comment 2 whu 2020-04-01 07:41:34 UTC
Have finished the test of this feature against ocp4.4 + CAM 1.1.2 stage. It seems the feature has worked. 

Below are the key test steps:

$oc edit ns  openshift-migration
apiVersion: v1                                                                     
kind: Namespace                                                                    
metadata:                                                                          
  annotations:                                                                     
    openshift.io/node-selector: ""                                                 
  labels:                                                                          
    control-plane: controller-manager                                              
    controller-tools.k8s.io: "1.0"                                                 
    openshift.io/cluster-monitoring: "true"         // add this line                                 
  name: "openshift-migration"

$ oc exec -it migration-controller-6d59b8c4c6-bqmqm  /bin/bash
Defaulting container name to cam.
Use 'oc describe pod/migration-controller-6d59b8c4c6-bqmqm -n openshift-migration' to see all of the containers in this pod.

bash-4.4$ curl  http://mig-controller-metrics.openshift-migration.svc.cluster.local:2112/metrics
# HELP cam_app_workload_migrations Count of MigMigrations sorted by status and type
# TYPE cam_app_workload_migrations gauge
cam_app_workload_migrations{status="completed",type="final"} 1
cam_app_workload_migrations{status="completed",type="stage"} 0
cam_app_workload_migrations{status="failed",type="final"} 0
cam_app_workload_migrations{status="failed",type="stage"} 0
cam_app_workload_migrations{status="idle",type="final"} 0
cam_app_workload_migrations{status="idle",type="stage"} 0
cam_app_workload_migrations{status="running",type="final"} 0
cam_app_workload_migrations{status="running",type="stage"} 0

open "monitoring/metrics" page in OCP UI,  query the metric "cam_app_workload_migrations" from the prometheus UI inside of OpenShift, can get the migration information from UI.

Comment 5 errata-xmlrpc 2020-05-28 11:09:55 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHEA-2020:2326


Note You need to log in before you can comment on or make changes to this bug.