Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Add migrations list support in compute service #3244

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

Open
wants to merge 3 commits into
base: main
Choose a base branch
Loading
from

Conversation

Patzifist
Copy link

@Patzifist Patzifist commented Nov 29, 2024

For #3243

Links to the line numbers/files in the OpenStack source code that support the
code in this PR:

Document
https://docs.openstack.org/api-ref/compute/#list-migrations
Code
https://github.com/openstack/nova/blob/stable/2024.2/nova/api/openstack/compute/migrations.py

@github-actions github-actions bot added edit:compute This PR updates compute code semver:minor Backwards-compatible change labels Nov 29, 2024
Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

Thank you for submitting your first PR! Be sure that we will be looking at it but keep in mind
this sometimes takes a while.
Please let the maintainers know if your PR has not got enough attention after a few days.
If any doubt, please consult our PR tutorial.

@@ -0,0 +1,22 @@
package osmigrations
Copy link
Contributor

Choose a reason for hiding this comment

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

Can we simply call this migrations? The os- prefix is from the days where this was an extension, but extensions are no longer a thing (nor have they been for some time now).

Copy link
Author

Choose a reason for hiding this comment

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

no problem, done

// The source/destination compute node of migration to filter
Host *string `q:"host"`
// The uuid of the instance that migration is operated on to filter
InstanceUuid *string `q:"instance_uuid"`
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
InstanceUuid *string `q:"instance_uuid"`
InstanceID *string `q:"instance_uuid"`

Or InstanceUUID, though IMO the ID/UUID distinction isn't useful: both ProjectID and UserID are UUIDs also.

Copy link
Author

Choose a reason for hiding this comment

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

Done

rename InstanceUuid to InstanceID
@github-actions github-actions bot added semver:major Breaking change and removed semver:minor Backwards-compatible change labels Dec 1, 2024
// The ID of the server migration
Id int64 `json:"id"`
// The UUID of the server
InstanceUuid string `json:"instance_uuid"`
Copy link
Contributor

Choose a reason for hiding this comment

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

You missed this.

Copy link
Author

Choose a reason for hiding this comment

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

Done

@Patzifist Patzifist requested a review from stephenfin December 3, 2024 09:43
@coveralls
Copy link

Coverage Status

coverage: 78.645% (-0.08%) from 78.726%
when pulling 5ed2b6e on Patzifist:osmigrations
into e7fde53 on gophercloud:master.

@Patzifist
Copy link
Author

Failed to compute_task_migrate_server: No valid host was found. There are not enough hosts available.

allMigrations, err := migrations.ExtractMigrations(allPages)
th.AssertNoErr(t, err)

th.AssertIntGreaterOrEqual(t, len(allMigrations), 1)
Copy link
Contributor

Choose a reason for hiding this comment

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

The CI fails on this line:

migrate_test.go:39: Failure in migrate_test.go, line 39: The first value "0" is lesser than the second value "1"

I can't immediately spot what the issue is, the code looks fine, and this should be running as admin.

Copy link
Contributor

Choose a reason for hiding this comment

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

You found your issue already :)

We'll need to add another compute for the nova job to test migrations. @stephenfin do you have an idea if that's easily feasible?

@Patzifist in case you want to give it a shot, the job is configured in https://github.com/gophercloud/gophercloud/blob/master/.github/workflows/functional-compute.yaml.

Copy link
Author

@Patzifist Patzifist Dec 4, 2024

Choose a reason for hiding this comment

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

I suggest disabling the test and merging the request. what do you think about it?

Copy link
Contributor

Choose a reason for hiding this comment

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

Sorry for the lag anwering your question.

Rather than deleting a test that is otherwise good, could we instead skip it if there's less than 2 computes?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
edit:compute This PR updates compute code semver:major Breaking change
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants
Morty Proxy This is a proxified and sanitized view of the page, visit original site.