Skip to content

Commit

Permalink
Merge pull request #3177 from hickeng/topic/hickeng/container-backed-…
Browse files Browse the repository at this point in the history
…sim-hosts

This adds support for backing a host with a container in a similar
manner to how we back VMs with containers.

This functions as is but is not particularly useful without planned
follow on work to provide a container image with mocks for ESXi
cli commands and presentation of vcsim as a hostd endpoint.
  • Loading branch information
hickeng authored Aug 8, 2023
2 parents ba843e5 + f636e96 commit e7aac6a
Show file tree
Hide file tree
Showing 21 changed files with 2,557 additions and 436 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/govmomi-go-tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -60,3 +60,6 @@ jobs:
TEST_TIMEOUT: 5m
TEST_OPTS: ""
run: make go-test
- name: Debug with tmate on failure
if: ${{ failure() }}
uses: mxschmitt/action-tmate@v3
4 changes: 4 additions & 0 deletions .github/workflows/govmomi-govc-tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,10 @@ jobs:
run: |
make ${{ matrix.cmd }}
- name: Debug with tmate on failure
if: ${{ failure() }}
uses: mxschmitt/action-tmate@v3

govc-docs:
name: Verify govc docs are up2date
strategy:
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ endif

.PHONY: go-test
go-test: ## Runs go unit tests with race detector enabled
GORACE=$(GORACE) $(GO) test \
GORACE=$(GORACE) CGO_ENABLED=1 $(GO) test \
-count $(TEST_COUNT) \
-race \
-timeout $(TEST_TIMEOUT) \
Expand Down
2 changes: 1 addition & 1 deletion govc/test/vcsim.bats
Original file line number Diff line number Diff line change
Expand Up @@ -340,7 +340,7 @@ EOF
run docker inspect -f '{{.State.Status}}' "$name"
assert_success "running"

run docker volume inspect "$name"
run docker volume inspect "$name--dmi"
assert_success

run govc vm.destroy $vm
Expand Down
2 changes: 1 addition & 1 deletion simulator/cluster_compute_resource.go
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ func (add *addHost) Run(task *Task) (types.AnyType, types.BaseMethodFault) {
}

host := NewHostSystem(template)
host.configure(spec, add.req.AsConnected)
host.configure(task.ctx, spec, add.req.AsConnected)

task.ctx.Map.PutEntity(cr, task.ctx.Map.NewEntity(host))
host.Summary.Host = &host.Self
Expand Down
Loading

0 comments on commit e7aac6a

Please sign in to comment.