Introduce bay monitor for k8s bay type

Bug #1500299 reported by hongbin
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Magnum
Fix Released
Medium
bharaththiruveedula

Bug Description

See @Vilobh's inline comment:

https://review.openstack.org/#/c/215335/10/magnum/conductor/monitors.py

This bug trace the status of adding support for k8s monitor

Changed in magnum:
assignee: nobody → bharaththiruveedula (bharath-ves)
hongbin (hongbin034)
summary: - Introduce bay monitor for swarm bay type
+ Introduce bay monitor for k8s bay type
Changed in magnum:
importance: Undecided → Medium
Revision history for this message
hongbin (hongbin034) wrote :

To get memory size of each node:

$ kubectl get nodes -o=json
{
    "kind": "List",
    "apiVersion": "v1",
    "metadata": {},
    "items": [
        {
            "kind": "Node",
            "apiVersion": "v1",
            "metadata": {
                "name": "k8-wflf273dao-0-e2bz4sipy5lu-kube-minion-twnj5q7ycaon",
                "selfLink": "/api/v1/nodes/k8-wflf273dao-0-e2bz4sipy5lu-kube-minion-twnj5q7ycaon",
                "uid": "c5dc7b78-714c-11e5-a568-fa163ef21536",
                "resourceVersion": "48",
                "creationTimestamp": "2015-10-13T01:50:25Z",
                "labels": {
                    "kubernetes.io/hostname": "k8-wflf273dao-0-e2bz4sipy5lu-kube-minion-twnj5q7ycaon"
                }
            },
            "spec": {
                "externalID": "k8-wflf273dao-0-e2bz4sipy5lu-kube-minion-twnj5q7ycaon"
            },
            "status": {
                "capacity": {
                    "cpu": "1",
                    "memory": "2049852Ki",
                    "pods": "40"
                },
                "conditions": [
                    {
                        "type": "Ready",
                        "status": "True",
                        "lastHeartbeatTime": "2015-10-13T01:55:35Z",
                        "lastTransitionTime": "2015-10-13T01:50:25Z",
                        "reason": "kubelet is posting ready status"
                    }
                ],
                "addresses": [
                    {
                        "type": "LegacyHostIP",
                        "address": "fe80::f816:3eff:fef0:ffe1"
                    }
                ],
                "nodeInfo": {
                    "machineID": "45bb3b96146aa94f299b9eb43646eb35",
                    "systemUUID": "37DA0FEA-4309-4C20-A8E5-1AB31CFDE95E",
                    "bootID": "1481d9cc-fd33-4d4c-bb0d-13def0bc8b94",
                    "kernelVersion": "3.17.4-301.fc21.x86_64",
                    "osImage": "Fedora 21 (Twenty One)",
                    "containerRuntimeVersion": "docker://1.7.1.fc21",
                    "kubeletVersion": "v1.0.4",
                    "kubeProxyVersion": "v1.0.4"
                }
            }
        }
    ]
}

Revision history for this message
hongbin (hongbin034) wrote :

To get memory size of pod:

$ kubectl get pods -o=json
{
    "kind": "List",
    "apiVersion": "v1",
    "metadata": {},
    "items": [
        {
            "kind": "Pod",
            "apiVersion": "v1",
            "metadata": {
                "name": "frontend",
                "namespace": "default",
                "selfLink": "/api/v1/namespaces/default/pods/frontend",
                "uid": "d38b97a3-714e-11e5-a568-fa163ef21536",
                "resourceVersion": "130",
                "creationTimestamp": "2015-10-13T02:05:07Z"
            },
            "spec": {
                "containers": [
                    {
                        "name": "db",
                        "image": "mysql",
                        "resources": {
                            "limits": {
                                "cpu": "500m",
                                "memory": "128Mi"
                            },
                            "requests": {
                                "cpu": "250m",
                                "memory": "64Mi"
                            }
                        },
                        "terminationMessagePath": "/dev/termination-log",
                        "imagePullPolicy": "IfNotPresent"
                    },
                    {
                        "name": "wp",
                        "image": "wordpress",
                        "resources": {
                            "limits": {
                                "cpu": "500m",
                                "memory": "128Mi"
                            },
                            "requests": {
                                "cpu": "250m",
                                "memory": "64Mi"
                            }
                        },
                        "terminationMessagePath": "/dev/termination-log",
                        "imagePullPolicy": "IfNotPresent"
                    }
                ],
                "restartPolicy": "Always",
                "dnsPolicy": "ClusterFirst",
                "nodeName": "k8-wflf273dao-0-e2bz4sipy5lu-kube-minion-twnj5q7ycaon"
            },
            "status": {
                "phase": "Pending",
                "startTime": "2015-10-13T02:05:07Z"
            }
        }
    ]
}

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to magnum (master)

Fix proposed to branch: master
Review: https://review.openstack.org/234817

Changed in magnum:
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to magnum (master)

Reviewed: https://review.openstack.org/234817
Committed: https://git.openstack.org/cgit/openstack/magnum/commit/?id=61c9017335c34c180970d5a3cdf01ffd235c827d
Submitter: Jenkins
Branch: master

commit 61c9017335c34c180970d5a3cdf01ffd235c827d
Author: Bharath Thiruveedula <email address hidden>
Date: Wed Oct 14 20:13:25 2015 +0530

    Monitor driver for k8s bay type

    Add support for computing memory utilization of k8s bay

    Change-Id: I3eecd5e9ceab77bb1877dff2229ba2eb18a5dd76
    Closes-Bug: #1500299

Changed in magnum:
status: In Progress → Fix Committed
Adrian Otto (aotto)
Changed in magnum:
milestone: none → mitaka-2
status: Fix Committed → Fix Released
Adrian Otto (aotto)
Changed in magnum:
milestone: mitaka-2 → mitaka-1
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.