-
Notifications
You must be signed in to change notification settings - Fork 896
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
[BUG] vcsim does not answer govc find after deleting a resource pool which had a child resource pool #3396
Comments
Unittest which could get used in func TestFinderDestroyedParentResourcePool(t *testing.T) {
ctx := context.Background()
m := VPX()
m.Datacenter = 3
m.Folder = 2
m.Pool = 1
defer m.Remove()
err := m.Create()
if err != nil {
t.Fatal(err)
}
s := m.Service.NewServer()
defer s.Close()
client, err := govmomi.NewClient(ctx, s.URL, true)
if err != nil {
t.Fatal(err)
}
finder := find.NewFinder(client.Client, false)
dc, _ := finder.Datacenter(ctx, "/F0/DC1")
finder.SetDatacenter(dc)
rp, err := finder.ResourcePool(ctx, "/DC0/host/DC0_C0/Resources")
if err != nil {
t.Fatal(err)
}
foo, err := rp.Create(ctx, "foo", types.DefaultResourceConfigSpec())
if err != nil {
t.Fatal(err)
}
bar, err := foo.Create(ctx, "bar", types.DefaultResourceConfigSpec())
if err != nil {
t.Fatal(err)
}
task, err := foo.Destroy(ctx)
if err != nil {
t.Fatal(err)
}
if err := task.WaitEx(ctx); err != nil {
t.Fatal(err)
}
if _, err := finder.Element(ctx, bar.Reference()); err != nil {
t.Fatal(err)
}
} |
chrischdi
changed the title
[BUG] vcsim find fails after deleting a resource pool which had children
[BUG] vcsim does not answer govc find after deleting a resource pool which had a child resource pool
Mar 28, 2024
dougm
added a commit
to dougm/govmomi
that referenced
this issue
Apr 2, 2024
Thank you @chrischdi for the test cases to reproduce, fix opened for review #3399 |
dougm
added a commit
to dougm/govmomi
that referenced
this issue
Apr 2, 2024
dougm
added a commit
to dougm/govmomi
that referenced
this issue
Apr 2, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Describe the bug
A clear and concise description of what the bug is.
To Reproduce
Steps to reproduce the behavior:
govc pool.create /DC0/host/DC0_C0/Resources/foo
govc pool.create /DC0/host/DC0_C0/Resources/foo/bar
govc find -l /DC0/host/DC0_C0/Resources
govc pool.destroy /DC0/host/DC0_C0/Resources/foo
govc find -l /DC0/host/DC0_C0/Resources
govc command will be stuck forever and not return or exit.
Expected behavior
Find returns the list of still existing objects.
Affected version
Screenshots/Debug Output
If applicable, add screenshots or debug output to help explain your problem.
Additional context
This command still works after
govc pool.destroy /DC0/host/DC0_C0/Resources/foo
:❯ govc ls '/DC0/host/DC0_C0/Resources/*' /DC0/host/DC0_C0/Resources/bar
The same happens when using
govc object.destroy
.It does not happen for folders.
The text was updated successfully, but these errors were encountered: