Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[occm] API requests & Loadbalancer reconciliation metrics #1178

Merged
merged 3 commits into from
Sep 24, 2020

Conversation

seanschneeweiss
Copy link
Contributor

@seanschneeweiss seanschneeweiss commented Aug 31, 2020

What this PR does / why we need it:
This PR implements metrics for loadbalancer reconciliations:

  • cloudprovider_openstack_reconcile_duration_seconds
  • cloudprovider_openstack_reconcile_total
  • cloudprovider_openstack_reconcile_errors_total

and metrics for OpenStack API requests:

  • openstack_api_request_duration_seconds
  • openstack_api_requests_total
  • openstack_api_request_errors_total

Which issue this PR fixes(if applicable):
fixes #912

Special notes for reviewers:

Metrics are exposed to https://localhost:10258/metrics.
I would recommend to add the following arguments when running OCCM.

--authorization-always-allow-paths=/metrics
--secure-port=10258

Release note:

[openstack-cloud-controller-manager] Added metrics support for loadbalancer reconciliations and OpenStack API requests.

Sean Schneeweiss [email protected], Daimler TSS GmbH, legal info/Impressum

@k8s-ci-robot k8s-ci-robot added release-note Denotes a PR that will be considered when it comes time to generate release notes. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. labels Aug 31, 2020
@k8s-ci-robot
Copy link
Contributor

Hi @seanschneeweiss. Thanks for your PR.

I'm waiting for a kubernetes member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@k8s-ci-robot k8s-ci-robot added needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. labels Aug 31, 2020
@theopenlab-ci
Copy link

theopenlab-ci bot commented Aug 31, 2020

Build succeeded.

@theopenlab-ci
Copy link

theopenlab-ci bot commented Aug 31, 2020

Build succeeded.

@theopenlab-ci
Copy link

theopenlab-ci bot commented Aug 31, 2020

Build succeeded.

@theopenlab-ci
Copy link

theopenlab-ci bot commented Aug 31, 2020

Build failed.

@theopenlab-ci
Copy link

theopenlab-ci bot commented Aug 31, 2020

Build failed.

@theopenlab-ci
Copy link

theopenlab-ci bot commented Aug 31, 2020

Build failed.

@theopenlab-ci
Copy link

theopenlab-ci bot commented Aug 31, 2020

Build succeeded.

@theopenlab-ci
Copy link

theopenlab-ci bot commented Aug 31, 2020

Build failed.

@theopenlab-ci
Copy link

theopenlab-ci bot commented Aug 31, 2020

Build succeeded.

@jichenjc
Copy link
Contributor

jichenjc commented Sep 1, 2020

/ok-to-test

@k8s-ci-robot k8s-ci-robot added ok-to-test Indicates a non-member PR verified by an org member that is safe to test. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Sep 1, 2020
@seanschneeweiss
Copy link
Contributor Author

/retest

@seanschneeweiss
Copy link
Contributor Author

  • openlab/cloud-provider-openstack-multinode-csi-migration-test is failing maybe because of:
Events:
  Type     Reason       Age                  From                                                               Message
  ----     ------       ----                 ----                                                               -------
  Warning  FailedMount  56s (x10 over 5m5s)  kubelet, ubuntu-xenial-citynetwork-citynetwork-openlab-0000145850  MountVolume.SetUp failed for volume "pods-cloud-data" : hostPath type check failed: /var/lib/cloud/data is not a directory
  Warning  FailedMount  47s                  kubelet, ubuntu-xenial-citynetwork-citynetwork-openlab-0000145850  Unable to attach or mount volumes: unmounted volumes=[pods-cloud-data], unattached volumes=[csi-cinder-node-sa-token-d8qlb kubelet-dir pods-cloud-data pods-probe-dir secret-cinderplugin socket-dir registration-dir]: timed out waiting for the condition
  • openlab/cloud-provider-openstack-e2e-test-csi-cinder and openlab/cloud-provider-openstack-acceptance-test-csi-cinder are failing with:
/bin/bash: line 84: /var/lib/cloud/data/instance-id: No such file or directory
  • openlab/cloud-provider-openstack-acceptance-test-csi-manila is failing with:
Setting up the hosts
... this takes a few seconds (logs at logs/devstack-gate-setup-host.txt.gz)
./safe-devstack-vm-gate-wrap.sh: line 578: /tmp/ansible/bin/ara: No such file or directory
gzip: /home/zuul/workspace/logs/ara: No such file or directory
*** FAILED with status: 127

@ramineni
Copy link
Contributor

ramineni commented Sep 2, 2020

/test cloud-provider-openstack-acceptance-test-csi-cinder

@k8s-ci-robot
Copy link
Contributor

@ramineni: The specified target(s) for /test were not found.
The following commands are available to trigger jobs:

  • /test pull-cloud-provider-openstack-check
  • /test pull-cloud-provider-openstack-test

Use /test all to run all jobs.

In response to this:

/test cloud-provider-openstack-acceptance-test-csi-cinder

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@theopenlab-ci
Copy link

theopenlab-ci bot commented Sep 2, 2020

Build failed.

@ramineni
Copy link
Contributor

ramineni commented Sep 2, 2020

/test /test cloud-provider-openstack-acceptance-test-csi-cinder

@k8s-ci-robot
Copy link
Contributor

@ramineni: The specified target(s) for /test were not found.
The following commands are available to trigger jobs:

  • /test pull-cloud-provider-openstack-check
  • /test pull-cloud-provider-openstack-test

Use /test all to run all jobs.

In response to this:

/test /test cloud-provider-openstack-acceptance-test-csi-cinder

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@ramineni
Copy link
Contributor

ramineni commented Sep 2, 2020

/test cloud-provider-openstack-acceptance-test-csi-cinder

@k8s-ci-robot
Copy link
Contributor

@ramineni: The specified target(s) for /test were not found.
The following commands are available to trigger jobs:

  • /test pull-cloud-provider-openstack-check
  • /test pull-cloud-provider-openstack-test

Use /test all to run all jobs.

In response to this:

/test cloud-provider-openstack-acceptance-test-csi-cinder

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@theopenlab-ci
Copy link

theopenlab-ci bot commented Sep 2, 2020

Build succeeded.

@ramineni
Copy link
Contributor

ramineni commented Sep 2, 2020

@seanschneeweiss Fixed the following failure in openlab

/bin/bash: line 84: /var/lib/cloud/data/instance-id: No such file or directory

@theopenlab-ci
Copy link

theopenlab-ci bot commented Sep 18, 2020

Build succeeded.

@theopenlab-ci
Copy link

theopenlab-ci bot commented Sep 18, 2020

Build succeeded.

@theopenlab-ci
Copy link

theopenlab-ci bot commented Sep 18, 2020

Build succeeded.

@theopenlab-ci
Copy link

theopenlab-ci bot commented Sep 18, 2020

Build succeeded.

@theopenlab-ci
Copy link

theopenlab-ci bot commented Sep 18, 2020

Build succeeded.

@theopenlab-ci
Copy link

theopenlab-ci bot commented Sep 18, 2020

Build succeeded.

@theopenlab-ci
Copy link

theopenlab-ci bot commented Sep 18, 2020

Build succeeded.

@theopenlab-ci
Copy link

theopenlab-ci bot commented Sep 18, 2020

Build succeeded.

@theopenlab-ci
Copy link

theopenlab-ci bot commented Sep 18, 2020

Build succeeded.

@theopenlab-ci
Copy link

theopenlab-ci bot commented Sep 18, 2020

Build succeeded.

@lingxiankong
Copy link
Contributor

/lgtm

@seanschneeweiss Do you mind adding some doc for this?

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Sep 22, 2020
@seanschneeweiss
Copy link
Contributor Author

@seanschneeweiss Do you mind adding some doc for this?

@lingxiankong Should the documentation be added to a new markdown file e.g. /docs/metrics.md or to the existing /docs/using-openstack-cloud-controller-manager.md? Should I create a separate PR? Is there any existing documentation related to this, or maybe a template/guideline?

limitations under the License.
*/

package metrics
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we might want to move this to a generic location so that other component can benefit it later on

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you everyone for reviewing and approving this PR.
Refactoring / moving this to a generic location is handled within #1236.

@jichenjc
Copy link
Contributor

/approve

I think we can do a followup PR and not blocking this..

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: jichenjc

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Sep 24, 2020
@jichenjc
Copy link
Contributor

@seanschneeweiss please help to create a new PR related the doc and we can follow up discussion there, thanks

@k8s-ci-robot k8s-ci-robot merged commit eebfac2 into kubernetes:master Sep 24, 2020
@ramineni
Copy link
Contributor

ramineni commented Oct 5, 2020

@seanschneeweiss Do you mind adding some doc for this?

@lingxiankong Should the documentation be added to a new markdown file e.g. /docs/metrics.md or to the existing /docs/using-openstack-cloud-controller-manager.md? Should I create a separate PR? Is there any existing documentation related to this, or maybe a template/guideline?

@seanschneeweiss @sbueringer I think this is missed. Could you add the doc on how to use this . Adding new file docs/metrics.md sounds good to me , and link it from the main doc. You could receive more comments once you propose the PR. @lingxiankong do you have any other suggestions?

@lingxiankong
Copy link
Contributor

Agree with @ramineni, besides, I'd like to see several things in the doc:

  1. What metrics are supported? Which binaries are related?
  2. How to config (if applicable) to make the metrics work? How to get metrics?
  3. Metric examples

@seanschneeweiss
Copy link
Contributor Author

I will create the PR soon, thank you for the feedback.

powellchristoph pushed a commit to powellchristoph/cloud-provider-openstack that referenced this pull request Jan 19, 2022
…#1178)

* [occm] move metrics to seperate folder

By moving the metrics definition to a seperate folder it can be used
by pkg/cloudprovider/providers/openstack and pkg/util/openstack.

Signed-off-by: Sean Schneeweiss <[email protected]>

* [occm] API request and reconcile metrics

This commit implements metrics for OpenStack API calls
and for loadbalancer reconciliations.

Signed-off-by: Sean Schneeweiss <[email protected]>

* [occm] rename extension metric to network_extension
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. release-note Denotes a PR that will be considered when it comes time to generate release notes. size/XL Denotes a PR that changes 500-999 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

cloud-controller-manager metrics port and address is not accessible or documented
5 participants