Skip to content

Add support for shared-file-system /v2/services and /v2/scheduler-stats/pools#2350

Merged
mandre merged 4 commits intogophercloud:masterfrom
sapcc:sharedfilesystems-schedulerstats-services
May 10, 2022
Merged

Add support for shared-file-system /v2/services and /v2/scheduler-stats/pools#2350
mandre merged 4 commits intogophercloud:masterfrom
sapcc:sharedfilesystems-schedulerstats-services

Conversation

@SuperSandro2000
Copy link
Copy Markdown
Contributor

@SuperSandro2000 SuperSandro2000 changed the title Sharedfilesystems schedulerstats services Add support for shared-file-system /v2/services and /v2/scheduler-stats/pools Feb 11, 2022
@coveralls
Copy link
Copy Markdown

coveralls commented Feb 11, 2022

Coverage Status

Coverage increased (+0.04%) to 79.932% when pulling 519e501 on sapcc:sharedfilesystems-schedulerstats-services into beef396 on gophercloud:master.

@SuperSandro2000 SuperSandro2000 force-pushed the sharedfilesystems-schedulerstats-services branch from 1959017 to 0508ebb Compare February 11, 2022 15:08
@theopenlab-ci
Copy link
Copy Markdown

theopenlab-ci bot commented Feb 11, 2022

Build failed.

@SuperSandro2000
Copy link
Copy Markdown
Contributor Author

I tried to find the log for the failing test but I couldn't. Where can I find out why the test is failing?

@majewsky
Copy link
Copy Markdown
Contributor

I can see FAIL: TestVolumeAttachments (22.46s) because of

blockstorage.go:243: Unable to delete volume 4b387b87-1a13-49be-9e9f-84eaf1fab669: Bad request with: [DELETE http://192.168.0.117/volume/v3/d4f78f9a18b84e6999283039b06b4e9c/volumes/4b387b87-1a13-49be-9e9f-84eaf1fab669], error message: {"badRequest": {"code": 400, "message": "Invalid volume: Volume status must be available or error or error_restoring or error_extending or error_managing and must not be migrating, attached, belong to a group, have snapshots or be disassociated from snapshots after volume transfer."}}

Also FAIL: TestVolumes (13.58s) because of

convenience.go:35: Failure in volumes_test.go, line 61: expected false but got true

Both of these look unrelated to the changes in this branch. @EmilienM Can you trigger a re-run, please?

@EmilienM
Copy link
Copy Markdown
Contributor

@majewsky Github actions look fine to me, those are the actual jobs we care now.

I'll look at the PR asap.

@EmilienM
Copy link
Copy Markdown
Contributor

I just realized we don't have acceptance coverage for this one, @majewsky any plans for doing it?

@SuperSandro2000
Copy link
Copy Markdown
Contributor Author

We are currently upstreaming custom code in limes. I have tested the endpoints within limes against our staging openstack installation. For acceptance testing I would probably need to setup my own openstack cluster for testing inside a VM which would probably take a few days. I don't think I could run the tests against our staging installation as it could interfere with other people using it.
So if possible we would like to skip adding new acceptance tests for now.

@EmilienM
Copy link
Copy Markdown
Contributor

We are currently upstreaming custom code in limes. I have tested the endpoints within limes against our staging openstack installation. For acceptance testing I would probably need to setup my own openstack cluster for testing inside a VM which would probably take a few days. I don't think I could run the tests against our staging installation as it could interfere with other people using it. So if possible we would like to skip adding new acceptance tests for now.

Right now sharedfilesystems is not tested by our Github actions, I'll work on that soon. But if you have access to any OpenStack cloud with Manila you should be able to run acceptance test against it, and write new tests for this PR. If it's not possible, I'll have to check with other maintainers, but we usually have a policy of documented & tested code before it merges into master.

@SuperSandro2000
Copy link
Copy Markdown
Contributor Author

SuperSandro2000 commented Feb 24, 2022

I have pushed a commit which adds basic tests for the new things I have added in this PR. Locally I had to use an admin account to run them successful. I didn't look into how the tests are run and with what permissions but lets see what the CI run says.

@theopenlab-ci
Copy link
Copy Markdown

theopenlab-ci bot commented Feb 24, 2022

Build failed.

@EmilienM
Copy link
Copy Markdown
Contributor

@SuperSandro2000 sorry for the lag, I finally pushed a PR to enable Manila in our CI: #2361
Once this merge, this PR will need to be rebased, so we can test your code. Thanks a lot for your patience, and yes indeed our new jobs (using Github actions) are way better than what we had before, more coverage, faster, etc.

@EmilienM
Copy link
Copy Markdown
Contributor

please rebase to trigger new ci jobs

@SuperSandro2000 SuperSandro2000 force-pushed the sharedfilesystems-schedulerstats-services branch from 6cbe116 to 519e501 Compare March 7, 2022 09:44
@theopenlab-ci
Copy link
Copy Markdown

theopenlab-ci bot commented Mar 7, 2022

Build failed.

  • gophercloud-unittest : RETRY_LIMIT in 5m 25s
  • gophercloud-acceptance-test-compute : RETRY_LIMIT in 45m 19s
  • gophercloud-acceptance-test-storage : RETRY_LIMIT in 55m 31s

Copy link
Copy Markdown
Contributor

@mandre mandre left a comment

Choose a reason for hiding this comment

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

Hi @SuperSandro2000, thanks for the PR. It's quite a big one, and it would probably be easier in the future to split your work per API calls, so that we can merge them independently when they're ready. This looks mostly OK, I left a few comments, just one thing that surprised me was that you only implemented a subset of the supported fields, is that on purpose? I think you've already made 90% of the work and implementing the missing fields shouldn't be that much effort.

@SuperSandro2000
Copy link
Copy Markdown
Contributor Author

is that on purpose? I think you've already made 90% of the work and implementing the missing fields shouldn't be that much effort.

I only added the fields I needed but I can also add the other fields if you want.

@SuperSandro2000 SuperSandro2000 force-pushed the sharedfilesystems-schedulerstats-services branch from 519e501 to 723ebe5 Compare March 31, 2022 14:02
@theopenlab-ci
Copy link
Copy Markdown

theopenlab-ci bot commented Mar 31, 2022

Build failed.

@SuperSandro2000 SuperSandro2000 force-pushed the sharedfilesystems-schedulerstats-services branch from 723ebe5 to 5721ba0 Compare April 1, 2022 10:08
@theopenlab-ci
Copy link
Copy Markdown

theopenlab-ci bot commented Apr 1, 2022

Build failed.

@SuperSandro2000
Copy link
Copy Markdown
Contributor Author

I am a bit clueless why the CI is failing now. Could someone assist?

Copy link
Copy Markdown
Contributor

@mandre mandre left a comment

Choose a reason for hiding this comment

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

I am a bit clueless why the CI is failing now. Could someone assist?

You had the wrong type for several fields and that caused serialization to fail.

// The host name for the back end.
Host string `json:"host"`
// The back end capabilities which include qos, total_capacity_gb, etc.
Capabilities Capabilities `json:"capabilities"`
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

The capabilities are only returned when querying for the pool details. I believe we should have a separate PoolDetails struct.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Other details endpoint don't do it like this and only have one result. I am also not sure how that would even be done because it is always the generic paginator object returned.

@SuperSandro2000 SuperSandro2000 force-pushed the sharedfilesystems-schedulerstats-services branch 2 times, most recently from 7a13241 to 7d0cb7d Compare May 6, 2022 14:10
@SuperSandro2000 SuperSandro2000 force-pushed the sharedfilesystems-schedulerstats-services branch from 7d0cb7d to 43edb96 Compare May 6, 2022 14:50
@SuperSandro2000
Copy link
Copy Markdown
Contributor Author

@mandre I finally got around fixing your comments and the tests.

Copy link
Copy Markdown
Contributor

@mandre mandre left a comment

Choose a reason for hiding this comment

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

Thanks @SuperSandro2000 for making the requested changes. This looks good and CI is happy. LGTM.

@mandre mandre merged commit 9eb412d into gophercloud:master May 10, 2022
@SuperSandro2000 SuperSandro2000 deleted the sharedfilesystems-schedulerstats-services branch May 10, 2022 13:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add support for shared-file-system /v2/services and /v2/scheduler-stats/pools

5 participants